Skip to content

Action fails when PR is submitted from a fork #9

@per1234

Description

@per1234

When a PR is submitted from a fork, the GitHub access token provided by ${{ secrets.GITHUB_TOKEN}} is downgraded to read-only. This causes the attempt to label the PR to fail:

Resource not accessible by integration

This has been discussed at actions/labeler#12.

The only workaround I've found is running the action from a scheduled workflow, as they started out to do in the actions/labeler action (actions/labeler@375fca6). However, as they realized, it's not so simple as just changing a couple lines in the workflow configuration. The action code likely needs significant reworking as well. I managed to get this working in an action that comments on PRs.

If you don't want to rework the action, the next best thing would be to document the limitation in the readme. Even if the action is limited to labeling issues, that's still very useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions