Bitbucket "pull-requests:" Pipeline Not Triggering
A pull-requests: pipeline runs only when a pull request is open for the source branch and the branch matches the section’s glob. Missing any of those and the PR build never fires.
What this error means
You expected PR-specific checks to run, but only the branches:/default: pipeline ran (or nothing did). The pull-requests: section is absent, its glob does not match, or there is no open PR for the branch.
pipelines:
pull-requests:
'feature/*': # only matches feature/* source branches
- step: { script: [ ./pr-checks.sh ] }Common causes
No pull-requests section or non-matching glob
PR pipelines come from pipelines: pull-requests:. Without that section, or with a glob that does not match the source branch, no PR-specific pipeline runs.
No open pull request for the branch
The pull-requests: pipeline only triggers while a PR is open from that branch. A push with no PR open runs the branches:/default: pipeline instead.
How to fix it
Add a matching pull-requests section
Define the PR pipeline with a glob that matches your source branches (use ** for all).
pipelines:
pull-requests:
'**':
- step:
name: PR checks
script: [ ./pr-checks.sh ]Confirm a PR exists and the glob matches
- Open a pull request from the source branch if none exists.
- Check the glob matches the source branch name.
- Remember
pull-requests:runs in addition to (not instead of) other triggers per Bitbucket’s rules.
How to prevent it
- Include a
pull-requests:section for PR-only checks. - Use
**or a glob that matches your real source branches. - Remember PR pipelines require an open PR for the branch.