ci: fall back to github.token in the AI policy workflow - #349
Merged
kyteinsky merged 1 commit intoSep 1, 2026
Conversation
Secrets are not exposed to pull requests from forks, so COMMAND_BOT_PAT is
empty there and the first step fails before it checks anything:
gh: To use GitHub CLI in a GitHub Actions workflow, set the GH_TOKEN
environment variable.
Process completed with exit code 4
check-ai-trailers therefore fails on every PR from a fork, regardless of its
commits. The workflow already requests the permissions it needs, so the default
token can read the commit list.
This is what the organization template in nextcloud/.github already does, and
what nextcloud/spreed carries; this copy predates that change.
Signed-off-by: Baki Burak Öğün <63836730+bakiburakogun@users.noreply.github.com>
kyteinsky
approved these changes
Sep 1, 2026
kyteinsky
left a comment
Contributor
There was a problem hiding this comment.
nice thanks!
although your PRs should have this trailer too :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
check-ai-trailersfails on every pull request from a fork, whatever the commits contain. The first step never gets as far as inspecting them:Secrets are not exposed to
pull_requestruns from forks, sosecrets.COMMAND_BOT_PATis empty andgh apiexits 4.Change
Fall back to
github.token, which is what the organization template in nextcloud/.github already does:nextcloud/spreedalready carries the updated version; this copy predates it. The workflow declares the permissions it needs (contents: read,pull-requests: write,issues: write), so the default token can read the commit list.Noticed because it is the only red check on #343.