Skip to content

Commit 21ff057

Browse files
committed
chore(github-action): fix options fetch
1 parent c297618 commit 21ff057

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/github-action/src/releaser.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)