Code Monkey home page Code Monkey logo

changelog's Introduction

changelog

crates.io version build status downloads docs.rs docs

Changelog generator.

Why?

Keeping track of what changed between versions can be tricky. So changelogs exist to document those changes for you. But writing changelogs can take a lot of time, which not everyone has. Which means a lot of projects choose not to keep a changelog.

So this project exists as a best-effort to generate changelogs for you. It doesn't require custom commit styles to work. Nor does it ask you to manually track changes in several places.

Instead we automate as much as possible, and present a changelog that's both easy on the eyes, and easy to use. It's not intended to replace manual changelogs, but instead provide an option to keep a changelog for projects that otherwise wouldn't. We hope you find this useful!

Usage

changelog 0.1.2
Command line parser.

USAGE:
    changelog [FLAGS] [OPTIONS] [path]

FLAGS:
    -h, --help         Prints help information
    -P, --pretty       Enable pretty printing
    -q, --quiet        Suppress all log output
    -V, --version      Prints version information
    -v, --verbosity    Print more log output

OPTIONS:
    -o, --out <file>    Write output to file

ARGS:
    <path>    Project directory [default: .]

Installation

$ cargo install changelog

License

MIT OR Apache-2.0

changelog's People

Contributors

alexanderwe avatar bltavares avatar danreeves avatar foresterre avatar yoshuawuyts avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

changelog's Issues

Commit merge body is not trimmed

Bug Report

Your Environment

Software Version(s)
changelog 0.1.2
Rustc 1.30.0-nightly
Operating System Linux

Expected Behavior

There should be 1 commit per line, even for multi-line commit messages.

Current Behavior

The whole commit message is added, spread out over multiple lines, using the ^M character as a line break.

Code Sample

$ git commit -m 'hello\nworld\nhi\n'
$ changelog

Typo in readme: installation with cargo

"Bug" Report

Your Environment

Unrelated to my environment

Expected text

Readme: install with cargo by doing cargo install changelog or cargo install --force changelog if you also want to update.
cargo add does not exist by default;

Current text

Readme reads cargo add instead

Commit links not complete

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?

Feature Request: Don't rely on `Cargo.toml`

Feature Request

Summary

Currently, you can't create a changelog without having a Cargo.toml file with some descriptions about the project. I'd love if there is a way to change the tool up a bit so that it doesn't need to have a Cargo.toml file to output a changelog (it should be easy, as you only really on links and names which you should be able to obtain from git).

Motivation

I'd love this because this is an amazing tool and I'd love to generate changelogs for non-rust projects!

Expected Behavior

It should output a changelog without a Cargo.toml file present.

Drawbacks

There is no reason why you shouldn't do this. This will make the tool for usable!

Rationale and alternatives

Unresolved Questions

Crash on broken pipe

Bug Report

name = 'changelog'
operating_system = 'unix:Ubuntu'
crate_version = '0.3.4'
explanation = '''
Panic occurred in file 'library/std/src/io/stdio.rs' at line 993
'''
cause = 'failed printing to stdout: Broken pipe (os error 32)'
method = 'Panic'
backtrace = '''

   0: 0x55ac701da772 - std::io::stdio::print_to::h9435376f36962f3f
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/stdio.rs:993
                 - std::io::stdio::_print::h0d31d4b9faa6e1ec
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/io/stdio.rs:1005
   1: 0x55ac6fffc99b - changelog::main::ha8f4a0dd0e597edb
   2: 0x55ac6fff90b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h292c7de178945c2f
   3: 0x55ac6fff90cd - std::rt::lang_start::{{closure}}::he23671a91b0e04e5
   4: 0x55ac701e27e7 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::he179d32a5d10d957
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/core/src/ops/function.rs:259
                 - std::panicking::try::do_call::hcb3d5e7be089b2b4
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:381
                 - std::panicking::try::h7ac93b0cd56fb701
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panicking.rs:345
                 - std::panic::catch_unwind::h7b40e396c93a4fcd
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/panic.rs:382
                 - std::rt::lang_start_internal::h142b9cc66267fea1
                at /rustc/7eac88abb2e57e752f3302f02be5f3ce3d7adfb4/library/std/src/rt.rs:51
   5: 0x55ac6fffd002 - main
   6: 0x7fad9fc1d0b3 - __libc_start_main
   7: 0x55ac6fff802e - _start
   8:        0x0 - <unresolved>'''

Expected Behavior

Printing to a broken pipe (e.g. to less) should exit without an error if the pipe is closed.

Current Behavior

changelog panics.

Code Sample

