Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include other types of commit message to CHANGELOG (test, docs) #2205

Closed
serhiiminin opened this issue Jul 31, 2019 · 4 comments
Closed

Include other types of commit message to CHANGELOG (test, docs) #2205

serhiiminin opened this issue Jul 31, 2019 · 4 comments

Comments

@serhiiminin
Copy link

lerna.json

{
  "lerna": "3.2.1",
  "packages": [
    "packages/apps/*"
  ],
  "version": "independent",
  "command": {
    "version": {
      "message": "chore(release): publish"
    }
  }
}

lerna-debug.log

0 silly argv { _: [ 'version' ],
0 silly argv   'conventional-commits': true,
0 silly argv   conventionalCommits: true,
0 silly argv   lernaVersion: '3.2.1',
0 silly argv   '$0':
0 silly argv    '/home/serhii/Desktop/projects/project/node_modules/.bin/lerna' }
1 notice cli v3.2.1
2 verbose rootPath /home/serhii/Desktop/projects/project
3 info versioning independent
4 silly isAnythingCommitted
5 verbose isAnythingCommitted 1
6 silly currentBranch
7 verbose currentBranch feature/#10-changelog-generation-must-include-all-commit-types
8 silly isBehindUpstream
9 error Error: Command failed: git rev-list --left-right --count origin/feature/#10-changelog-generation-must-include-all-commit-types...feature/#10-changelog-generation-must-include-all-commit-types
9 error fatal: ambiguous argument 'origin/feature/#10-changelog-generation-must-include-all-commit-types...feature/#10-changelog-generation-must-include-all-commit-types': unknown revision or path not in the working tree.
9 error Use '--' to separate paths from revisions, like this:
9 error 'git <command> [<revision>...] -- [<file>...]'
9 error
9 error
9 error     at makeError (/home/serhii/Desktop/projects/project/node_modules/execa/index.js:172:9)
9 error     at Function.module.exports.sync (/home/serhii/Desktop/projects/project/node_modules/execa/index.js:341:15)
9 error     at Object.execSync (/home/serhii/Desktop/projects/project/node_modules/@lerna/child-process/index.js:22:16)
9 error     at countLeftRight (/home/serhii/Desktop/projects/project/node_modules/@lerna/version/lib/is-behind-upstream.js:30:31)
9 error     at isBehindUpstream (/home/serhii/Desktop/projects/project/node_modules/@lerna/version/lib/is-behind-upstream.js:14:27)
9 error     at VersionCommand.initialize (/home/serhii/Desktop/projects/project/node_modules/@lerna/version/index.js:109:7)

Context

I am working on a project that contains multiple apps in one repo. Now, lerna generates changelogs for each app. I am using different types of conventional commits (e.g. test, docs, style, chore, ect.) Currently, by default, my changelogs contain only 3 types of commits (fix, feat and BREAKING CHANGE, regarding to SemVer). I want my changelogs to contain all types of commit messages (test, docs, ect.)
Is it possible to do it with lerna config?

Your Environment

Executable Version
lerna --version ^3.2.1
npm --version 6.10.1
node --version 10.16.0
OS Version
Ubuntu 19.04
@thuringia
Copy link

Sounds to me like this is related to the issues raised in #2138 und #2248
This would be solved if lerna invokes conventional-changelog correctly.

@serhiiminin Did you check if npx conventional-changelog -p angular (the angular template used by lerna at the moment) contains your desired commit types? npx conventional-changelog -p conventionalcommit (the conventional commits template that is the current default there) should list them in any case

@evocateur
Copy link
Member

This is what --changelog-preset is for. Lerna passes it through to conventional changelog's JS API.

@thuringia
Copy link

This is what --changelog-preset is for. Lerna passes it through to conventional changelog's JS API.

@evocateur That is true, but due to the issues described in #2138 you cannot use that switch at the moment. Maybe we should just highlight this a bit better until the issue is fixed.

@evocateur
Copy link
Member

@thuringia I added the "help wanted" tag on #2138 almost 5 months ago. So far, not a peep.

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

No branches or pull requests

3 participants