Skip to content

Instantly share code, notes, and snippets.

@ShawInnes
Forked from PaulStovell/ReleaseNotes.py
Last active August 29, 2015 13:57
Show Gist options
  • Save ShawInnes/9595471 to your computer and use it in GitHub Desktop.
Save ShawInnes/9595471 to your computer and use it in GitHub Desktop.
C# Version of Paul Stovell's Release Notes Builder.
//
// Fork of https://gist.github.com/PaulStovell/9593947
// Uses: https://github.com/octokit/octokit.net
// NuGet: Install-Package Octokit
//
var connection = new Connection(new ProductHeaderValue("ReleaseNotesGenerator"));
connection.Credentials = new Credentials(Util.GetPassword("github.username"), Util.GetPassword("github.password"));
var apiConnection = new ApiConnection(connection);
var issueHub = new IssuesClient(apiConnection);
var issues = await issueHub.GetForRepository("in-beta", "issues", new RepositoryIssueRequest() { State = ItemState.Closed, Milestone = "1" });
issues.OrderBy(p => p.ClosedAt).Select(p => new {
IssueId = p.Number,
Milestone = p.Milestone.Title,
Title = p.Title,
Url = p.Url.ToString(),
Labels = string.Join(", ", p.Labels.Select(q => q.Name))
}).Dump();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment