Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/scripts/pr-governance-issue-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ module.exports = async ({ github, context, core }) => {
return;
}

// Skip for fork PRs (read-only token cannot leave actionable governance comments)
const isForkPr = pr.head?.repo?.full_name && pr.head.repo.full_name !== `${context.repo.owner}/${context.repo.repo}`;
if (isForkPr) {
console.log(`Skipping: fork PR from ${pr.head.repo.full_name}`);
core.setOutput('skipped', 'true');
return;
}

// Skip for dependabot and automated PRs
const skipAuthors = ['dependabot[bot]', 'dependabot', 'app/dependabot', 'azure-sdk'];
if (skipAuthors.includes(pr.user.login)) {
Expand Down