File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/github-action/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -61,13 +61,22 @@ export class ReleaserGithubAction<P extends Project = Project> extends Releaser<
6161 hosting,
6262 logger
6363 } = this
64+
65+ logger . info ( 'fetch-options' , 'Fetching options from pull request comments...' )
66+
6467 const { octokit } = hosting
6568 const repositoryId = await hosting . getRepositoryId ( project )
6669 const { data : [ pr ] } = await octokit . rest . pulls . list ( {
6770 ...repositoryId ,
6871 head : `${ repositoryId . owner } :${ headBranch } ` ,
6972 state : 'open'
7073 } )
74+
75+ if ( ! pr ) {
76+ logger . info ( 'fetch-options' , 'No open pull request found.' )
77+ return
78+ }
79+
7180 const { data : comments } = await octokit . rest . issues . listComments ( {
7281 ...repositoryId ,
7382 issue_number : pr . number
You can’t perform that action at this time.
0 commit comments