Skip to content

Accept stacked PR base branches in analyze-pr - #59109

Open
huntie wants to merge 1 commit into
mainfrom
pr59109
Open

huntie wants to merge 1 commit into
mainfrom
pr59109

Conversation

@huntie

@huntie huntie commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The analyze_pr check fails every PR in a stack above the first (example: #58867), since each targets the branch of the PR below it rather than main or a -stable branch.

  • Pass the branch target check when the base branch is the head of another open PR in the repo.
  • Other base branches still fail as before, and the parent PR's own check still guards its target.

NOTE: The workflow runs on pull_request_target from main, so this takes effect only after it lands.

Changelog: [Internal]

Test Plan

yarn jest .github/workflow-scripts/__tests__/checkBranchTarget-test.js

Checked the lookup the workflow makes against GitHub:

gh api 'repos/react/react-native/pulls?state=open&head=react:pr58950'

✅ Returns #58950, so #58951 (based on pr58950) will pass.
ℹ️ A non-PR branch returns no results and still fails.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 15, 2026
@facebook-github-tools facebook-github-tools Bot added p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Oct 15, 2026

This branch has not been deployed

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant