Skip to content

Commit 9345251

Browse files
authored
1 parent 578dbd2 commit 9345251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
const fullRepositoryName = payload.repository.full_name; // like "Codertocat/Hello-World"
1111

1212
const isPullRequest = payload.pull_request !== undefined;
13-
const commitId = isPullRequest ? payload.pull_request.head.sha : (payload.head_commit ? payload.head_commit.id : github.sha); // like "ec26c3e57ca3a959ca5aad62de7213c562f8c821"
13+
const commitId = isPullRequest ? payload.pull_request.head.sha : (payload.head_commit ? payload.head_commit.id : payload.sha); // like "ec26c3e57ca3a959ca5aad62de7213c562f8c821"
1414
const branchName = isPullRequest ? payload.pull_request.head.ref : payload.ref.replace(/^refs\/heads\//, ''); // like "my/branch_name"
1515
console.log(`🎋 On branch '${branchName}', head commit ${commitId}`);
1616

0 commit comments

Comments
 (0)