var client = new GitHubClient(new ProductHeaderValue("MyApp")); var newRepo = new NewRepository("my-new-repo"); var createdRepo = await client.Repository.Create(newRepo);
var client = new GitHubClient(new ProductHeaderValue("MyApp")); var comment = new NewIssueComment("Hello world!"); var createdComment = await client.Issue.Comment.Create("owner", "repo", 1, comment);This code uses the IGitHubClient to add a new comment to an issue on GitHub. It first creates a new instance of the GitHubClient class, passing in a ProductHeaderValue as before. It then creates a new NewIssueComment object with the text of the comment, and calls the Create method on the client's Issue.Comment property to add the comment to the specified issue (identified by its owner, repository, and issue number). The package library for the IGitHubClient is the Octokit.NET library, which is a C# wrapper for the GitHub API.