Event not getting triggered on pull request label
nikhil-bidgely opened this issue · 4 comments
I've created a workflow with two events on: [pull_request_review, pull_request]
. The entire flow gets triggered on reviews e.g. Approvals on PR.
But when the PR is labeled the workflow isn't getting triggered, sample PR: https://github.com/nikhilaii93/testing/pull/2.
As per documentation pull_request covers labeled even but it's not happening. Please look into this and let me know. The workflow file is at triggerBuild
You need to opt-in to the label event like so:
on:
pull_request:
types: [labeled]
According to the docs only the opened
, synchronized
, and reopened
events trigger the pull_request
event by default, the rest you need to opt-in to.
@xt0rted Thanks for pointing this out, I couldn't have figured this out. Can you please answer a couple more questions?
- Is it possible to disable the default events? Like not triggering the event when a pull request is opened.
- Also, multiple instances of a workflow can get triggered in parallel. Is it possible to restrict it to just one at a time?
I'm not sure, you should try asking on the community forum. That's where the team has been answering questions like this. https://github.community/t5/GitHub-Actions/bd-p/actions
@xt0rted Thanks, I'm closing the issue.