Is there a native method on Octokit that allows starring a repo?
Been looking around ex on client.Repositories and can not find anything.
Is there a native method on Octokit that allows starring a repo?
Been looking around ex on client.Repositories and can not find anything.
Looking at your tags I assume you are talking about Oktokit.net
The documentation doesn't list independent API calls but I was able to detect this feature looking at the source:
Check IObservableStarredClient.cs:
/// <summary>
/// Stars a repository for the authenticated user
/// </summary>
/// <param name="owner">The owner of the repository to star</param>
/// <param name="name">The name of the repository to star</param>
/// <returns>A <c>bool</c> representing the success of starring</returns>
IObservable<bool> StarRepo(string owner, string name);
Yes, you can star a repository by the following method
await client.Activity.Starring.StarRepo(repo.Owner.Login, repo.Name);
The method will return bool indicating whether repository was starred successfully or not.