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

Don't override github.external_url if its already defined #512

Conversation

mdedetrich
Copy link
Contributor

@mdedetrich mdedetrich commented Apr 5, 2022

So I came across a bug from a specific corner case when trying to integrate github ref links into one of my projects. After some debugging I found the state that causes the issue

  1. Have scmInfo defined (in my case its because we use ghpages to publish the paradox site to github pages)
  2. Define your own custom github.external_url in paradoxProperties. In my case this is done because we have a main branch rather than a master branch.

When I tried doing this in my project I noticed that no matter how I overrode github.external_url the setting would never apply, after looking into Paradox I found the offending code, i.e. https://github.com/lightbend/paradox/blob/master/plugin/src/main/scala/com/lightbend/paradox/sbt/ParadoxPlugin.scala#L427-L436

Basically if you have scmInfo defined then it will always override a custom defined github.external_url because the linkProperties just ignores github.external_url and returns a hardcoded github.external_url value that overrides the original.

Copy link
Contributor

@johanandren johanandren left a comment

Choose a reason for hiding this comment

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

LGTM

@mdedetrich
Copy link
Contributor Author

I added one more commit which updates the documentation with the changed behavior.

@mdedetrich mdedetrich force-pushed the dont-override-githubresolver-baseurl-if-defined branch from 951d3c0 to 6b8e5c9 Compare April 5, 2022 14:21
@pvlugter pvlugter merged commit cba68d7 into lightbend:master Apr 5, 2022
@mdedetrich mdedetrich deleted the dont-override-githubresolver-baseurl-if-defined branch April 6, 2022 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants