pull-request-comment-branch icon indicating copy to clipboard operation
pull-request-comment-branch copied to clipboard

Merge Sha

Open BenLiyanage opened this issue 2 years ago • 1 comments

This graphQL query gets the merge commit sha, which is what github uses internally on PRs. Would be nice if this was available to keep things consistent.

{
  viewer {
    login
  }
  repository(name: "dbt", owner: "vidahealth") {
    pullRequest(number: 1843) {
      potentialMergeCommit {
        oid
      }
    }
  }
}

This sha is useful for file diffs with out having to retrieving an extended git commit history.

BenLiyanage avatar Jun 26 '23 20:06 BenLiyanage

I didn't exactly know how to build a github action so I did not get this working on my end.

BenLiyanage avatar Jun 26 '23 20:06 BenLiyanage