toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

Consider to expose the `triggering_actor` in context.

Open ZheSun88 opened this issue 3 years ago • 1 comments

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

ZheSun88 avatar Aug 03 '22 06:08 ZheSun88

+1, so often we have to deal with const actor = process.env.GITHUB_TRIGGERING_ACTOR ?? context.actor;, which feels always hacky and unstable 🙈

cmaster11 avatar Jun 27 '24 03:06 cmaster11