Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add policy evaluations #6

Merged
merged 2 commits into from
Apr 6, 2020
Merged

Add policy evaluations #6

merged 2 commits into from
Apr 6, 2020

Conversation

jpreese
Copy link

@jpreese jpreese commented Apr 5, 2020

In support of runatlantis/atlantis#970

Right now in Atlantis we're checking the mergeStatus field on the pullRequests API to see whether or not a PR is mergeable. Currently its always returning a value of succeeded.. which doesn't help when trying to assess whether or not a policy has been violated!

However, there is a policy/evaluations API (https://docs.microsoft.com/en-us/rest/api/azure/devops/policy/evaluations/list?view=azure-devops-rest-5.1) that we can create an artifactID from, using the projectID and pullRequestID and query if any policies have been violated on the pull request.

@jpreese jpreese force-pushed the policy-evals branch 2 times, most recently from 758a7f6 to ea8e7c7 Compare April 5, 2020 00:58
@mcdafydd
Copy link
Owner

mcdafydd commented Apr 6, 2020

Looks good to me! Thanks @jpreese

@mcdafydd mcdafydd merged commit 359f2df into mcdafydd:master Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants