"Rebuild PR if a label is added" not working

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?

Hi @pikachu!

Welcome to the community! :blush:
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.


Yea, That was the case. Thanks/

1 Like