How to use the github-actions bot #25863
-
I’ve created a couple of GitHub actions that add labels to an issue and assign it to a user. But, after the action executes the issue reflects that I’m looking for a way to authorise the Any help / links are appreciated. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The GitHub Actions bot already has the permissions you want by default. Simply call the GitHub API using the token that is generated by GitHub Actions in the
Will result in the github-actions bot assigning me to the PR that triggered this workflow: |
Beta Was this translation helpful? Give feedback.
-
Thanks so much @oldskool I had generated an API token and was using that to authenticate the Github API. |
Beta Was this translation helpful? Give feedback.
The GitHub Actions bot already has the permissions you want by default. Simply call the GitHub API using the token that is generated by GitHub Actions in the
GITHUB_TOKEN
secret. For example:Will result in the github-actions bot assigning me to the PR that triggered this workflow: