Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit d81cacb

Browse files
authored
Skip posting message for merged pull requests in CodeReviewChatAction (#321)
1 parent d6d5cce commit d81cacb

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

code-review-chat/index.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code-review-chat/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ class CodeReviewChatAction extends Action {
9797
if (!payload.pull_request || !payload.repository) {
9898
throw Error('expected payload to contain pull request url');
9999
}
100+
101+
if (payload.pull_request.state === 'closed') {
102+
// PR was merged and a review was submitted after merge. Skip posting message
103+
safeLog(`PR was already merged. Skipping posting message`);
104+
return;
105+
}
106+
100107
const toolsAPI = new VSCodeToolsAPIManager();
101108
const teamMembers = new Set((await toolsAPI.getTeamMembers()).map((t) => t.id));
102109
const auth = await this.getToken();

0 commit comments

Comments
 (0)