简体   繁体   English

合并后Azure管道(VSTS)上的npm版本

[英]npm version on Azure Pipelines (VSTS) upon merge

We are holding a CI pipeline to run on every PR. 我们拥有一条在每个PR上运行的CI管道。
Once a PR marked as completed, it auto merge the code to master branch. PR标记为完成后,它将自动将代码合并到master分支。

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. 我们想使用npm version更新package.json中的npm version ,但是,我们有一个分支策略来防止直接推送到master分支。

How can we apply the npm version command upon the PR completion and make it commit the new version to master ? 我们如何在PR完成时应用npm version命令,并使其将新版本提交给master

You can grant Bypass Branch Policies permissions to a specific user, then he can push the directly to the master: 您可以向特定用户授予“ 绕过分支机构策略”权限,然后他可以将“直接”推送给主用户:

在此处输入图片说明

The permissions are managed in along with other Git permissions. 权限与其他Git权限一起管理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM