Skip to content

Fine grained access token instructions in the github actions repository_dispatch documentation #23176

@Denubis

Description

@Denubis

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#create-a-repository-dispatch-event via https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch

What part(s) of the article would you like to see updated?

At present, the documentation for repo_dispatch indicates that the token needs "repo" scope. Using the fine-grained-actions (beta), it took me a fair amount of time to confirm that Actions: read and write is sufficient to make a webhook invocation token. While fine-grained-actions is still in beta, it may be worth updating this documentation.

Specifically, the most important action permission, [POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches](https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event) (write) is third from the bottom, and I had to resort to ctrl-f to find it, which is why I wasn't certain that this was the correct permission. I'm now testing to see if this finely scoped permission is also sufficient for the task.

Additional information

Update: It turns out that that permission is necessary, but not sufficient. It would be nice to have the full minimum set of permissions necessary in repository_dispatch to trigger one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    actionsThis issue or pull request should be reviewed by the docs actions teamcontentThis issue or pull request belongs to the Docs Content teamrestContent related to rest - overview.waiting for reviewIssue/PR is waiting for a writer's review

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions