Skip to content

Commit

Permalink
docs: describe merge_commit_sha
Browse files Browse the repository at this point in the history
  • Loading branch information
korthout committed Dec 2, 2023
1 parent 9db497c commit ea686db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,15 @@ export class Github implements GithubApi {

/**
* Retrieves the SHA of the merge commit for a given pull request.
*
* After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request:
*
* - If merged as a merge commit, `merge_commit_sha` represents the SHA of the merge commit.
* - If merged via a squash, `merge_commit_sha` represents the SHA of the squashed commit on the base branch.
* - If rebased, `merge_commit_sha` represents the commit that the base branch was updated to.
*
* See: https://docs.github.com/en/free-pro-team@latest/rest/pulls/pulls?apiVersion=2022-11-28#get-a-pull-request
*
* @param pull - The pull request object.
* @returns The SHA of the merge commit.
*/
Expand Down

0 comments on commit ea686db

Please sign in to comment.