Hi,
we have a pipeline which is defined using the "pull-requests" keyword. See https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Pull-Requests
My problem is that when running that pipeline manually from UI (e.g. because "[no ci]" was added previously to commit message) the pipeline does not behave like a pull-request pipeline anymore. Problems arising from this:
My question is: Can this be considered a bug? As, I have defined the pipeline using the keyword "pull-requests".
Is there any alternative way to make a pipeline behave as a "pull-request" pipeline when triggered manually?
Some background: To reduce costs, we don't want every commit to cause a pipeline run (depending on a developer's git usage habit, a pull-request can have many commits). So, we would like to somehow run the pipelines manually only when needed. But, currently, it's not possible to do that without losing the "pull-request" pipeline behavior.
Thank you for any help.
Regards
Milad
Hi Milad,
When triggering a pipeline manually from our website, it is possible to trigger it only for a branch or a certain commit. There is no option to trigger a pull-requests pipeline for a certain PR. I can create a feature request for our development team to consider, please feel free to let me know if you'd like me to do that.
In the meantime, you can work around this issue in one of the following two ways:
1. In a clone of the repo, create an empty commit on the source branch without the [skip ci] option:
git commit --allow-empty -m "Empty commit to trigger the pull-requests pipeline"
When you push that commit to the source branch, the pull-requests pipeline will be triggered.
2. You can use our API to trigger a pull-requests pipeline for a specific PR:
This will work even if the last commit of the source branch has [skip ci] in its message.
Please feel free to let me know if you have any questions!
Kind regards,
Theodora
Hi Theodora,
I was not aware of these options, so thanks for sharing them. I will discuss it with my team, and we will somehow manage with them for the moment.
Furthermore, I would also be happy for you to create a feature request for this, as I think having a UI option would be more user-friendly. Could you please share the link here so I can watch it?
Thank you.
Milad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Milad,
You are very welcome.
I created the feature request:
You can add your vote (by selecting the Vote for this issue link) and also add yourself as a watcher (by selecting the Start watching this issue link).
Implementation of features is done as per our policy here and any updates will be posted in the feature request.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.