Skip to content

Get the time a commit was pushed? #24730

Discussion options

You must be logged in to vote

Doesn’t look like this is possible in the REST API but it is possible using GQL, for example:

{
      repository(owner: "firebase", name: "firebase-tools") {
        pullRequest(number: 3544) {
          timelineItems(last: 250, itemTypes: [PULL_REQUEST_COMMIT]) {
            nodes {
              ... on PullRequestCommit {
                commit {
                  oid,
                  committedDate,
                  pushedDate
                }
              }
            }
          }
        }
      }
    }

pushedDate will be null in the case where the PR is from a fork, it looks like that information is just not available in that case.

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
Answer selected
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment