Skip to content

AI workflow fails on forks #767

Description

@miaulalala

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejection. This issue is pending approval.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions