A Pull Request, merged through gh pr merge did not start a workflow that was listening on pull_request with type closed.
It seems like the pull_request closed event was not registered or somehow did not start the workflow that is listening on this event.
I have a workflow that should be triggered on pull_requestclosed events:
name: Backport on pull_request[closed]
on:
pull_request:
types: [closed]
jobs:
backport:
name: Backport
runs-on: ubuntu-latest
....
Another workflow can be run manually, which runs a shell script that creates and merges a pull request, and then cleans up the mess it created (delete the new branches and reverts the merge).
Merging the pull request, should then trigger the above mentioned workflow. However, this does not happen.
Could it be that the time that the pull request is open is important for the closed event to be triggered? Because of the automation, the Create and the Merge happen practically immediately after each other. Or is there something else I’m missing?
It feels like a bug to me, because the pull request is clearly merged (and thus closed), so the pull_request closed event should’ve triggered the workflow.
Add a bulleted list, <Ctrl+Shift+8>Add a numbered list, <Ctrl+Shift+7>Add a task list, <Ctrl+Shift+l>
Directly mention a user or teamReference an issue or pull request
Add heading textAdd bold text, <Ctrl+b>Add italic text, <Ctrl+i>Add a bulleted list, <Ctrl+Shift+8>Add a numbered list, <Ctrl+Shift+7>Add a task list, <Ctrl+Shift+l>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.
-
A Pull Request, merged through
gh pr merge
did not start a workflow that was listening onpull_request
with typeclosed
.It seems like the pull_request closed event was not registered or somehow did not start the workflow that is listening on this event.
I have a workflow that should be triggered on
pull_request
closed
events:Another workflow can be run manually, which runs a shell script that creates and merges a pull request, and then cleans up the mess it created (delete the new branches and reverts the merge).
Merging the pull request, should then trigger the above mentioned workflow. However, this does not happen.
See:
Could it be that the time that the pull request is open is important for the closed event to be triggered? Because of the automation, the Create and the Merge happen practically immediately after each other. Or is there something else I’m missing?
It feels like a bug to me, because the pull request is clearly merged (and thus closed), so the pull_request closed event should’ve triggered the workflow.
Beta Was this translation helpful? Give feedback.
Seems I did not read📍 The GitHub Actions Guidepost well enough.
Solution: