# Add triggers based on Github PR labels

**URL:** <https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107>\
**Category:** Website\
**Created:** [May 17, 2018, 9:06am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107 "2018-05-17T09:06:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![abu\_tapptic](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/abu_tapptic/32/1495_2.png) [@abu\_tapptic](https://discuss.bitrise.io/u/abu_tapptic)\
**Post date:** [May 17, 2018, 9:06am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/1 "2018-05-17T09:06:01Z")

</div>

## Description of the feature request

I would like to be able to trigger a specific workflow based on the label/labels of a PR.

## Use case / for what or how I would use it

When using a mono repo for several projects, we specify with labels which project a PR concerns. I would then use the trigger feature on Bitrise to launch the right workflow based on the label.

For a repo with a single project I could also use labels to specify on which environment the PR should be tested or which target of my project it concerns. The trigger feature would allow me to launch the right workflow based on the label.

Thanks for hearing me out, I hope this feature request will interest other users 🙂

---

<div class="post-metadata">

**Author:** ![p.val](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/p.val/32/1506_2.png) [@p.val](https://discuss.bitrise.io/u/p.val)\
**Post date:** [May 23, 2018, 1:02pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/2 "2018-05-23T13:02:13Z")

</div>

Hey!

I’m facing now exactly the same need. It seems this could be done using [Github trigger](https://developer.github.com/v3/activity/events/types/#pullrequestevent) but it’s not so easy as it could be with Bitrise support.

Did you find any workaround in a meanwhile waiting for a feature request?

---

<div class="post-metadata">

**Author:** ![asos-petergoldsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/asos-petergoldsmith/32/1154_2.png) [@asos-petergoldsmith](https://discuss.bitrise.io/u/asos-petergoldsmith)\
**Post date:** [May 30, 2018, 11:40am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/3 "2018-05-30T11:40:17Z")

</div>

We would find this **EXTREMELY VALUABLE**! Currently we are planning on digesting the Github hooks for these in Azure Funcitons and then calling out to the Bitrise API.

The other event we would **LOVE** is `PullRequestReviewEvent`. Being able to trigger a workflow on the back of a reviewer’s approval would be magical.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 2, 2018, 6:17pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/4 "2018-06-02T18:17:18Z")

</div>

Just a question: what would happen if you don’t add a label to the PR? Or if you change the label on the PR?

In general we favour features which don’t require manual steps like adding **the right** labels to a PR. I definitely see your point and why this feature would be great, just wondering if we already have a solution for the problem, just not this solution 😉

@abu_tapptic & @p.val : I believe your use case is that you have a Mono Repo setup. Is that right? Because if it is, then we just released a related feature, for mono repo setups, to make it simple to filter based on paths: [https://blog.bitrise.io/build-parts-of-your-mono-repo-separately](https://blog.bitrise.io/build-parts-of-your-mono-repo-separately)  
Using this you’d register your separate apps/projects as separate apps on [bitrise.io](http://bitrise.io) but you can specify filters based on paths.

@petergoldsmithasoste definitely sounds interesting, but could you please share a bit more detail / a use case for what you’d like to use this feature? There might be a feature which already exists and can help to achieve what you want to do 😉

---

<div class="post-metadata">

**Author:** ![p.val](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/p.val/32/1506_2.png) [@p.val](https://discuss.bitrise.io/u/p.val)\
**Post date:** [June 4, 2018, 8:10am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/5 "2018-06-04T08:10:54Z")

</div>

@viktorbenei I saw the mono repo feature but I have a bit different use case. I want to trigger the workflow (that runs the set of code checks and tests) once the PR “ready to be checked”.

Two ways I see now are:

- a trigger for review status (run on “Approve review” action)
- the trigger for the label (run on label “Ready to be merged” was set)

Do you see any simple way to achieve this goal?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 6, 2018, 4:26pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/6 "2018-06-06T16:26:21Z")

</div>

> [@p.val](#):
>
> Two ways I see now are:

Is there a reason why you can’t run the CI before you’d add the label?

The reason why we try to automate these on code push is that ideally once you get to do a review, the CI build should already report the status, so that if the PR is accepted it can be merged immediately instead of then waiting for the CI build’s status.

---

<div class="post-metadata">

**Author:** ![p.val](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/p.val/32/1506_2.png) [@p.val](https://discuss.bitrise.io/u/p.val)\
**Post date:** [June 7, 2018, 7:50am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/7 "2018-06-07T07:50:59Z")

</div>

I’m using pricing plan with 1 parallel execution. Sometimes I have more then 1 PR opened and different developers working on them in parallel. Every time they push minor change the build starts and push Slack message at the end.

We use labels in order to highlight that PR is ready for review, so only after the label was set the code checks start to make sense. Everything gunned before is kind of idle use both for us and for Bitrise. Moreover, it spams Slack channel a bit more then I would like.

The perfect case for us could be to run the workflow on PR’s approval or label change. Of course, I’m opened to other solutions.

---

<div class="post-metadata">

**Author:** ![asos-petergoldsmith](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/asos-petergoldsmith/32/1154_2.png) [@asos-petergoldsmith](https://discuss.bitrise.io/u/asos-petergoldsmith)\
**Post date:** [June 7, 2018, 10:10am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/8 "2018-06-07T10:10:46Z")

</div>

We would like a similar _workflow_. One particular set of steps for all pushes (unit tests) pre reviewer’s approval. Once the reviewer approves the PR, a second set of steps (our longer running ui test suite) should run, and merge automatically (using Danger for that).

Currently because there is no trigger for us to react to Label addition / comment made / reviewer approval, the final reviewer of a PR needs to logon to Bitrise and trigger the workflow manually, but this has a pitfall of not being a ‘PR’ based trigger, so PR based ENV vars are not available, and it also doesn’t attempt to do the merge into the target branch.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 20, 2018, 11:57am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/9 "2018-06-20T11:57:50Z")

</div>

@p.val makes sense. Worth to note that there is an existing solution to NOT to start a build, the `[skip ci]` flag. In case of PRs you can add this to the **title of the PR** and while it’s in the PR’s title no builds will be started. Related docs: [https://devcenter.bitrise.io/tips-and-tricks/skip-a-build/#pull-requests](https://devcenter.bitrise.io/tips-and-tricks/skip-a-build/#pull-requests)

Once it’s ready for a PR build you can simply just remove the `[skip ci]` text from the PR title and that will start a build. Not as elegant as a label, but it definitely works and available today 🙂

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [June 20, 2018, 3:21pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/10 "2018-06-20T15:21:43Z")

</div>

@asos-petergoldsmith so you actually want to run builds just different builds based on the label. That’s indeed not possible right now.

A workaround for now might be to do a full _git flow_ process, where a PR is merged into an integration branch (usually `develop`) which can have a more thorough test suite, and then if that passes it can be merged into the release branch (usually `master`).

Definitely not as elegant as the labels, on the other hand it’s harder to forget about running those additional test suites (should be impossible if the PR target is configured properly) vs forgetting to add the proper label.

Having both options would be even better of course 😉 Thanks for the details!

---

<div class="post-metadata">

**Author:** ![bootstraponline](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@bootstraponline](https://discuss.bitrise.io/u/bootstraponline)\
**Post date:** [September 5, 2018, 8:16pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/11 "2018-09-05T20:16:19Z")

</div>

Trigger by github comment would be amazing.

---

<div class="post-metadata">

**Author:** ![Macarse](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/macarse/32/1561_2.png) [@Macarse](https://discuss.bitrise.io/u/Macarse)\
**Post date:** [September 7, 2018, 8:22am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/12 "2018-09-07T08:22:34Z")

</div>

what’s the status of this feature req?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [September 11, 2018, 4:22pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/13 "2018-09-11T16:22:27Z")

</div>

On our roadmap but no ETA yet @Macarse

---

<div class="post-metadata">

**Author:** ![moataznabil](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/moataznabil/32/3580_2.png) [@moataznabil](https://discuss.bitrise.io/u/moataznabil)\
**Post date:** [July 30, 2019, 9:26pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/14 "2019-07-30T21:26:32Z")

</div>

Hi , Any updates about this feature ?

---

<div class="post-metadata">

**Author:** ![ahvth-bitrise](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/ahvth-bitrise/32/2468_2.png) [@ahvth-bitrise](https://discuss.bitrise.io/u/ahvth-bitrise)\
**Post date:** [August 1, 2019, 10:58am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/15 "2019-08-01T10:58:08Z")

</div>

Hi @moataznabil! Still don’t have an ETA, but it continues to be on our roadmap. Thanks for your inquiry.

---

<div class="post-metadata">

**Author:** ![ssiddh](https://avatars.discourse-cdn.com/v4/letter/s/2acd7d/32.png) [@ssiddh](https://discuss.bitrise.io/u/ssiddh)\
**Post date:** [January 6, 2020, 10:54pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/16 "2020-01-06T22:54:38Z")

</div>

Is there any update on this?

---

<div class="post-metadata">

**Author:** ![cathy.harmon](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/cathy.harmon/32/2674_2.png) [@cathy.harmon](https://discuss.bitrise.io/u/cathy.harmon)\
**Post date:** [January 13, 2020, 5:25pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/17 "2020-01-13T17:25:53Z")

</div>

Sorry - no ETA at this time.

---

<div class="post-metadata">

**Author:** ![bhavana-util](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bhavana-util](https://discuss.bitrise.io/u/bhavana-util)\
**Post date:** [May 13, 2020, 7:07am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/18 "2020-05-13T07:07:06Z")

</div>

Any ETA for this feature? I think its been 2 years.

---

<div class="post-metadata">

**Author:** ![alessandrodn](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@alessandrodn](https://discuss.bitrise.io/u/alessandrodn)\
**Post date:** [July 22, 2020, 6:40am UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/19 "2020-07-22T06:40:38Z")

</div>

Hi guys, do we have any update on this? It would definitely improve our workflow 🙂

---

<div class="post-metadata">

**Author:** ![gpetty](https://avatars.discourse-cdn.com/v4/letter/g/2bfe46/32.png) [@gpetty](https://discuss.bitrise.io/u/gpetty)\
**Post date:** [December 8, 2020, 9:39pm UTC](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107/20 "2020-12-08T21:39:14Z")

</div>

Any update? I would love to use this feature.

[Next page](https://discuss.bitrise.io/t/add-triggers-based-on-github-pr-labels/5107.md?page=2)
