[GH-ISSUE #187] Event not getting triggered on pull request label #671

Closed
opened 2026-04-15 04:00:18 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @nikhil-bidgely on GitHub (Sep 17, 2019).
Original GitHub issue: https://github.com/sdras/awesome-actions/issues/187

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

Originally created by @nikhil-bidgely on GitHub (Sep 17, 2019). Original GitHub issue: https://github.com/sdras/awesome-actions/issues/187 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](https://github.com/nikhilaii93/testing/blob/master/.github/workflows/triggerbuild.yml)
Author
Owner

@xt0rted commented on GitHub (Sep 18, 2019):

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.

<!-- gh-comment-id:532481724 --> @xt0rted commented on GitHub (Sep 18, 2019): You need to opt-in to the label event like so: ```yaml on: pull_request: types: [labeled] ``` According to [the docs](https://help.github.com/en/articles/events-that-trigger-workflows#example-triggering-workflows-when-a-pull_request-is-assigned) only the `opened`, `synchronized`, and `reopened` events trigger the `pull_request` event by default, the rest you need to opt-in to.
Author
Owner

@nikhil-bidgely commented on GitHub (Sep 18, 2019):

@xt0rted Thanks for pointing this out, I couldn't have figured this out. Can you please answer a couple more questions?

  1. Is it possible to disable the default events? Like not triggering the event when a pull request is opened.
  2. Also, multiple instances of a workflow can get triggered in parallel. Is it possible to restrict it to just one at a time?
<!-- gh-comment-id:532503028 --> @nikhil-bidgely commented on GitHub (Sep 18, 2019): @xt0rted Thanks for pointing this out, I couldn't have figured this out. Can you please answer a couple more questions? 1. Is it possible to disable the default events? Like not triggering the event when a pull request is opened. 2. Also, multiple instances of a workflow can get triggered in parallel. Is it possible to restrict it to just one at a time?
Author
Owner

@xt0rted commented on GitHub (Sep 18, 2019):

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

<!-- gh-comment-id:532505698 --> @xt0rted commented on GitHub (Sep 18, 2019): 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
Author
Owner

@nikhil-bidgely commented on GitHub (Sep 18, 2019):

@xt0rted Thanks, I'm closing the issue.

<!-- gh-comment-id:532505843 --> @nikhil-bidgely commented on GitHub (Sep 18, 2019): @xt0rted Thanks, I'm closing the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-actions#671