Skip to content

Skip PR governance issue-link enforcement for fork-origin PRs#8476

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-pr-governance-job
Draft

Skip PR governance issue-link enforcement for fork-origin PRs#8476
Copilot wants to merge 2 commits into
mainfrom
copilot/fix-pr-governance-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

The PR Governance action was failing on fork-origin pull requests because the workflow could not post/update governance comments with the integration token, yet still hard-failed on missing linked issues. This change makes the governance issue-link check non-blocking for fork PRs.

  • What changed

    • Added an early fork-PR guard in .github/scripts/pr-governance-issue-check.js.
    • Detects when pull_request.head.repo.full_name differs from ${owner}/${repo}.
    • Marks the check as skipped (skipped=true) and exits before issue-link enforcement.
  • Behavior impact

    • Same-repo PRs: existing linked-issue requirement remains unchanged.
    • Fork PRs: governance issue-link check is skipped instead of failing due to token permission constraints.
  • Code snippet

    const isForkPr =
      pr.head?.repo?.full_name &&
      pr.head.repo.full_name !== `${context.repo.owner}/${context.repo.repo}`;
    
    if (isForkPr) {
      core.setOutput('skipped', 'true');
      return;
    }

Co-authored-by: saanikaguptamicrosoft <193585514+saanikaguptamicrosoft@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'PR Governance' Skip PR governance issue-link enforcement for fork-origin PRs May 29, 2026
@microsoft-github-policy-service microsoft-github-policy-service Bot added the no-recent-activity identity issues with no activity label Jun 5, 2026
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

Hi @@copilot. Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-recent-activity identity issues with no activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants