简体   繁体   English

致力于自动化以批准来自 Logic App Flow 的 Pull Request

[英]working on an automation to approve the Pull Request from Logic App Flow

I am working on automating the approval process of a Pull request(in Azure DevOps) using Logic app.我正在使用逻辑应用程序自动化拉取请求的批准过程(在 Azure DevOps 中)。 I have already built the flow with few conditions to meet and then the flow has to approve the PR automatically if the conditions are met.我已经构建了几乎没有满足条件的流程,然后如果满足条件,流程必须自动批准 PR。

Need suggestion on which action/trigger will approve the Pull request automatically?需要关于哪个操作/触发器将自动批准拉取请求的建议? 在此处输入图像描述

Maybe look at using the relevant REST API...也许看看使用相关的 REST API ...

https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/update https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/update

You can see there are a couple of fields in the payload you'll need to pay attention to, vote being one of them and status being the other.您可以看到负载中有几个字段需要您注意, vote是其中之一, status是另一个。

You'll need to authenticate and to do that, it'll be a matter of picking one of the auth methods listed here...您需要进行身份验证并执行此操作,这将是选择此处列出的一种身份验证方法的问题...

https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/authentication-guidance?view=azure-devops https://learn.microsoft.com/en-us/azure/devops/integrate/get-started/authentication/authentication-guidance?view=azure-devops

PAT is typically the easiest but be sure to restrict it's access in case the key is compromised. PAT 通常是最简单的,但一定要限制它的访问,以防密钥被泄露。

Now having said that, there is a very specific section on auth which you'll need to make sure you adhere to.话虽如此,关于身份验证有一个非常具体的部分,您需要确保遵守该部分。

https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/update?view=azure-devops-rest-7.0#security https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/update?view=azure-devops-rest-7.0#security

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

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