Fork me on GitHub
#clojars
<
2018-10-25
>
Jorin19:10:06

Hi there! Was wondering how I can add a link to Github to a project's Clojars page. Currently it only says "N/A". Would be awesome if someone could point me into the right direction πŸ™‚

tcrawley19:10:56

@hi895 Do you mean in the top left, where normally it is a link to github?

Jorin19:10:27

@tcrawley yes exactly πŸ™‚ I'm using lein for deploying btw

tcrawley19:10:00

That comes from the vcs metadata in the pom.xml, which lein should populate automatically if you are deploying from a git repo. Though the clojars code may only know how to construct a url from that for github - it may not work if your remote isn't github

Jorin19:10:16

The scm tag in the pom file is pretty empty. Not sure if that's the source where Clojars takes the information from thought:

<scm>
    <tag>528588aaf75a5bb1b7e4de6a6941b49e99a6f3f8</tag>
  </scm>

tcrawley19:10:32

Yes, I was just typing that :)

tcrawley19:10:36

That's where it comes from

tcrawley19:10:51

is an example of what it should look like

tcrawley19:10:20

I know lein has some logic around generating that, but I don't know what would prevent it from doing so. Maybe ask in #leiningen ?

Jorin19:10:39

Thanks a lot @tcrawley for pointing me in the right direction! Sure I will figure this out πŸ™‚

tcrawley19:10:51

My pleasure!

Jorin20:10:34

@tcrawley found the issue btw. lein only matches [email protected] urls. I was using an https:// url. Guess I will ask lein if they like to change that over there πŸ™‚ (see https://github.com/technomancy/leiningen/blob/1dc131128279ef50f21d4d643c4d5c2133c1370d/src/leiningen/pom.clj#L75)

martinklepsch21:10:16

@hi895 that’s an interesting observation... there are some docs for cljdoc that also suggest using the https URL - do you think they should be changed? https://github.com/cljdoc/cljdoc/blob/master/doc/userguide/faq.md

cljdoc 4
Jorin05:10:58

will check it out πŸ™‚

Jorin05:10:30

Seems like cljdoc is also affected by this. Guess that many projects are using lein for release. Since lein didn't put that info in the pom file for those repositories, it's hard to analyze it. I think the only reasonable place to fix this is in lein, not on the consumer side. There are many examples I came across: https://cljdoc.org/d/http-kit/http-kit/2.3.0 https://clojars.org/spootnik/signal If there is no url in the scm info in pom, can still use the main url tag in the pom file which probably points to a useful resource πŸ™‚

martinklepsch21:10:09

Feel free to just do it or open an issue πŸ™Œ