I’m currently writing some custom pipelines for my team to enforce our versioning, commit & merge strategy standards, such as:
- Conventional Commit formatting on the merge commit
- Enforcing squash commits when merging in bug fixes and features
- etc
Is there a way to trigger this pipeline to run when a pull requests title is updated?
The workflow at the moment is quite strict:
When a dev creates their PR, it runs this pipeline automatically ensuring their PR title is correctly formatted, which then fails because:
- The PR auto-complete policy wouldn’t be set, meaning the merge commit and merge strategies are null when hitting the Azure Pull Request REST API
- The developer then needs to correct this and manually re-queue the pipeline
If their PR title is incorrect to begin with, they also need to re-run this pipeline.
Is this something that can be achieved?
Looking at the Azure Trigger Types I don’t see anything immediately.
2
Answers
On Azure DevOps, currently it is not supported to trigger the pipeline when the PR title changed event occurs.
The PR triggers on Azure DevOps can only support below events:
There is no way to trigger a pipeline automatically upon a PR title change. But I would like to suggest you to go with a comment trigger. Since developers anyway need to update the title, they can put a comment to the PR at the same time. That can trigger the pipeline with a minimum manual effort. Following comments can be used.
or
P.S. The one who comments on the PR should have at least write access on the repository to trigger the pipeline.