changelog | less and then hit q without scrolling.

Add information from GitHub

Feature Request

Summary

We should query GitHub to provide richer changelog information.

Motivation

Most discussions about code happen on github. issues are created, people create pull-requests. Comments are made. Including data from GitHub allows us to document more of the changes made, and provides more of a reference of the changes that occurred.

Expected Behavior

I'd like to see the following features:

  • one-time login using https://github.com/yoshuawuyts/github_auth
  • include github usernames instead of emails to attribute committers
  • always include a link to the PR that a commit was introduced in
  • create a new section for first-time committers to thank them for their contributions
  • include a section linking to issues that were closed since the last release
  • include a section with known bugs linking to all issues marked bug

Drawbacks

This assumes folks have a GitHub account. Which is probably an okay assumption since it's also a requirement for Cargo. Perhaps we could keep a legacy mode that only fetches information from git. But I'm so-so about that.

Rationale and alternatives

It only relies on information that is statically retrievable, while further integrating itself with known tools out there. Alternatively we could construct most of this info from local git only, but it misses a lot of crucial information.

Unresolved Questions

None at this time. GitHub login is already accounted for, and most of the other questions I think would arise during implementation. Probably hubcaps is the right way to integrate with GitHub.

internal error: entered unreachable code

Bug Report

Your Environment

Software Version(s)
changelog 0.2.0
Rustc 1.30.0-nightly (33b923fd4 2018-08-18)
Operating System Mac OS 10.12.6

Expected Behavior

Create a change log of all commits

Current Behavior

Crash.

