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

Commit 1fe1e5b

Browse files
authored
Add comment for PRs from forks to trigger build (#332)
1 parent cf9356b commit 1fe1e5b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

code-review-chat/CodeReviewChat.js

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

code-review-chat/CodeReviewChat.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,20 @@ export class CodeReviewChat extends Chatter {
349349
})(),
350350
);
351351

352+
// Trigger build for forked PRs by adding a comment
353+
if (pr.fork) {
354+
tasks.push(
355+
(async () => {
356+
await this.octokit.issues.createComment({
357+
owner: this.options.payload.owner,
358+
repo: this.options.payload.repo,
359+
issue_number: this.pullRequestNumber,
360+
body: '/AzurePipelines run',
361+
});
362+
})(),
363+
);
364+
}
365+
352366
await Promise.all(tasks);
353367
}
354368
}

0 commit comments

Comments
 (0)