PR done on one repo triggers the existing pipeline

Copper Contributor

Hi, 

I am trying to do PR on dev branch to main branch in a new repository on Azure Devops git , there is no trigger configured on this new repo , neither any pipeline created with this new repo.

However,  when PR is created , it triggers the build existing pipeline which is managed by totally separate repo and has not reference to new repo which is being worked on. 

Following is trigger settings on the existing pipeline :

trigger:
  batchtrue
  branches:
    include:
    - '*'
 
I have tried creating another new repo , however,  its behaving the same way. 
2 Replies
This issue is likely caused by the trigger settings on the existing pipeline you mentioned. The trigger setting "include: '*'" means that the pipeline will be triggered for all branches in the repository, including new branches. To prevent the pipeline from being triggered for the new repository, you can change the trigger setting to include only the branches that you want the pipeline to run on. You can also remove the trigger settings and configure build pipeline on the new repository.

You could also consider creating a new pipeline with new trigger settings that only include the branches you want it to run on and link it to your new repository.

You can also use the Azure DevOps REST APIs to check the list of all the pipelines and triggers and delete the unwanted ones, if the above solution doesn't work.

Thanks @varunmittal 

 

The thing is that I am doing PR for totally different repo , why it should trigger the build for another pipeline which is using separate repo.   The reason for putting "*" for branch was that any developer can use any branch name and merge with main branch.