Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

refactor/chore/docs do no longer work #13

Closed
silkentrance opened this issue May 1, 2016 · 10 comments
Closed

refactor/chore/docs do no longer work #13

silkentrance opened this issue May 1, 2016 · 10 comments

Comments

@silkentrance
Copy link

silkentrance commented May 1, 2016

I am having trouble getting commit messages such as (excerpt from my git log)

commit ad9f41ebe60c759bde22ed98b5caa0d24fa0793a
Author: cklein <trancesilken@gmail.com>
Date:   Sun May 1 09:47:25 2016 +0200

    refactor(tokens): comment and emptyline are simple tokens

commit 5cdc98136ac344c6d45887c39dd9a9b4f24a8a95
Author: cklein <trancesilken@gmail.com>
Date:   Fri Apr 29 20:55:08 2016 +0200

    fix(Authorship): authorship is whitespace

commit b2f70f7957ea60c7022262fbaf9132f4c91bf206
Author: cklein <trancesilken@gmail.com>
Date:   Fri Apr 29 20:53:20 2016 +0200

    fix(Comment): comment is whitespace

commit 0254948294647886e6bdd89ae4a7fb44ad1a0c2e
Author: cklein <trancesilken@gmail.com>
Date:   Tue Apr 26 19:48:02 2016 +0200

    version bump v0.0.10
    [ci skip]

to work with the new standard-changelog or when using conventional-changelog-cli and the angular preset.

Except for fix nothing else will make it into the changelog:

<a name="0.0.10"></a>
## [0.0.10](https://github.com/coldrye-es/ypo-parser-common/compare/v0.0.9...v0.0.10) (2016-05-01)

### Bug Fixes

* **Authorship:** authorship is whitespace ([5cdc981](https://github.com/coldrye-es/ypo-parser-common/commit/5cdc981))
* **Comment:** comment is whitespace ([b2f70f7](https://github.com/coldrye-es/ypo-parser-common/commit/b2f70f7))

<a name="0.0.9"></a>

Am I doing something wrong?

@silkentrance
Copy link
Author

I have checked and the changelog-commits-parser is working just fine, extracting the correct amount of messages from the log. It seems as if the refactor message gets lost after the commits parser.

@silkentrance
Copy link
Author

And I think that I just found the reason why...

var discard = true;
[...]
    } else if (commit.type === 'revert') {
      commit.type = 'Reverts';
    } else if (discard) {
      return;
    } else if (commit.type === 'docs') {
      commit.type = 'Documentation';

Why?

@stevemao
Copy link
Collaborator

stevemao commented May 1, 2016

If the prefix is feat, fix or perf, it will appear in the changelog. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.

@stevemao stevemao closed this as completed May 1, 2016
@silkentrance
Copy link
Author

So you basically say that I need to fork this in order to have a decent changelog?

@silkentrance
Copy link
Author

@stevemao what is the license of this?

@stevemao
Copy link
Collaborator

stevemao commented May 1, 2016

no, you could just require this and make changes.

@silkentrance
Copy link
Author

@stevemao since writerOpts#transform uses a private function issueUrl() I would have to reimplement the same functionality. How about making this a bit more extensible? For example export function issueUrl()...

The same with the given hard coded regular expressions, which I would also have to reimplement.

@silkentrance
Copy link
Author

@stevemao and why will it

 47     commit.notes.forEach(function(note) {
 48       note.title = 'BREAKING CHANGES';
 49       discard = false;
 50     });

and unconditionally so if there are any notes present?

@stevemao
Copy link
Collaborator

stevemao commented May 1, 2016

since writerOpts#transform uses a private function issueUrl() I would have to reimplement the same functionality.

This is a known issue. See conventional-changelog-archived-repos/conventional-changelog-writer#20

@stevemao
Copy link
Collaborator

stevemao commented May 1, 2016

and unconditionally so if there are any notes present?

Remember, this is for angular so they have made the rules.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants