I am working on automating the approval process of a Pull request(in Azure DevOps) using Logic app. 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.
Need suggestion on which action/trigger will approve the Pull request automatically?
CodePudding user response:
Maybe look at using the relevant REST API ...
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.
You'll need to authenticate and to do that, it'll be a matter of picking one of the auth methods listed here ...
PAT is typically the easiest but be sure to restrict it's access in case the key is compromised.
Now having said that, there is a very specific section on auth which you'll need to make sure you adhere to.