On: Issues: not firing when Issue is Created by Another Action

Super confused by this at the moment.

I have an On: Issues: action setup and it’s working exactly as I’d expect on its own. For instance I can make manual or API Issue changes (create,delete,assign,etc.) and the action works as expected.

My problem is that I have another action that performs a task and at the end of that task creates an issue. When this issue is created it does /not/ trigger the above mentioned action.

My current theory is that events caused from within an action are somehow unavailable to another action but I have no proof of this.

Anyone have an explanation as to why this is happening or where I can look for more information?

Appreciate any insight,

Thanks.

@anthonyherman ,

When you create an issue in another workflow, do you use the GITHUB_TOKEN to authenticate? If so, it is a correct behavior that no workflow run triggered for the issues event.

There is a note you need to know, you also can reference the docs about authenticating with the GITHUB_TOKEN:

Events triggered by the GITHUB_TOKEN will not create a new workflow run, this prevents you from accidentally creating recursive workflow runs.

So, you should create a personal access token and set it as a secret in your repository, then use this personal access token to authenticate. But you also should avoid the recursive workflow runs.

2 Likes

Excellent, thank you. I was indeed using the GITHUB_TOKEN. Thanks for this!

@anthonyherman Oh man I just had a similar issue and was lucky to find this thread.  I was worried I would have to spend a day coming up with an entirely new solution.

@brightran Can that doc be updated so the note about the GITHUB_TOKEN not triggering events is prominently featured?

@chingc ,

When you open the link of the docs I posted above, you can see in the docs, it has used a separate paragraph to explain this point in detail at the beginning of the section “Using the GITHUB_TOKEN in a workflow”.

I think this is enough for users to pay attention to this point when reading the docs.