I need to trigger the pipeline(CI) when any change is made (directly to the branch or by merging a PR) to my_branch, my yml trigger configuration is like this -
trigger:
batch: true
branches:
include:
- my_branch
paths:
include:
- path/of/the/directory
This works fine if a work item is attached with a PR and the PR is merged with the my_branch.
But, when there is no work item attached to a PR - CI is not triggering after merging the PR.
Am I missing anything?
I tried to reproduce the same in my environment and got the results successfully like below:
Step 1: Created a sample repository. (No branch policies are applied at this stage)
Step 2: Create a basic
yamlbuild pipeline as below.Step 3: Create a new branch from the main branch.
Step 4: Modify or add some code to the newly created branch and create a Pull Request to the main branch and verify build pipeline.
Note: As I did not set any pull request policies on the main branch, the build pipeline will get triggered only after the feature branch merged to the main branch.