jenschelkopf / issue-label-notification-action

An action to notify individuals or teams when specific labels are added to an issue.
28 stars 22 forks source link

Action does not fire if a bot labels the issue #7

Closed BrianTJackett closed 4 years ago

BrianTJackett commented 4 years ago

I am working on a scenario that a GitHub action workflow will fire when issues are created.

Not working - bot labels the issue If the issue contains specific text then an action will automatically add a label to the issue using the context of a bot. In this scenario the issue label notification never fires.

Example https://github.com/BrianTJackett/issue-notification-workflow/issues/11

Working - user labels the issue If I change the auto labeler to use a personal access token (PAT) the label is added as my own account and not a bot. In this scenario the issue label notification does fire.

Example https://github.com/BrianTJackett/issue-notification-workflow/issues/12

Is there a reason why this action would not fire when a bot labels the issue? Thanks for providing this community action and any help you can offer.

jenschelkopf commented 4 years ago

Hey @BrianTJackett, thanks for the issue. I'm not sure why the workflow wouldn't trigger when a bot adds a label. I'll take a look!

jenschelkopf commented 4 years ago

Hey @BrianTJackett, currently you cannot trigger new workflow runs using the GITHUB_TOKEN. This is documented here: https://help.github.com/en/actions/reference/events-that-trigger-workflows#webhook-events

Here's a screenshot:

Screen Shot 2020-05-19 at 10 43 05 AM

I'm not sure why this is, and what you're doing certainly seems like a reasonable thing! I've opened an issue internally to see if we can get that changed. In the meantime, continue using the PAT.

BrianTJackett commented 4 years ago

Thanks for the background info. I'm ok with the workaround of using a PAT for the time being. Closing this issue but if you do hear any updates feel free to re-open / post in here.