0

Is there a native method on Octokit that allows starring a repo?

Been looking around ex on client.Repositories and can not find anything.

Chris Hermut
  • 1,708
  • 3
  • 17
  • 32

2 Answers2

0

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);
bitoiu
  • 6,893
  • 5
  • 38
  • 60
0

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.

Aalok
  • 553
  • 8
  • 21