Feature request: automatic GITHUB_TOKEN in workflows that can trigger events #35047
Replies: 2 comments 1 reply
-
I also had this same idea and came here to request this feature. It would be great if we can choose to elevate the permission of the default For example, there could be a new permission called permissions:
workflow-events: write |
Beta Was this translation helpful? Give feedback.
-
If your use case is to automatically update/fix the current branch or pull request, you can use the autofix.ci action. Of course it would be fantastic if this becomes a GitHub feature and I don't have to maintain it anymore. 😃 |
Beta Was this translation helpful? Give feedback.
-
I understand that by default the automatically generated GITHUB_TOKEN in workflows will not trigger any further workflows as a side effect from apis that it calls. As far as I understood the main reason is to avoid accidental recursive calling of workflows.
I think this is a very reasonable default.
The workaround for cases where it actually is desireable that api requests would trigger further workflows is to use a Personal Access Token (PAT). While this works, it is not ideal because it is not possible to limit permissions of a PAT in the same way the automatic GITHUB_TOKEN is limited. And it is cumbersome to setup.
My suggestion is to add a optional job/workflow permission which would enable triggering further workflows as a side-effect of api calls.
Beta Was this translation helpful? Give feedback.
All reactions