Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .github/workflows/commit-queue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ jobs:
# permissions neither task needs. The app happens to satisfy them today;
# tightening its permissions, or installing it somewhere with fewer,
# would break these silently behind the `|| true`. The endpoints below
# need only the pull request permission the app already has, and the
# label one names a single label rather than trusting a flag to be
# subtractive.
# need the app's `Issues: write` -- labels and comments are issue
# endpoints even when the number is a pull request's -- and the label one
# names a single label rather than trusting a flag to be subtractive.
- name: Take the label back off
if: always() && steps.token.outcome == 'success'
env:
Expand All @@ -100,6 +100,22 @@ jobs:
"repos/${GITHUB_REPOSITORY}/issues/${NUMBER}/labels/$(jq -rn --arg l "$LABEL" '$l|@uri')" \
|| true

# Everything that reports back needs the app's token, so a token that
# never minted leaves a bare red check and no reason for it -- the label
# still on, nothing said, in the one failure that greets a queue nobody
# has run yet. An annotation needs no token and no permission, so this is
# the one report that always survives.
- name: Say why no token could be minted
if: failure() && steps.token.outcome != 'success'
run: |
echo '::error title=The commit queue could not authenticate::' \
'No installation token could be minted, so nothing was read and' \
'nothing was merged. Either the app is not installed on this' \
'repository, or LAND_APP_ID / LAND_APP_PRIVATE_KEY is wrong --' \
'the private key must be the whole PEM, BEGIN and END lines' \
'included. The label is still on this pull request, and' \
'reapplying it starts nothing until it is taken off first.'

- name: Say why it did not land
if: failure() && steps.token.outcome == 'success'
env:
Expand Down