File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,13 +45,16 @@ jobs:
4545 if : steps.meta.outputs.dependency-group == 'workerd-and-workers-types'
4646 env :
4747 PR_NUMBER : ${{ github.event.pull_request.number }}
48+ REPO : ${{ github.repository }}
4849 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4950 run : |
5051 set -euo pipefail
5152
52- # Pull commits and changed files via the GitHub API.
53- commits_json=$(gh pr view "$PR_NUMBER" --json commits)
54- files_json=$(gh pr view "$PR_NUMBER" --json files)
53+ # Pull commits and changed files via the GitHub API. `--repo` is
54+ # required because this workflow runs without `actions/checkout`,
55+ # so `gh` has no git remote to infer the repo from.
56+ commits_json=$(gh pr view --repo "$REPO" "$PR_NUMBER" --json commits)
57+ files_json=$(gh pr view --repo "$REPO" "$PR_NUMBER" --json files)
5558
5659 fail() {
5760 echo "verified=false" >> "$GITHUB_OUTPUT"
8386
8487 # `gh pr view --json commits` doesn't expose signature info, so look
8588 # it up via the REST commit endpoint.
86- first_verified=$(gh api "repos/${{ github.repository }} /commits/$first_oid" --jq '.commit.verification.verified')
89+ first_verified=$(gh api "repos/$REPO /commits/$first_oid" --jq '.commit.verification.verified')
8790 if [ "$first_verified" != "true" ]; then
8891 fail "first commit (Dependabot) does not have a verified signature"
8992 fi
You can’t perform that action at this time.
0 commit comments