Skip to content

fix(bitbucket-server): getUsersByEmail pagination zod error#37533

Merged
rarkins merged 1 commit intorenovatebot:mainfrom
portly-halicore-76:fix/bitbucket-server-paginate-getuserslugsbyemail
Aug 15, 2025
Merged

fix(bitbucket-server): getUsersByEmail pagination zod error#37533
rarkins merged 1 commit intorenovatebot:mainfrom
portly-halicore-76:fix/bitbucket-server-paginate-getuserslugsbyemail

Conversation

@portly-halicore-76
Copy link
Copy Markdown
Contributor

Without the paginate option, no array but an object was returned, c…ausing errors. Explicitly added paginate again with a limit.

Changes

Adds the paginate: true httpOption to the getUsersFiltered httpCall.

Context

In #37199 the logic was added, to try to resolve emailAddresses to userSlugs when adding reviewers. This is done via a REST api call to BitBucket server. We concluded a limit op 100 results should be enough to match the requested user. However, in prod env, I get an error from ZOD on this call. It expects an array to be returned but it is an object. Debugging found that my initial comment was wrong. We need to explicitly add: paginate: true to the request, for the logic of to parse the response into a valuesarray. This fixes the error.

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 select 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

…ausing errors. Explicitly added paginate again with a limit.

Signed-off-by: portly-halicore-76 <170707699+portly-halicore-76@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

@portly-halicore-76
Copy link
Copy Markdown
Contributor Author

portly-halicore-76 commented Aug 15, 2025

Please test against a real repo before we merge any more PRs

See https://github.com/renovatebot/renovate/blob/main/docs/development/local-development.md#run-against-a-real-repo

I totally understand. That have been done against a real repo! I've tested it in combination with the changes in #37510

@rarkins rarkins added this pull request to the merge queue Aug 15, 2025
Merged via the queue into renovatebot:main with commit 2f1fb35 Aug 15, 2025
40 checks passed
@portly-halicore-76 portly-halicore-76 deleted the fix/bitbucket-server-paginate-getuserslugsbyemail branch August 15, 2025 07:31
@renovate-release
Copy link
Copy Markdown

🎉 This PR is included in version 41.73.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 15, 2025
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.

3 participants