AI workflow fails on forks
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 24
- Forks
- 11
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 15
Description
The AI Policy workflow (ai-policy.yml, check-ai-trailers job) fails on fork PRs when trying to apply the "AI assisted" label (ex: https://github.com/nextcloud/server#60070).
It 403s on both the label-create and label-assign calls because GitHub forces a read-only token (and withholds secrets) for pull_request-triggered runs from forks. The job's issues: write permissions and COMMAND_BOT_PAT fallback don't help.
The labeling step also has no || true, so it hard-fails the whole job, including the real policy check; even when there's no actual violation.
Suggestion: split workflow into two. Keep detection/policy-failing logic on pull_request (read-only), move the label-writing step to a separate pull_request_target-triggered job/workflow.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .github/workflows/ai-policy.yml and the check-ai-trailers job. Review the policy detection and labeling steps, then test the workflow behavior on a pull request from a fork, focusing on the read-only token and withheld secrets. Done means policy failures still work while label-writing no longer causes fork PR checks to fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions
- Domain
- ci-cd, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100