toolkit
toolkit copied to clipboard
Consider to expose the `triggering_actor` in context.
Describe the enhancement
based on an recent policy change, the original actor will always return the initial run's actor. so this value will not be changed when the rerun has done by a different user.
Code Snippet
currently, if you want to get the value, you need to process.env.GITHUB_TRIGGERING_ACTOR;
with the help of this library, it can be done the same way as other parameter
Additional information created a PR https://github.com/actions/toolkit/pull/1142
+1, so often we have to deal with const actor = process.env.GITHUB_TRIGGERING_ACTOR ?? context.actor;, which feels always hacky and unstable 🙈