Skip to content

Label API: Get the date when a label was added to an issue. #24630

Discussion options

You must be logged in to vote

Hey @dereksmart!

That looks good to me! If I have one suggestion, it might be to use the pullRequest.timelineItems connection that’s currently in preview: https://developer.github.com/v4/previews/#issues-preview

This connection allows filtering the timeline down to a specific list of items, so you could do something like this:

query{
  repository(owner: "owner", name: "name") {
    pullRequests(last: 10, states: OPEN) {
      totalCount
      edges {
        node {
          title
          url
          number
          timelineItems(last: 100, itemTypes: [LABELED_EVENT, UNLABELED_EVENT]) {
            totalCount
            edges {
              node {
                __typename
       …

Replies: 7 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants