Skip to content

Commit

Permalink
fix(azure): correctly map autoApprove response (#12761)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkimmich-onventis committed Nov 21, 2021
1 parent 988d324 commit 27ee7ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
8 changes: 0 additions & 8 deletions lib/platform/azure/__snapshots__/index.spec.ts.snap
Expand Up @@ -65,14 +65,6 @@ Object {
"displayNumber": "Pull Request #456",
"number": 456,
"pullRequestId": 456,
"reviewers": Array [
Object {
"isFlagged": false,
"isRequired": false,
"reviewerUrl": "user-url",
"vote": 10,
},
],
"sourceBranch": undefined,
"sourceRefName": undefined,
"state": "open",
Expand Down
13 changes: 4 additions & 9 deletions lib/platform/azure/index.spec.ts
Expand Up @@ -668,15 +668,10 @@ describe('platform/azure/index', () => {
},
};
const prUpdateResult = {
...prResult,
reviewers: [
{
reviewerUrl: prResult.createdBy.url,
vote: AzurePrVote.Approved,
isFlagged: false,
isRequired: false,
},
],
reviewerUrl: prResult.createdBy.url,
vote: AzurePrVote.Approved,
isFlagged: false,
isRequired: false,
};
const updateFn = jest
.fn(() => prUpdateResult)
Expand Down
2 changes: 1 addition & 1 deletion lib/platform/azure/index.ts
Expand Up @@ -410,7 +410,7 @@ export async function createPr({
);
}
if (platformOptions?.azureAutoApprove) {
pr = await azureApiGit.createPullRequestReviewer(
await azureApiGit.createPullRequestReviewer(
{
reviewerUrl: pr.createdBy.url,
vote: AzurePrVote.Approved,
Expand Down

0 comments on commit 27ee7ef

Please sign in to comment.