question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request] Add command to generate only recent changelog changes

See original GitHub issue

Description

So a normal workflow would be to automatically release to GitHub after a new version tag is created. That part works, but there is no good way to include the recent changelog additions as the body paragraph of the GitHub release.

To release with github actions, you do something like

name: Release

on:
  push:
    tags:
      - "v*"

jobs:
  github_release:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: Release to GitHub
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        body: |
        "my new changes here"
        draft: false
        prerelease: false

Currently, and please correct me if I’m wrong, there is no way to automatically fill “body” with the recent additions to the changelog

Possible Solution

Introduce an option to cz changelog that would allow to to generate the most recent version so you could say something like this:

    # so we can use it as the github release body
    - name: Store recent changelog changes
      run: |
        echo ::set-env name=CHANGELOG::$(cz changelog --dry-run --recent)

    - name: Release to GitHub
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        body: ${{ env.CHANGELOG }}
        draft: false
        prerelease: false

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
jtpavlockcommented, Jul 24, 2020

cz changelog --incremental --dry-run

This will generate the changelog for the next version. I’m trying to get the changelog for the most recent version.

cz changelog --dry-run --start-rev 0.1.0

I don’t think there’s any way to programatically know the previous version. This would work, if --start-rev included the version passed, but I don’t think that’s the current behavior.

0reactions
jtpavlockcommented, Jul 8, 2021

Would something like #399 be useful?

Yes, that looks like it would solve my issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog entries - GitLab Docs
Each list item, or entry, in our CHANGELOG.md file is generated from the subject line of a Git commit. Commits are included when...
Read more >
Generating release notes from git commit messages using ...
Generating release notes from git commit messages using basic shell commands (git/grep) · 3. Showing commit logs · 4. Formatting the commit logs ......
Read more >
Git Feature Branch Workflow | Atlassian Git Tutorial
Start with the main branch · Create a new-branch · Update, add, commit, and push changes · Push feature branch to remote ·...
Read more >
iOS 16 - New Features - Apple
See all the latest features, enhancements, app updates, and more in iOS 16 for iPhone. ... Apple Cash payment requests make it easy...
Read more >
Update Angular to v15
Angular v15 brings many improvements and new features. ... API makes it possible to add directives to host elements, addressing feature request #8785....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found