Created
April 7, 2014 20:52
-
-
Save chester89/10050360 to your computer and use it in GitHub Desktop.
Getting a list of issues from Github closed within date range using Octokit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var credentials = new Credentials(login, password); | |
var credentialStore = new InMemoryCredentialStore(credentials); | |
var productHeaderValue = new ProductHeaderValue("MyAmazingApp"); | |
var connection = new Connection(productHeaderValue, credentialStore); | |
var apiConnection = new ApiConnection(connection); | |
var issues = new IssuesClient(apiConnection); | |
var closedSince1Point2 = issues.GetForRepository("ownerLogin", "repoName", new RepositoryIssueRequest() | |
{ | |
State = ItemState.Closed, | |
Since = new DateTimeOffset(new DateTime(2011, 4, 3, 14, 0, 0)), | |
SortDirection = SortDirection.Descending, | |
SortProperty = IssueSort.Created | |
}).Result.Where(x => x.ClosedAt < DateTime.SpecifyKind(new DateTime(2012, 6, 20), DateTimeKind.Utc)).OrderBy(x => x.CreatedAt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment