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

fix(azure): correctly map autoApprove response #12761

Merged
merged 6 commits into from Nov 21, 2021
Merged

fix(azure): correctly map autoApprove response #12761

merged 6 commits into from Nov 21, 2021

Conversation

dkimmich-onventis
Copy link
Contributor

Changes:

Currently there is a type mismatch when autoApproving a pull request in Azure. When adding a reviewer with the Azure API, the response type is IdentityRefWithVote, see here. However, the pr variable which should have type GitPullRequest is overriden with the response, which leads to the PR information getting lost.

Context:

Closes #12303

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@dkimmich-onventis dkimmich-onventis changed the title Fix/azure auto approve response fix(azure): correctly map autoApprove response Nov 19, 2021
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a little more. reviewers needs to be a string array.

lib/platform/azure/index.ts Outdated Show resolved Hide resolved
lib/platform/azure/index.ts Outdated Show resolved Hide resolved
lib/platform/azure/util.ts Outdated Show resolved Hide resolved
@rarkins rarkins requested a review from viceice November 20, 2021 09:07
@JamieMagee
Copy link
Contributor

Good catch! How did TypeScript not warn on this?

It looks like we have an update for the Azure DevOps API too!

@rarkins rarkins enabled auto-merge (squash) November 21, 2021 12:46
@rarkins rarkins merged commit 27ee7ef into renovatebot:main Nov 21, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 29.14.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dkimmich-onventis dkimmich-onventis deleted the fix/azure-auto-approve-response branch November 22, 2021 07:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error getBranchNameWithoutRefsheadsPrefix(undefined) during PR creation
5 participants