diff --git a/dev-infra/release/publish/pull-request-state.ts b/dev-infra/release/publish/pull-request-state.ts index cd750ff672..437e6cdcb7 100644 --- a/dev-infra/release/publish/pull-request-state.ts +++ b/dev-infra/release/publish/pull-request-state.ts @@ -68,5 +68,5 @@ async function isCommitClosingPullRequest(api: GitClient, sha: string, id: numbe const {data} = await api.github.repos.getCommit({...api.remoteParams, ref: sha}); // Matches the closing keyword supported in commit messages. See: // https://docs.github.com/en/enterprise/2.16/user/github/managing-your-work-on-github/closing-issues-using-keywords. - return data.commit.message.match(new RegExp(`close[sd]? #${id}[^0-9]?`, 'i')); + return data.commit.message.match(new RegExp(`close[sd]? #${id}(?!\\d)`, 'i')); }