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(manager/npm): invalid link in git hash updates for npm #12111

Merged
merged 5 commits into from Oct 11, 2021
Merged

fix(manager/npm): invalid link in git hash updates for npm #12111

merged 5 commits into from Oct 11, 2021

Conversation

olegkrivtsov
Copy link
Contributor

Changes:

Work in progress. I'd like to push my current changes to request some feedback/advice.

I'm currently in doubt. I've modified prBodyDefinitions and the link is now overridden when the updateType is digest. But, it is not clear:

  1. For some strange reason the platform variable which is consumed by Handlebars equals to togithub. It is weird, not sure why it looks like this. In my test, my link points to https://togithub.com/olegkrivtsov/renovate-npm-bug/compare/9e3dc07...489cbc7, so the domain name is incorrect. What variable should I use to get the correct platform name?
  2. Does the link make sense only for GitHub.com. What happens if a repo belongs to a different platform?
  3. I tested on a real repository https://github.com/olegkrivtsov/renovate-npm-bug. Should I somehow provide a unit test for this?

Context:

Closes: #6224

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

@rarkins
Copy link
Collaborator

rarkins commented Oct 11, 2021

togithub.com is used to avoid backlink spam - it's intentional

@rarkins
Copy link
Collaborator

rarkins commented Oct 11, 2021

But using platform is not correct. e.g. won't be correct for bitbucket.com, etc. I think best if you just remove the incorrect link in this PR and then add a new issue for creating source URL compare links in a new issue (which needs discussion first).

@rarkins rarkins marked this pull request as draft October 11, 2021 10:46
@olegkrivtsov
Copy link
Contributor Author

Hi @rarkins I removed the link for digest update type, so now it just shows oldDigest -> newDigest in the Changes column. Please review another time.

@rarkins
Copy link
Collaborator

rarkins commented Oct 11, 2021

@olegkrivtsov can you test it on a real repo, showing both digest and non-digest updates?

@olegkrivtsov
Copy link
Contributor Author

@rarkins I've done that on https://github.com/olegkrivtsov/renovate-npm-bug. You can see that Renovate created two PRs - one for digest, and one for non-digest.

@rarkins rarkins marked this pull request as ready for review October 11, 2021 14:53
@rarkins rarkins enabled auto-merge (squash) October 11, 2021 14:53
@rarkins rarkins merged commit 9d2ce84 into renovatebot:main Oct 11, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 28.0.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 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.

Invalid link in git hash updates for npm
4 participants