0

We are holding a CI pipeline to run on every PR.
Once a PR marked as completed, it auto merge the code to master branch.

We want to update the version in package.json using npm version, however, we have a branch policy to prevent direct push to master branch.

How can we apply the npm version command upon the PR completion and make it commit the new version to master?

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
SagiLow
  • 5,721
  • 9
  • 60
  • 115

1 Answers1

1

You can grant Bypass Branch Policies permissions to a specific user, then he can push the directly to the master:

enter image description here

The permissions are managed in along with other Git permissions.

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114