Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue Label added datetime #2099

Closed
apobekiaris opened this issue Feb 17, 2020 · 2 comments
Closed

Issue Label added datetime #2099

apobekiaris opened this issue Feb 17, 2020 · 2 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@apobekiaris
Copy link

how to get this information?

image

@hnrkndrssn
Copy link
Contributor

Hey @apobekiaris,

You need to interrogate the events for the issue in question looking for Labeled events. I've put together a small LINQPad script below:

var gh = new GitHubClient(new ProductHeaderValue("LinqPad"));
var issueEvents = await gh.Issue.Events.GetAllForIssue("octokit", "octokit.net", 2099);
var latestLabeledEvent = issueEvents.Where(e => e.Event.Value == EventInfoState.Labeled && e.Label.Name.Equals("category: how do i do X?", StringComparison.OrdinalIgnoreCase)).LastOrDefault();
latestLabeledEvent.CreatedAt.Dump();

I hope that helps!

@apobekiaris
Copy link
Author

excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
None yet
Development

No branches or pull requests

4 participants