Giter Club home page Giter Club logo

generate-changelog's People

Contributors

altjake avatar avraammavridis avatar bennycode avatar dmlittle avatar ffflorian avatar fvdm avatar jasoncust avatar robinjoseph08 avatar scottbrenner avatar sprokopiak avatar tvardy 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

generate-changelog's Issues

The changelog keep taking all commits

The scenario is that I'm doing some commits (lets say commits docs(A): [commit message for A] and docs(B): [commit message for B]), and them I'm running:

changelog -M && git add CHANGELOG.md && git commit -M 'updated CHANGELOG.md' && npm version major

Then I'm making more commits (lets say commits docs(C): [commit message for C] and docs(D): [commit message for D]), and them I'm running the same command again.

The changelog output that I'm getting is:

2.0.0 (2017-4-12)

Documentation Changes
  • D:

    • [commit message for D]
  • C:

    • [commit message for C]
  • B:

    • [commit message for B]
  • A:

    • [commit message for A]

1.0.0 (2017-4-12)

Documentation Changes
  • B:

    • [commit message for B]
  • A:

    • [commit message for A]

I would expect A and B not to appear in versoin 2.0.0. How does generate-changlog know where to cut the commits between version? How can I make sure that commits from the previous version won't be part of the next version?

Make the pull request number a link to the PR

Hi,

It would be really cool if the PR numbers in the changelog would be links to the PRs, just like the commit messages are links to the commits.

I'd even be willing to look into this myself if you can point me to the right lines of code :)

exclude other types?

Hi there, I was checking out the options and wanted to try out exclude which works totally fine on specified types.
But it does not work when it comes to excluding 'other' type. What I mean by the other is which I've already committed before using this package.

Can anyone confirm?
Thanks

Custom types?

What about adding a way to register custom types?

Shouldn't be difficult to add and would be nice for people who don't want their custom types to all be dumped under "other"?

Handle reverting commits

GitHub has the functionality to revert a Pull Request. In this case an automatic PR title will be generted. This title has the format of: Revert "the original commit message". It would be cool if "generate-changelog" removes the original commit message from the log if a reverting commit is found afterwards. ๐Ÿ˜€

Example commit message:

chore(deps): Bump @types/generate-changelog from 1.8.0 to 1.8.1

Reverting commit message:

Revert "chore(deps): Bump @types/generate-changelog from 1.8.0 to 1.8.1"

Option to include tagged commits on either beginning or end of range

I'm importing this package into my code and trying to generate a changelog with tags. It always excludes the tagged commits and includes everything between the beginning and end.

It would be nice if you could provide an option or flag to include the tagged commits into the changelog.

E.g.,

Currently
Commit1
Commit2
Commit3
Commit4
Commit5

Commit1 and Commit 5 are excluded from the changelog.

It would be nice if you could provide an option to include them.

Can I put out a PR for that change?

Package.json dependency

Hello,

I've tried to use generate-changelog for my non nodejs project but it fails with Error: valid package.json not found. I've looked through the issues of this repository and found Fails when no version is specified in package.json #24 and I can't really understand why there's a need for package.json at all if all you need to get list of changes for parsing is git log v0.1...HEAD --pretty=format:'%H: %s' --reverse called from bash.

Add support for `npm version`

Before submitting a PR, what are your thoughts for supporting npm version. This would have the benefit of working directly within existing npm scripting flows. Also this module could then leverage the npm variables exposed for getting/updating the version which would allow for support of various types of releases beyond major, minor, and patch.

The main concern I can see is supporting workflows for generating a change log outside of versioning... although that doesn't seem like a normal use case.

[Error: no commits found]

I'm getting the following error on a mac system:
[Error: no commits found]
There were 3 commits in the repo when I first saw the issue, and I added two more commits to test, but itt still wouldn't work.

Merge commits with the same message

When there are two merges with the same message, then "generate-changelog" displays them like this:

##### Bug Fixes

