File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -412,7 +412,13 @@ async function run () {
412
412
const title = core . getInput ( 'title' , { required : false } )
413
413
414
414
const octokit = new github . getOctokit ( repoToken )
415
- const ref = github . context . sha
415
+ const pullRequest = github . context . payload . pull_request
416
+ let ref
417
+ if ( pullRequest ) {
418
+ ref = pullRequest . head . sha
419
+ } else {
420
+ ref = github . context . sha
421
+ }
416
422
const owner = github . context . repo . owner
417
423
const repo = github . context . repo . repo
418
424
Original file line number Diff line number Diff line change @@ -139,7 +139,13 @@ async function run () {
139
139
const title = core . getInput ( 'title' , { required : false } )
140
140
141
141
const octokit = new github . getOctokit ( repoToken )
142
- const ref = github . context . sha
142
+ const pullRequest = github . context . payload . pull_request
143
+ let ref
144
+ if ( pullRequest ) {
145
+ ref = pullRequest . head . sha
146
+ } else {
147
+ ref = github . context . sha
148
+ }
143
149
const owner = github . context . repo . owner
144
150
const repo = github . context . repo . repo
145
151
You can’t perform that action at this time.
0 commit comments