Summary
The contributors workflow sets PR base to staged, but checkout is not pinned to staged.
This allows manual dispatch (or default-branch execution) to run from main, create changes from main, and then open a PR against staged.
Problem
Current behavior can produce branch-base mismatch:
- PR target branch: staged
- Working branch source: whichever branch triggered the workflow (often main)
When staged has commits not present in main, this mismatch can cause conflicts, noisy diffs, or missed staged-only context.
Impact
- Higher chance of merge conflicts in bot PRs
- Incorrect or noisy contributor update diffs
- Reduced reliability of automated contributors updates
Reproduction
- Keep repo default branch as main (or manually dispatch workflow from main).
- Run contributors workflow.
- Observe bot branch is created from main.
- Observe PR is opened against staged.
- Compare merge base and diff; branch drift appears.
Solution Plan
- Pin checkout to staged in workflow:
- Add ref: staged under actions/checkout.
- Keep PR base as staged (already configured).
- Optional safeguard:
- Gate job to staged branch context for branch-triggered events.
- Validate:
- Trigger workflow manually and verify source + base are both staged.
- Confirm PR diff contains only expected contributors/readme updates.
Acceptance Criteria
- Workflow always checks out staged before making changes.
- Generated PR branch is always based on staged.
- PR base remains staged.
- Bot PR diffs are clean and limited to contributor updates.
References
Related PR
Summary
The contributors workflow sets PR base to staged, but checkout is not pinned to staged.
This allows manual dispatch (or default-branch execution) to run from main, create changes from main, and then open a PR against staged.
Problem
Current behavior can produce branch-base mismatch:
When staged has commits not present in main, this mismatch can cause conflicts, noisy diffs, or missed staged-only context.
Impact
Reproduction
Solution Plan
Acceptance Criteria
References
Related PR