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(datasource): re-encode URL to support white spaces in Azure projects #23354

Merged
merged 8 commits into from Jul 19, 2023
Merged

fix(datasource): re-encode URL to support white spaces in Azure projects #23354

merged 8 commits into from Jul 19, 2023

Conversation

lfcyja
Copy link
Contributor

@lfcyja lfcyja commented Jul 13, 2023

Changes

The URL for GIT submodules are decoded as a side-effect of the git-url-parse node module. This leads to errors when using submodules with whitespaces in the URL, e.g. Azure DevOps project name.

Error: "WARN: Error mapping git submodules during extraction", raised in extract.ts and originating from index.js in git-url-parse.

Context

The gitUrlParse function respects the fact that in some hosting services such as Azure DevOps, you can use white-space characters in the repository and owner names. It URI-decodes the components accordingly and uses these to assemble the full_name property. This is done independently of the hosting environment.

When the GitUrl object is later used to compose the repository string, however, these components are not re-encoded. The full_name property is used to build the string.

I already tried to fix the issue in the affected submodule (active PR here), but the owner does not seem to maintain the repository anymore.
Hence, I attempted a fix in your module.

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

@CLAassistant
Copy link

CLAassistant commented Jul 13, 2023

CLA assistant check
All committers have signed the CLA.

@rarkins rarkins requested a review from JamieMagee July 13, 2023 14:22
@viceice
Copy link
Member

viceice commented Jul 17, 2023

please stop merging main, GitHub merge queue will do it for you

@alexanderlinne
Copy link

@JamieMagee @viceice Hi, is there anything else to do to have this merged?

@JamieMagee JamieMagee added this pull request to the merge queue Jul 19, 2023
Merged via the queue into renovatebot:main with commit ec44118 Jul 19, 2023
38 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 36.13.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lfcyja lfcyja deleted the fix/support-whitespaces branch July 20, 2023 09:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2023
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.

None yet

6 participants