Hi All,
I have added a custom PR validation script for the UAT and Pre-Prod orgs, which runs PR validation against the respective org before deployment.
However, as shown in the attached image, the validation step is displayed as a clickable link, custom:pr-validation-uat. When I click on it, it redirects me to the pipeline.yml file.
Instead, I would like this link to point directly to the Pull Request (PR) so that clicking on it opens the corresponding PR.
How can I achieve this? I have attached an image for reference.
Hi @Deb Pramanik, that label can't be repointed. Its link is assembled from the commit and the line your pipeline name sits on in the yml, with no input you can set, so it'll keep landing you in bitbucket-pipelines.yml.
A pull request row can appear on that same card, under the branch and under that label. It's driven by the commit. The page asks which PRs contain the commit it built, and links one when the answer is exactly one. Two or none and it draws nothing.
So the useful thing is working out which case you're in. In the tab you're already logged into Bitbucket in, with the hash off run 1979:
https://bitbucket.org/!api/2.0/repositories/WORKSPACE/REPO/commit/COMMIT/pullrequests
That's the call the results page makes, so whatever comes back is what the page saw. Read repo_indexed in the response as well as the count.
If the commit is in two PRs there's nothing to configure, the row gets dropped on purpose. The one that reliably carries a link is a pull-requests pipeline, which uses the PR the build belongs to and skips the lookup, though it swaps out your custom row and fires on create and update, so you'd give up choosing when it runs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.