- **util:**
  - Add line breaks before config logging ([b79904ba](https://github.com/bennycode/project/commit/b79904bac5580e41a15f73cb45644ad70267c712))
  - Add line breaks before config logging ([8c4ab208](https://github.com/bennycode/project/commit/8c4ab20898e12df44c629bf1180fd854dbbd6646))

It would be much cooler, if it would merge these:

 ##### Bug Fixes

- **util:**
 - Add line breaks before config logging ([b79904ba](https://github.com/bennycode/project/commit/b79904bac5580e41a15f73cb45644ad70267c712), [8c4ab208](https://github.com/bennycode/project/commit/8c4ab20898e12df44c629bf1180fd854dbbd6646))

Fails when no version is specified in package.json

Error description
Installed generate-changelog globally and after running it in a repository which doesn't have a version field in the package.json file, I get the following error:
TypeError: Cannot read property 'split' of undefined.

System specs
Linux Debian 9, Node.js 8.4.0 (installed with nvm), npm 5.3.0, git 2.11.0.

Full log

$ changelog -M
TypeError: Cannot read property 'split' of undefined
    at /home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/lib/package.js:55:36
    at tryCatcher (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._settlePromise (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:582:21)
    at Promise._settlePromise0 (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:693:18)
    at Promise._fulfill (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:524:17)
    at Promise._settlePromise (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/florian/.nvm/versions/node/v8.4.0/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:693:18)

Ignore Merge commit

I'm using the Pull Request strategy for my project and everytime a new request is approved and merged into master there are 2 commits, the initial one and a "merge commit". In this case the changelog appears empty. Somehow it doesn't like the merge commit. Any idea how to get around this? I can't get rid of the merge commit.

Without category

I can pull request to add support commits without category?

git commit -m "feat: some text 1"
git commit -m "feat(): some text 2"
git commit -m "feat(abc): some text 3"
#### 0.0.1 (2016-9-22)

##### New Features

* some text 1 (7cd910d0)
* some text 2 (7cd910d0)
* **abc:** some text 3 (7cd910d0)

COMMIT_EDITMSG is not updated

Hello guys and thank you for a wonderful package!

I am experiencing some issues though if running commit from within a submodule directory.

(node:16959) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOTDIR: not a directory, open '/home/ubuntu/path/to/repository/submodule/.git/COMMIT_EDITMSG' [edited for bug report]
(node:16959) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Nonetheless I believe that script is right because hooks for submodules are located under ../.git/modules/submodule/hooks and therefore COMMIT_EDITMSG file would never appear under submodule/.git/COMMIT_EDITMSG and submodule/.git is file, that's true as well ;)

I cannot give a time to resolve it by myself at the moment but will hopefully provide a solution somehow later as a contributor.

Forgot to add. I am using generate-changelog together with commitizen so it may not be a bug in generate-changelog at all.

Breaking change support

Hi,
Can you add support to display breaking change in the final changelog ?
I use commitizen to add breaking.

Thanks ;)

Merge commits with the same message

Why not combine committees with the same text? For example instead of:

- chrore: add some tests (aaa)
- chrore: add some tests (bbb)
- chrore: add some tests (ccc)

we would get it:

- chrore: add some tests (aaa), (bbb), (ccc)

This combination made the story much more compact and easier to read

Rendered Commit Links: Dashes in Github Repository Name Converted to Underscores

I wanted to flag this issue, it might be affecting other people than me.

I have a repository named panic-fe, and this yml syntax:

- name: Production -- Generate Changelog
  if: env.GIT_DIFF == ''
  uses: scottbrenner/generate-changelog-action@master
   id: Changelog
   env:
      REPO: ${{ github.repository }}

The commit links being rendered look like this for each commit:
https://github.com/niall-byrne/panic-fe/releases/tag/v0.11

My pushy friend made me rename the repository to panic_fe temporarily, so that a github redirect would enable the links to work, but I suspect the author's intention was that they would be rendered differently.

(To Recreate: Look at the rendered HTML to see the actual link, as my hacky github redirect workaround will disguise the issue...)

Error: stdout maxBuffer exceeded

Hello,

We have a large codebase we're trying to apply this tool to. I'm getting the "No commits found" error, but after doing a little debugging in the lib, I discovered that it's not failing to find commits but rather finding way too many commits.

screenshot 2016-12-02 15 00 04

Thoughts? I'll keep digging to see if there's anything node offers to get around this. Thanks!

Add release build

Today, has not option in require('generate-changelog').generate; to generate a version with a build number of this version. Something like: 4.0.0-1 where -1 is a version number as 1.

I mean, there's should an option like this way:

// v4.0.0-1
require('generate-changelog').generate({ build: true });

what do you think?

I'm already doing this.

[Feature request] cz-emoji support

1. Request

It would be nice, if generate-changelog will support cz-emoji.

2. Justification

Support smiles in commit messages. cz-emoji โ€” commitizen-compatible npm package.

3. Steps to reproduce

I install commitizen and cz-emoji โ†’ I create any commit to my GitHub repository via cz-emoji โ†’ I run command changelog -f -.

4. Expected behavior

Successful changelog generation.

5. Actual behavior

Blank changelog, example:

D:\SashaBranchReleaseIt>changelog -f -
#### 2.0.1 (2018-01-29)

Thanks.

Ignore commit messages that do not adhere to the format

I am getting an "undefined" printed in the changelog, cause the commit message was and old one not following the format required by generate-changelog

##### Bug Fixes

* **undefined:** remove reference...

That was generated from "Fix: remove reference..."
So it was missing the category capture group.
So https://github.com/lob/generate-changelog/blob/master/lib/git.js#L50 should look like this:
commit.category = parsed[3] || "";

Why do you capture a 3rd capture group that includes the catagory in braces (category). Its not used anywhere.

How about this match pattern?
https://regex101.com/r/tB8sV4/2

It captures 3/2 groups: type/[category]/subject

Add option for filtering commits by path

I have three components in the same repository. It would be awesome if I could filter them by path (git log -- <path>), so I can generate three different CHANGELOG files (one for each component)

Any plans to add this? Would you accept a PR?

[Question] : How to add new changelog to changelog.md file without generating the whole commits again ?

  • Whenever we add new changelog ,it generates whole commit message again in the CHANGELOG.md file. It leads to duplication of data for example.

  • lets say I have some commits,

commit one
commit two
  • if I add new Changelog which consists of two new commits
commit three
commit four
  • If I now generate file again. What the file consists is,
commit one 
commit two

commit one 
commit two 
commit three
commit four 

How can we add new changelog message without generating the existing whole commit message again?

error: pathspec 'CHANGELOG.md'' did not match any file(s) known to git

Hi,
I testing your great tool but when I tried to launch the recommanded command it fails, in my react project.

So I added in my package.json :

"release:major": "changelog -M && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version major && git push origin && git push origin --tags"

The version is ok.
My git status :

$ git status
On branch dev-react-website
Your branch is ahead of 'origin/dev-react-website' by 1 commit.
  (use "git push" to publish your local commits)
nothing to commit, working tree clean

When I tried to do a yarn release:major, I have this :

yarn run v1.19.1
$ changelog -M && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version major
warning: LF will be replaced by CRLF in CHANGELOG.md.
The file will have its original line endings in your working directory
error: pathspec 'CHANGELOG.md'' did not match any file(s) known to git
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I installed the package globally to test each command separately and it's working but not with the entire command.

Why there is 2 apostrophes after CHANGELOG.md : error: pathspec 'CHANGELOG.md''

EDIT :
If I do :

$changelog -M && git add CHANGELOG.md && git commit -m 'updated CHANGELOG.md' && npm version major && git push origin && git push origin --tags

It's working but not with :

$ yarn release:major

Thanks by advance.

cli -exclude split fails as undefined

I have tried passing every format of comma separated list I can even imagine, and I still get:

.npm-packages/lib/node_modules/generate-changelog/lib/cli.js:8
  return val.split(',');

Maybe I'm just totally blanking on the format, but I have tried a zillion combinations. Here are a few:

changelog -p -x [chore, test]
changelog -p -x ['chore', 'test']
changelog -p -x chore, test
changelog -p -x "chore, test"
changelog -p -x 'chore', 'test'
changelog -p, -x=[chore]

etc.

I'm probably just doing it wrong, but thought I would ask.
Thanks.

Tag range returns an error

I am getting an error when requesting a changelog with in the range. But I am getting commits in commandline by executing git log -E --format=%H%n%s%n%b%n===END=== v2.0.0-alpha.12..v2.0.0-alpha.17.

generateLog.generate(<generateLog.Options>{
            patch: true,
            major: true,
            tag: 'v2.0.0-alpha.12..v2.0.0-alpha.17',
            repoUrl: repositoryUrl
        }).then((changeLog) => {
            console.log(changeLog);
        }).catch((err) => {
            console.error(err);
        });

I get the following error:

Note: I printed out error by changing line 44 of git.js throw new Error('no commits found \n' + err);

Error: no commits found
Error: Command failed: git log -E --format=%H%n%s%n%b%n===END=== v2.0.0-alpha.12..v2.0.0-alpha.17
fatal: ambiguous argument 'v2.0.0-alpha.12..v2.0.0-alpha.17': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

    at M:\change-log\node_modules\generate-changelog\lib\git.js:44:11
    at tryCatcher (M:\change-log\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (M:\change-log\node_modules\bluebird\js\release\promise.js:512:31)
    at Promise._settlePromise (M:\change-log\node_modules\bluebird\js\release\promise.js:569:18)
    at Promise._settlePromise0 (M:\change-log\node_modules\bluebird\js\release\promise.js:614:10)
    at Promise._settlePromises (M:\change-log\node_modules\bluebird\js\release\promise.js:690:18)
    at _drainQueueStep (M:\change-log\node_modules\bluebird\js\release\async.js:138:12)
    at _drainQueue (M:\change-log\node_modules\bluebird\js\release\async.js:131:9)
    at Async._drainQueues (M:\change-log\node_modules\bluebird\js\release\async.js:147:5)
    at Immediate.Async.drainQueues [as _onImmediate] (M:\change-log\node_modules\bluebird\js\release\async.js:17:14)
    at runCallback (timers.js:696:18)
    at tryOnImmediate (timers.js:667:5)
    at processImmediate (timers.js:649:5)
    at process.topLevelDomainCallback (domain.js:121:23)

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.