Repository navigation
Allow workload-balanced assignment for eligible fork pull requests - #4903
Open
priyankatiwari08 wants to merge 1 commit into
Open
priyankatiwari08 wants to merge 1 commit into
priyankatiwari08 wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: a0b3b46b-9898-4b60-ba36-9b4b3a5992f1
priyankatiwari08
requested review from
a team
and
a balanced review from Copilot
October 22, 2026 13:19
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
No actionable defects were identified, but missing trusted review policies and current-head verification leave approval checks incomplete for this privileged workflow.
No open issues 🎉
What changed in this PR
Enables eligible fork pull requests to use the existing auto-assignment load balancer while preserving the remaining eligibility gates and trusted-base execution.
Changes:
- Removes the fork exclusion and its incorrect permissions comment.
- Adds 14 dependency-free Node.js tests covering eligibility, workflow configuration, and mocked assignment behavior.
- Documents local test execution and the supported events needed to trigger assignment after rollout.
| File | Description |
|---|---|
.github/workflows/auto-assign-pr.yml |
Removes the fork restriction while retaining other eligibility gates. |
.github/scripts/tests/README.md |
Documents test invocation and rollout behavior. |
.github/scripts/tests/auto-assign-pr.test.cjs |
Adds eligibility, trusted-checkout, and assignment regression tests. |
Review effort: Balanced
paulmedynski
approved these changes
Oct 23, 2026
cheenamalhotra
requested changes
Oct 29, 2026
cheenamalhotra
left a comment
Member
There was a problem hiding this comment.
This wouldn't work, as the token doesn't have access to work on fork-based PRs/branches.
Update copilot instructions instead to prefer creating branch on this repo with prefix format if user has access.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Propose extending Auto Assign PR Load Balancer to eligible fork pull requests by removing the
head.repo.fork == falsejob condition and the incorrect comment claiming GitHub Actions cannot assign users to fork PRs.This is a broader assignment-policy change, not a required fix for GitHub Copilot app usage. The app publishing issue that prompted this investigation is being addressed separately through a compliant default branch prefix and personal instructions to publish upstream without falling back to a fork. Those settings have been updated; successful upstream publishing from a new session has not yet been verified in this investigation. Same-repository PRs already qualify under the existing workflow when open, non-draft, and milestoned.
The decision for maintainers is whether ready, milestoned fork contributions should receive the same workload-balanced assignment as same-repository PRs. If fork contributions should remain manually assigned after triage, this change is not needed. If adopted, it applies to both community and maintainer forks, not just app-created PRs; the milestone gate remains in place.
Retain the upstream-repository, open, non-draft, and milestone gates,
pull_request_target, existing permissions, and default trusted base-repository checkout. No PR-head code is checked out or executed. The assignment script is unchanged: existing assignees, workload ranking, and random tie-breaking are preserved. No individual review requests are added.Add dependency-free Node.js regression tests and document their invocation and rollout behavior. No public API, runtime, localization, or package changes.
Issues
Related example: #4902 was skipped by run 39782451531. It originated from a personal fork; adding a milestone could not overcome the separate fork exclusion. The branch name itself is not checked by this workflow. This PR does not modify #4902 or its milestone.
If this policy change is adopted and the workflow lands, existing PRs still need a new supported event (
opened,reopened,ready_for_review, ormilestoned). Existing fork PRs can alternatively be assigned manually without this change.Testing
Added 14 focused tests for fork/same-repository eligibility, every retained gate, target-event/trusted-base checkout configuration, and mocked fork assignment with zero, one, or two existing assignees. Coverage checks lowest-workload selection, author exclusion, existing-assignee preservation, and filling only vacancies.
Commands and results recorded during implementation:
node --test .github\scripts\tests\auto-assign-pr.test.cjsbefore the workflow fix: failed as expected, including eligible-fork rejection (false !== true).node --test .github\scripts\tests\auto-assign-pr.test.cjs .github\scripts\tests\validate-triage-output.test.cjsafter the fix: passed, 38 tests.git diff --cached --check: passed before commit.No live assignment mutation was performed. Hosted execution needs the updated base workflow; local tests evaluate its simple comparison/boolean expression and mock GitHub API calls. .NET build and SQL integration suites were not run because no driver or package code changed. The new suite is documented for local execution, following the existing manually invoked workflow-script test pattern. Tests were not rerun for the subsequent title/description-only clarification; implementation and test files were unchanged by that clarification.
Guidelines
Please review the contribution guidelines before submitting a pull request: