Skip to content

Commit 8b88dfc

Browse files
authored
Merge pull request #210 from omacom/ci/vouch-list-from-branch-tip
ci: read the vouch list from the target branch's tip
2 parents 99cb1a7 + 03bba9e commit 8b88dfc

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎.github/workflows/kernel-ci-jobs.yml‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,21 @@ jobs:
6161
persist-credentials: false
6262
filter: blob:none
6363
sparse-checkout: tools/aurora-ci
64-
# From the target branch, never the pull request: a pull request must
65-
# not vouch for its own author. Without the list (the branch does not
66-
# have one yet, or the API fails) no author is trusted.
64+
# From the target branch's tip, never the pull request: a pull request
65+
# must not vouch for its own author. Not pull_request.base.sha, which
66+
# stays at the base the pull request was opened against. Without the
67+
# list (the API fails) no author is trusted.
6768
- name: Read the vouch list from the target branch
6869
if: github.event_name == 'pull_request'
6970
env:
7071
GH_TOKEN: ${{ github.token }}
71-
BASE_SHA: ${{ github.event.pull_request.base.sha }}
72+
BASE_REF: ${{ github.event.pull_request.base.ref }}
7273
run: |
7374
if ! gh api -H "Accept: application/vnd.github.raw+json" \
74-
"repos/$GITHUB_REPOSITORY/contents/.github/VOUCHED.td?ref=$BASE_SHA" \
75+
"repos/$GITHUB_REPOSITORY/contents/.github/VOUCHED.td?ref=refs/heads/$BASE_REF" \
7576
> "$RUNNER_TEMP/VOUCHED.td"; then
7677
: > "$RUNNER_TEMP/VOUCHED.td"
77-
echo "::warning title=Vouch list::no .github/VOUCHED.td at $BASE_SHA; no author is trusted"
78+
echo "::warning title=Vouch list::no .github/VOUCHED.td on $BASE_REF; no author is trusted"
7879
fi
7980
- name: Plan the run
8081
id: plan

0 commit comments

Comments
 (0)