Cause: internal error: entered unreachable code. Panic occurred in file 'src/git.rs' at line 130
'''
method = 'Panic'
backtrace = '''
stack backtrace:
   0:        0x105f21ebe - backtrace::backtrace::trace::h4f5b28a7f8437954
   1:        0x105f22c8c - <backtrace::capture::Backtrace as core::default::Default>::default::hde00a96093703e23
   2:        0x105f22d0d - backtrace::capture::Backtrace::new::h4827ca4a965b9761
   3:        0x105e9180b - human_panic::report::Report::new::hc23e3231b3e234f8
   4:        0x105e935de - human_panic::handle_dump::hdabfac695dc5143c
   5:        0x105d9f63d - changelog::main::{{closure}}::h41eb0e56d80b6bb3
   6:        0x105f40218 - std::panicking::rust_panic_with_hook::hadc2c86be9154e41
   7:        0x105daec07 - std::panicking::begin_panic::hced8c81421b45ae1
   8:        0x105db534d - changelog::git::all_commits::h223f409a49a86be2
   9:        0x105d9e50f - changelog::main::hcfa432a01e228b65
  10:        0x105d9ceda - std::rt::lang_start::{{closure}}::hac06602dc99e11be
  11:        0x105f3fbd7 - std::panicking::try::do_call::h1121971afcb56fd2
  12:        0x105f4dd8e - ___rust_maybe_catch_panic
  13:        0x105f336ac - std::rt::lang_start_internal::h5737820e17c1b194
  14:        0x105d9f6cb - _main'''

Code Sample

I tried running changelog in this repo as it currently stands: https://github.com/danreeves/todo-rs

It crashed when there were no tags and still crashes when there's one tag on the latest commit

Not working when exists Workspace toml file

I am want try generate Changelog for this project
https://github.com/wyyerd/stripe-rs

when run this command:

~/dev-pro/stripe-rs/stripe $ changelog  ~/dev-pro/stripe-rs/ -o CHA.md
Error: Generic error.
Info: caused by missing field `package`

when run other command:

~/dev-pro/stripe-rs/stripe $ changelog  ~/dev-pro/stripe-rs/stripe/ -o CHA.md
Error: An error occurred using git.
Info: caused by could not find repository from '/home/andreevlex/dev-pro/stripe-rs/stripe/'; class=Repository (6); code=NotFound (-3)

How work this type projects?

Changelog is created with tagged

Feature Request

Summary

When I publish a version. I need to tagging it first. and next begin create changelog. but the log push with next commit.

Motivation

as Up

Expected Behavior

Can I create changelog without tag ?

Drawbacks

I don not know.

Fallback if Cargo.toml is not available

Feature Request

Summary

If a project is a non Rust project the tool could use the directory name as the repository value.

Motivation

If you want to use the changelog application in a non Rust project it will fail due it's nature of using the Cargo.toml file.

Expected Behavior

When using the read_repo() method from lib.rs, check if a Cargo.toml file exists. If not use the directory name instead of the repository value.

Drawbacks

I do not see any drawbacks here.

Rationale and alternatives

  • This would make changelog also work with non Rust projects. I did not find any other places where changelog refers to Cargo.toml. So it would be a reasonable small change.

Unresolved Questions

None I am aware of right now.

Print stats

Feature Request

Summary

Including the stat diff can be of great help to signal what has changed.

Motivation

We need more information than just the commit names. If commits are poorly written, they're not always very descriptive.

Expected Behavior

 src/commit.rs      |  18 +++++--
 src/index.rs       |  76 +++++++++++++++++++++++++++++++-
 src/lib.rs         |   2 +-
 src/tree.rs        | 132 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 systest/Cargo.toml |   2 +-
 systest/build.rs   |   2 +-
 6 files changed, 221 insertions(+), 11 deletions(-)

From the example code:

fn print_stats(diff: &Diff, args: &Args) -> Result<(), Error> {
    let stats = try!(diff.stats());
    let mut format = git2::DiffStatsFormat::NONE;
    if args.flag_stat {
        format |= git2::DiffStatsFormat::FULL;
    }
    if args.flag_shortstat {
        format |= git2::DiffStatsFormat::SHORT;
    }
    if args.flag_numstat {
        format |= git2::DiffStatsFormat::NUMBER;
    }
    if args.flag_summary {
        format |= git2::DiffStatsFormat::INCLUDE_SUMMARY;
    }
    let buf = try!(stats.to_buf(format, 80));
    print!("{}", str::from_utf8(&*buf).unwrap());
    Ok(())
}

Drawbacks

None to my knowledge.

Rationale and alternatives

It's pretty low hanging fruit to signal more about the changes that occurred. And less involved than going all-in on parsers.

Unresolved Questions

None to my knowledge.

Document SemVer API Changes for Rust Projects

Feature Request

Summary

When an API in a Rust program was changed (edited, added, removed) we should automatically document that under a new header called ## API.

Motivation

One of the most important things in a program to keep tabs on between versions are API changes. It'd be fantastic if we could automatically document which APIs were added, removed or changed so that upgrading between versions will become easier.

Behavior Level Guide

  1. When changelog is run, it computes a changelog for the last version based on git/github information.
  2. In addition, it detects whether a Cargo.toml file is present, and computes & documents the API changes.

Implementation Level Guide

The best place to start is probably rust-semverver, because it's already capable of generating API changelogs. We'd need to find a way to consume it as a library, and output it as markdown -- but my guess is that for a prototype that should be relatively straightforward.

Maybe we should also raise an issue there stating our intents, to see if we can collaborate on making this feature happen.

Drawbacks

People might attach too much value to API changes, and forget to consider changes in side effects as relevant to semver. This method will only be able to prove changes occurred, but not that everything is consistent. Therefor we should not attach too much value to it.

Rationale and alternatives

Without this feature, people need to manually compare versions to figure out what changed. This is relatively labor intensive, and must be repeated for every person upgrading. By documenting the API changes, we can pre-compute an overview of changes which makes upgrading easier.

Unresolved Questions

  • This issue does not address how to document CLI API changes.
  • Neither does it address how to document ABI changes.
  • Nor does it address non-rust projects.

changelog note generated when going from 0.9.0 to 0.10.0

Bug Report

Your Environment

Software Version(s)
changelog 0.3.3 (patch with #58)
Operating System windows

Expected Behavior

When running changelog on a crate with tags going from 0.9.0 to 0.10.0, a new changelog is released.

Current Behavior

changelog generates the same 0.9.0 changelog. This is likely due to how Git returns strings sorted without considering versions.

eg:

 git tag -l
0.1.0
0.1.1
0.1.3
0.10.0
0.11.0
0.2.0
0.2.1
0.2.2
0.3.1
0.4.0
0.5.0
0.7.0
0.8.0
0.9.0

New flag introduced in git 2.3

 git tag -l --sort=v:refname
0.1.0
0.1.1
0.1.3
0.2.0
0.2.1
0.2.2
0.3.1
0.4.0
0.5.0
0.7.0
0.8.0
0.9.0
0.10.0
0.11.0

Code Sample

Happens on https://github.com/datrs/merkle-tree-stream

I can try to add alphanumerical sorting latter on, I just ran out of time to fix this issue today.
Likely needs sorting here: https://github.com/yoshuawuyts/changelog/blob/master/src/git.rs#L95

What does this do?

Hello hello,

Just as a general comment, from reading the README here it's still not clear what the crate provides. Does it create CHANGELOG.md files for you? Does it automatically populate them based on commits?

maybe having an example on the README would help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.