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

Changelog Header Repeated #1696

Labels

Comments

@mikebm
Copy link

mikebm commented Sep 20, 2018

When using -conventional-commits, there is a hardcoded header that gets added to the commit log everytime it is ran. This results in every version repeating the header in the changelog.

It would also be nice to customize or remove this header all together.

Expected Behavior

I would expect that the header get first removed from the existing changelog before the new changelog gets written out so that there is only one header at the top of the file.

Current Behavior

Header is repeated everytime you publish resulting in numerous headers throughout the file.

Possible Solution

First strip out the header out of the existing changelog before writing it out again.

Steps to Reproduce (for bugs)

  1. Make some changes and commit it to the repo.
  2. Run lerna publish --conventional-commits
  3. Make additional changes and commit to the repo.
  4. Run lerna publish --conventional-commits
{
  "lerna": "2.11.0",
  "packages": [
    "packages/*"
  ],
  "version": "independent",
  "command": {
    "init": {
      "exact": true
    },
    "publish": {
      "verifyAccess": false,
      "exact": true,
      "yes": true,
      "conventionalCommits": true
    }
  },
  "ignoreChanges": [
    "**/test/**",
    "**/*.md"
  ]
}
Executable Version
lerna --version 3.2
npm --version 6.4.1
node --version v8.12.0
@evocateur
Copy link
Member

I'm afraid I'm going to need more detail, as I do these exact steps in lerna itself (and many other repos) and have never encountered this problem. It stands to reason that the method of locating the insertion point could be better (for example, it's searching for a brittle HTML substring that is no longer present in v5 of the angular changelog preset).

Without a failing test example, I don't know that I can make any confident diagnosis.

@stale
Copy link

stale bot commented Dec 27, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 27, 2018
@stale stale bot closed this as completed Jan 3, 2019
@lock
Copy link

lock bot commented Apr 3, 2019

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.