I am trying to use the Create PR task in a pipeline to merge changes from my source branch to target branch (master). I want to bypass the policies of having reviewers and linking work item. I changed the configuration for my project collection service account(which creates the automated PR) for contribute to pull request to “Allow”, Bypass policies while completing pull requests to “Allow”, Bypass policies when pushing to “Allow”. However, the policy is not getting bypassed and I still get the prompt to link work items to complete my PR.
So I am using the create PR task which automatically creates a PR in a classic pipeline. According to my project, it is the Project collection build service account that generates this PR. So I enabled the below permissions for it. Now, it creates a PR successfully but while merging to master it still goes through the policies which exist for master branch even though i have set the bypass policies to true.
permission
Now, the solution mentioned above for build validation only has option to check for build success status. I specifically want to bypass the reviewer, work item linking policy just for this one account. I migrated to repositories -> branch -> master and there I provided the above account with permissions.
basically, i do not want to bypass for all user accounts, i want to bypass for ‘project collection build service’ which i already did. But if you check the below screenshot, i still see the rejection to merge because of not linking work item and not providing reviwers.
PR
Does this have to do something with respect to:
Configured policies are always evaluated for pull request changes. For users that have bypass policy permissions, the reported policy status is advisory only. If the user with bypass permissions approves, the failure status doesn’t block pull request completion. reference: https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies?view=azure-devops&tabs=browser
Because i am logged in with my user name and not as project collection build service account.
Dharmi Mehta is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.