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

lerna version --conventional-graduate does not generate correct changelog #3992

Open
gbublys opened this issue Apr 29, 2024 · 3 comments
Open

Comments

@gbublys
Copy link

gbublys commented Apr 29, 2024

Current Behavior

We have a setup of two branches: main and development. The development branch is used to push latest changes and triggers version updates like so:

npx lerna version --conventional-commits --conventional-prerelease --preid dev --yes

The command is working great, as expected. However once we are done with our desired changes, we want to push the development branch into the main branch, which afterwards trigger the following command:

npx lerna version --conventional-commits --conventional-graduate --yes

However, the command even though is referencing the right latest release tag - is not picking up the changelog correctly and as a result dumps into the changelog the following message:

0.9.0
Note: Version bump only for package @fee/foo

Expected Behavior

We are expecting the command to pick all the changes since the last main's branch tag that were merged and generate changelog which consists of semantic commit messages:

0.9.0
Features
* Added foo feature
* Added fee feature

Steps to Reproduce

I have created a test repository which you should be able to access here: https://github.com/gbublys/semantic-versioned-monorepo-setup

Steps to reproduce:

  1. Create a new branch based from the development branch
  2. Push the changes into the new branch with semantic commit message
  3. Create a merge request into the develop branch
  4. Merge the changes, wait for the release pipeline to generate new versions
  5. Create a PR from development to main and merge it
  6. Wait for the release pipeline to graduate packages and sync-up development branch
  7. Expect CHANGELOG.md files containing no commit messages, but bump only messages

Failure Logs / Configuration

Example PR to development branch: gbublys/semantic-versioned-monorepo-setup#61
CI configuration: https://github.com/gbublys/semantic-versioned-monorepo-setup/blob/development/.github/workflows/semantic-release.yml
CI output:
https://github.com/gbublys/semantic-versioned-monorepo-setup/actions/runs/8881360581/job/24383510550
image

Merge develop with above change into the main branch:
gbublys/semantic-versioned-monorepo-setup#62

CI Output:
image
https://github.com/gbublys/semantic-versioned-monorepo-setup/actions/runs/8881395704/job/24383627626

Generated changelog:
image

Environment

Github and repository mentioned above

@gbublys
Copy link
Author

gbublys commented Apr 30, 2024

It seems like I was able to resolve issue by adding --include-merged-tags option to release command:

npx lerna version --conventional-commits --conventional-graduate --yes --include-merged-tags

I will run more tests before closing the issue


Edit: It does not work.

@kantivekariya
Copy link

@gbublys Is there any update on these issues? I'm also facing these issues.

@Juveniel
Copy link

related: #3882

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

No branches or pull requests

3 participants