# "Rebuild PR if a label is added" not working

**URL:** <https://forum.buildkite.community/t/rebuild-pr-if-a-label-is-added-not-working/1742>\
**Category:** General\
**Created:** [September 29, 2021, 4:58pm UTC](https://forum.buildkite.community/t/rebuild-pr-if-a-label-is-added-not-working/1742 "2021-09-29T16:58:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pikachu](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pikachu](https://forum.buildkite.community/u/pikachu)\
**Post date:** [September 29, 2021, 4:58pm UTC](https://forum.buildkite.community/t/rebuild-pr-if-a-label-is-added-not-working/1742/1 "2021-09-29T16:58:46Z")

</div>

Hi, My repository is on GitHub and I am trying to rebuild the PR when a new label is added.

My pipeline step is using an “if” condition like below

`if: build.pull_request.labels includes "my_shiny_label"`

Also, I have enabled this option in pipeline settings - “Rebuild pull requests when labels are changed”.

When I create a new PR, the build for the PR runs. But when I add the “my\_shiny\_label” label to the PR, the new build is not triggered.

Am I missing a step?

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [September 29, 2021, 8:33pm UTC](https://forum.buildkite.community/t/rebuild-pr-if-a-label-is-added-not-working/1742/2 "2021-09-29T20:33:48Z")

</div>

Hi @pikachu!

Welcome to the community! 😊  
Could you check if your pipeline also has enabled the option “skip pull request builds for existing commits” ? If that is the case, a new build is not going to be created on label change because the commit stays the same.

Cheers!

---

<div class="post-metadata">

**Author:** ![pikachu](https://avatars.discourse-cdn.com/v4/letter/p/9d8465/32.png) [@pikachu](https://forum.buildkite.community/u/pikachu)\
**Post date:** [October 13, 2021, 12:09pm UTC](https://forum.buildkite.community/t/rebuild-pr-if-a-label-is-added-not-working/1742/3 "2021-10-13T12:09:43Z")

</div>

Yea, That was the case. Thanks/
