Skip to content

Commit 7040f05

Browse files
authored
Check out current base branch for Meta import triage (#60465)
1 parent f7f1ab5 commit 7040f05

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎.github/workflows/meta-import-risk.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
- name: Checkout trusted base
2323
uses: actions/checkout@v6
2424
with:
25-
ref: ${{ github.event.pull_request.base.sha }}
25+
# The PR payload's base.sha can predate the workflow and its helper scripts.
26+
ref: ${{ github.event.pull_request.base.ref }}
2627
persist-credentials: false
2728
# Do this before the model job, including on the PR-opened event: the
2829
# meta-codesync label may not have arrived yet.
@@ -69,12 +70,12 @@ jobs:
6970
risk: ${{ steps.assess.outputs.risk }}
7071
steps:
7172
# pull_request_target has access to the model secret even for fork PRs.
72-
# Only the trusted base commit is checked out; PR code is read as data
73+
# Only the current trusted base branch is checked out; PR code is read as data
7374
# through the GitHub API and is never executed on this runner.
7475
- name: Checkout trusted base
7576
uses: actions/checkout@v6
7677
with:
77-
ref: ${{ github.event.pull_request.base.sha }}
78+
ref: ${{ github.event.pull_request.base.ref }}
7879
persist-credentials: false
7980
- name: Assess changed files and patch with Muse
8081
id: assess
@@ -119,7 +120,7 @@ jobs:
119120
- name: Checkout trusted base
120121
uses: actions/checkout@v6
121122
with:
122-
ref: ${{ github.event.pull_request.base.sha }}
123+
ref: ${{ github.event.pull_request.base.ref }}
123124
persist-credentials: false
124125
- name: Apply Meta Review Required when needed
125126
uses: actions/github-script@v8

0 commit comments

Comments
 (0)