changelog icon indicating copy to clipboard operation
changelog copied to clipboard

Commit links not complete

Open jletey opened this issue 6 years ago • 3 comments

Bug Report

Your Environment

Software Version(s)
changelog 0.3.3
Rustc 1.32.0 (9fda7c223 2019-01-16)
Operating System macOS 10.14.4

Expected Behavior

The links to commits should be of the form [[<SHORT_HASH>](https://github.com/<OWNER>/<PATH_NAME>/commit/<LONG_HASH>)]

Current Behavior

The links to commits are currently of the form [[<SHORT_HASH>](<PATH_NAME>/commit/<LONG_HASH>)]

Code Sample

Running the command changelog -o CHANGELOG.md -v for the license-up repo gives the following CHANGELOG.md:

## 2019-02-19, Version v1.0.0
### Commits
- [[`8ee137f07a`](license-up/commit/8ee137f07af6d8a0b48c1ae5e0c8e0711be605b4)] feat: add `--version` flag (#29) (John Letey)
- [[`3fc8c67c94`](license-up/commit/3fc8c67c9475f8e9d3ff80d7089b1ca28f3cb2c7)] Add ability to check for a license (#28) (John Letey)
- [[`78d5a109b9`](license-up/commit/78d5a109b9831ba91fdd58bcbc8649cdd68b05b1)] Add GPL2 license (#26) (John Letey)
- [[`d31c04689d`](license-up/commit/d31c04689d1afc38e3ff3c260da18705cc22113d)] docs(readme): hide all of the license text (#25) (John Letey)
- [[`e33825338a`](license-up/commit/e33825338ad698b0d30fa8f541206aef9c1f4ef8)] Add GPL3 license (#22) (John Letey)
- [[`a8ea816bdb`](license-up/commit/a8ea816bdb18123076867e5e3b0293ca153417ce)] typo (Nikita Voloboev)
- [[`8ab85000c6`](license-up/commit/8ab85000c6388cf04fc250fada99ca2eb61dcccf)] docs(readme): add information about unlicense license (John Letey)
- [[`5b8d665b42`](license-up/commit/5b8d665b4259d14189cdfd5616213b997fc661a5)] feat: add Unlicense license (John Letey)
- [[`af8727cdd5`](license-up/commit/af8727cdd5c89ba3f58e52e9b9b5123d7bf1dcad)] Merge pull request #17 from johnletey/pr/change-bsd (Nikita Voloboev)
- [[`829243146c`](license-up/commit/829243146cc244150acb53b5fb1736f35cfb1ec1)] docs(readme): update bsd -> bsd3 (John Letey)
- [[`fbaf83d4de`](license-up/commit/fbaf83d4de2d5f6203a168937eb40f88920a70c8)] refactor: change bsd to bsd3 (John Letey)
- [[`d53b713c43`](license-up/commit/d53b713c4370b1ec533a75b65537ae23b8c61126)] Merge pull request #16 from johnletey/pr/add-cc0 (Nikita Voloboev)
- [[`f506e9e2f7`](license-up/commit/f506e9e2f72f695f3fa6b12a915a635ff9c97b99)] docs(readme): add information about cc0 license (John Letey)
- [[`1b1c1c6860`](license-up/commit/1b1c1c6860b87c7286adf0e7989e30d19710d1bd)] feat: add CC0 1.0 Universal license (John Letey)
- [[`db63fa24cf`](license-up/commit/db63fa24cf2d267cfafe470bf0bb9972933643b4)] readme: update (Nikita Voloboev)
- [[`140f85132d`](license-up/commit/140f85132ddd2076e07310ae1d7f15cb85e21075)] Merge pull request #15 from johnletey/pr/add-bsd2 (Nikita Voloboev)
- [[`9720565e7b`](license-up/commit/9720565e7bffa237af132cdbd4d7dea611582a8a)] docs(readme): add information about bsd2 license (John Letey)
- [[`5881f375a4`](license-up/commit/5881f375a4e08c430165817a2ad5fb2c6eb9ec40)] feat: add BSD 2-Clause license (John Letey)
- [[`4d849223c7`](license-up/commit/4d849223c77e367fe4cf3b431e4dd933ae495286)] readme: update (Nikita Voloboev)
- [[`0bacc6d978`](license-up/commit/0bacc6d9788e57d71fae448549e843bb5d580e0f)] readme: update (Nikita Voloboev)
- [[`56264c8977`](license-up/commit/56264c89779909f7effb3d700cce7e1767a53ec7)] Merge pull request #14 from johnletey/pr/add-bsd (Nikita Voloboev)
- [[`9290e79fba`](license-up/commit/9290e79fbacaab73759915f4493c639d506c4093)] docs(readme): fix link to bsd license (John Letey)
- [[`ec7c219ec6`](license-up/commit/ec7c219ec6da15a97cf55b80dbf5e2254f4b07f0)] docs(readme): add information about bsd license (John Letey)
- [[`1f94bfd9fb`](license-up/commit/1f94bfd9fbd87e17dcd76dd4af5865584ddd6a1b)] feat: add BSD 3-Clause license (John Letey)
- [[`6c27363e61`](license-up/commit/6c27363e618ab0a8dc1f0dfe28758ce956467d49)] readme: update (Nikita Voloboev)
- [[`beeec53a6d`](license-up/commit/beeec53a6d626a20d62484219fa664f8bf5699b5)] add -present to MIT license (Nikita Voloboev)
- [[`471a9d6212`](license-up/commit/471a9d6212b7451071826f04a97d88f45a312eda)] readme: update (Nikita Voloboev)
- [[`58f9228f2b`](license-up/commit/58f9228f2b2137f25daa8c10230455ba0db8aa4c)] update contrib (Nikita Voloboev)
- [[`0cbe32bd22`](license-up/commit/0cbe32bd22aae17c9efd8b2f859c1d1c6bc6ece2)] Update readme (Nikita Voloboev)
- [[`1c5e80733a`](license-up/commit/1c5e80733acb5a8104023d9f9a70b1171004c3d6)] Update readme (Nikita Voloboev)
- [[`516c538584`](license-up/commit/516c538584a46c7a91ad54f878b7946e0896167d)] Improve readme (Nikita Voloboev)
- [[`0917787d55`](license-up/commit/0917787d55e33da59a90d9245b44d1cfa2accc91)] Add contents table (Nikita Voloboev)
- [[`f9db86fa8e`](license-up/commit/f9db86fa8e21e275fbcead916e5147b539c734d3)] Improve readme (Nikita Voloboev)
- [[`a356f011ab`](license-up/commit/a356f011abc559472e78647f42e81069465c39f3)] Improve readme (Nikita Voloboev)
- [[`668a31ed33`](license-up/commit/668a31ed3333f9dace8a98b49abc4727efcedadf)] Improve contributing (Nikita Voloboev)
- [[`2196242c48`](license-up/commit/2196242c487557f02c254b0d5657edb36fa1be15)] Improve readme (Nikita Voloboev)
- [[`cce42c6375`](license-up/commit/cce42c6375d31076668d68e938d2b3f8ec6096be)] Rename (Nikita Voloboev)
- [[`b0fb83fbd6`](license-up/commit/b0fb83fbd6a2e0ed19f7957c5e156f96688da950)] Rename (Nikita Voloboev)
- [[`4a2e17c08d`](license-up/commit/4a2e17c08d3f2f0175da238469314b2477fdd951)] Add contributing (Nikita Voloboev)
- [[`5741b0a4c8`](license-up/commit/5741b0a4c8e49d877e4ced3ee4f908e2272007d8)] Uppercase LICENSE (Nikita Voloboev)
- [[`646286acd3`](license-up/commit/646286acd360d3e95b31647ea10249c17735f60e)] Lowercase license (Nikita Voloboev)
- [[`e65ee9fde5`](license-up/commit/e65ee9fde5fd7d204ef628fbccd1d17a1239b8f1)] Improve readme (Nikita Voloboev)
- [[`8a9a4255db`](license-up/commit/8a9a4255dbe6e242ef487562255bb41a7ed059bb)] Uppercase LICENSE (Nikita Voloboev)
- [[`9ffdac4467`](license-up/commit/9ffdac4467c28b77d6ec9fdf6d237de18d941e10)] Improve readme (Nikita Voloboev)
- [[`0903846148`](license-up/commit/09038461489a9879f267e2639c0a90a9297fec45)] Improve readme (Nikita Voloboev)
- [[`dbc9e4532e`](license-up/commit/dbc9e4532e4bc5fb0877e8574dab008d06c1f72a)] Improve readme (Nikita Voloboev)
- [[`56e8ec1949`](license-up/commit/56e8ec19496d63a64b8bd284ebf6b1fee6f6bb07)] Improve readme (Nikita Voloboev)
- [[`5c755450b6`](license-up/commit/5c755450b6c4e38db69b7ace3b2e7f22013d1f92)] Improve readme (Nikita Voloboev)
- [[`10037c7f8b`](license-up/commit/10037c7f8bcf24963231d8c0cac2a36e18aa26b7)] Improve readme (Nikita Voloboev)
- [[`b6d1e93427`](license-up/commit/b6d1e934270c74d749cbb988d4051ff137cb5d74)] MIT license (Nikita Voloboev)
- [[`fb21912378`](license-up/commit/fb21912378f08945a790f9515092b4420b38e2c8)] ✨ (Nikita Voloboev)
- [[`b8bfdbf78a`](license-up/commit/b8bfdbf78a1233ae9c3d289b72d119abfa06e4fc)] Lowercase license (Nikita Voloboev)
- [[`ecbd430f71`](license-up/commit/ecbd430f71957ed3bd26c043a699de090b90aa74)] Improve readme (Nikita Voloboev)
- [[`058d4c92ab`](license-up/commit/058d4c92abfea8b22bfd21af91433e7668d83cd1)] Improve readme (Nikita Voloboev)
- [[`aabc694941`](license-up/commit/aabc69494131649e1ac46d6887b02e14df75af9d)] Adding CC1 (Nikita Voloboev)
- [[`50bb608060`](license-up/commit/50bb6080608ee7fdc1123f6661591c8fcc7aae7b)] Improve readme (Nikita Voloboev)
- [[`9d680ba57d`](license-up/commit/9d680ba57dfa446f70843617f8d44faff61d2593)] Improve readme (Nikita Voloboev)
- [[`1daa36a26a`](license-up/commit/1daa36a26ad6ddecbf9503a5fee50cab7d8186d9)] Improve readme (Nikita Voloboev)
- [[`81ff9d1c4a`](license-up/commit/81ff9d1c4a47e520a1a8f843342404e03cf3e488)] Add MIT license (Nikita Voloboev)
- [[`20e7b83b9d`](license-up/commit/20e7b83b9d73da5b82f4071bb696c5d33b8c296a)] Improve readme (Nikita Voloboev)
- [[`27738331f5`](license-up/commit/27738331f556e136c8239fffa6ebac3c10f7957d)] Improve readme (Nikita Voloboev)
- [[`d89ee9661a`](license-up/commit/d89ee9661a7db1082ef35aaf9ba5ed40d3744084)] Improve readme (Nikita Voloboev)
- [[`7d4b848bff`](license-up/commit/7d4b848bffd026ffb3f447dcec969a426dccd687)] Change MIT (Nikita Voloboev)
- [[`b7ec938e9d`](license-up/commit/b7ec938e9de8365d06d83abc29164bc6d9d92bfd)] improve readme (Nikita Voloboev)
- [[`75672df57a`](license-up/commit/75672df57aa2f63d7845e377dd1f8eca4f5ff2cf)] fix (Nikita Voloboev)
- [[`106624e2ef`](license-up/commit/106624e2ef0a717c5d7e2442b8481e76d353b5f1)] fix (Nikita Voloboev)
- [[`7072d0d726`](license-up/commit/7072d0d7261466d1e33a6addcc686d2cc792bbcc)] demo (Nikita Voloboev)
- [[`88bc584190`](license-up/commit/88bc584190c44ec5a9da4bd7c21bde875e222eb9)] fixed convert to string (Nikita Voloboev)
- [[`2088b4e1b0`](license-up/commit/2088b4e1b0650768b3103b6caac62395b1f7a715)] closes #4 (Nikita Voloboev)
- [[`172b1a3f92`](license-up/commit/172b1a3f92fa81e3d76b4536cf60029474b1adad)] improve readme (Nikita Voloboev)
- [[`64785ab18f`](license-up/commit/64785ab18fcdda4c25cfd52e0278f74bbbac213e)] reformat readme (Nikita Voloboev)
- [[`83dfb3a108`](license-up/commit/83dfb3a1087c8a38b0d641d13d50430510ecefba)] ✍🏻 replaced link (Nikita Voloboev)
- [[`bee0a98580`](license-up/commit/bee0a9858047b88841a3602ff52d6839e3650eab)] :sparkles: (Nikita Voloboev)
- [[`ccc8782bc8`](license-up/commit/ccc8782bc84391def186f865a8cf9a78a692eeaa)] :sparkles: (Nikita Voloboev)
- [[`411d667316`](license-up/commit/411d667316a932a2b8367b9689a0fe6a3a1b7d9d)] :sparkles: (Nikita Voloboev)
- [[`fdeff33dcf`](license-up/commit/fdeff33dcf3152406ee2fd66cbaa82450c1752c6)] :sparkles: (Nikita Voloboev)
- [[`eb906a66a9`](license-up/commit/eb906a66a96460fabec9deb60d4e2a87edf221e3)] :sparkles: (Nikita Voloboev)
- [[`110920af34`](license-up/commit/110920af3474257a5561b50a8f111221f7ce53dd)] :sparkles: (Nikita Voloboev)
- [[`9fb36a7b21`](license-up/commit/9fb36a7b2136ca626d6f5a158dcc0eb1cf397c0c)] :sparkles: (Nikita Voloboev)
- [[`09070692c0`](license-up/commit/09070692c0f1861a441b5575c2e6167035aa64f1)] :sparkles: (Nikita Voloboev)
- [[`0a8768d552`](license-up/commit/0a8768d552f364601ae66abe77e3cf583bcc0343)] :sparkles: (Nikita Voloboev)
- [[`97232c8f81`](license-up/commit/97232c8f81c004369221aacb2effd4af8d5a6455)] :sparkles: (Nikita Voloboev)
- [[`ecf3c4e3e4`](license-up/commit/ecf3c4e3e4a476e8a9ae84b5a79880eca628cc9c)] :sparkles: (Nikita Voloboev)
- [[`9c040ebf90`](license-up/commit/9c040ebf906ed47b3f4c84baf510109d68ff0b8f)] :sparkles: (Nikita Voloboev)
- [[`67bb991820`](license-up/commit/67bb9918203a650a982d0d1a373c6190f783235d)] :sparkles: (Nikita Voloboev)
- [[`770c536b61`](license-up/commit/770c536b6179959cf393b72f89691142cd80b3ec)] no notifications (Nikita Voloboev)
- [[`b36ad8cc73`](license-up/commit/b36ad8cc73b12a02d9bdad4409f16a947e1c2be8)] travis (Nikita Voloboev)
- [[`4fe3f184a4`](license-up/commit/4fe3f184a47276ab6606251ad0e0372aa7f29bd9)] added travis (Nikita Voloboev)
- [[`89858cceb5`](license-up/commit/89858cceb5c1f460e057c5e6bfb7fe9ed115c00c)] :sparkles: (Nikita Voloboev)
- [[`e46be3c0da`](license-up/commit/e46be3c0da9c854679f0797a6395a6130ec7abe7)] alias tip (Nikita Voloboev)
- [[`2e9c20c85c`](license-up/commit/2e9c20c85c4ef3ffedcfb3d51517135438d000b0)] typo (Nikita Voloboev)
- [[`064befc750`](license-up/commit/064befc750bb971d38dcaec90d1293b941558407)] updated description (Nikita Voloboev)
- [[`ecafa74c3e`](license-up/commit/ecafa74c3eb7e76a21e73dbdfd65a308b814527d)] :sparkles: (Nikita Voloboev)
- [[`e8e4b8b046`](license-up/commit/e8e4b8b04650f90e1eb69d12a1c9aee0b1386f3c)] 🌅 (Nikita Voloboev)

### Stats
```diff
 .travis.yml           |   10 +-
 .vscode/settings.json |    3 +-
 CONTRIBUTING.md       |   22 +-
 LICENSE               |   21 +-
 README.md             | 1503 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 bsd.go                |   83 +++-
 cc0.go                |  118 ++++-
 gpl.go                |  870 +++++++++++++++++++++++++++++-
 main.go               |   75 ++-
 mit.go                |   74 ++-
 unlicense.go          |   42 +-
 11 files changed, 2821 insertions(+)

@alexanderwe Do you have a way to fix this? Maybe grabbing data from the git command?

jletey avatar Apr 23 '19 17:04 jletey

@johnletey This is most likely the case, again of a missing Cargo.toml file where the git repo is usually specified. But I think it should be possible to grab the different remotes from the .git, as you have suggested, and use the url of these. But currently I am unsure how to handle multiple remotes. Which of them should be used to generate the url ? I have multiple options in mind:

  • Use the first of git remote command (No one guarantees that this will be the correct one)
  • Use the one with name origin (But someone could simply use another name then this would fail)
  • Provide a command line options to select the correct remote specified by the user

alexanderwe avatar Apr 23 '19 21:04 alexanderwe

@alexanderwe The easiest option would be to pass in an option, although that complicates the command ... however, the other two options are tricky!

jletey avatar Apr 24 '19 10:04 jletey

@yoshuawuyts How would you like to tackle this issue ?

alexanderwe avatar Apr 24 '19 13:04 alexanderwe