mikepenz / release-changelog-builder-action

A GitHub action that builds your release notes / changelog fast, easy and exactly the way you want.
https://blog.mikepenz.dev
Apache License 2.0
703 stars 104 forks source link

commitMode: true still includes extra lines refering to pull request #0 #1249

Closed KonradHoeffner closed 1 year ago

KonradHoeffner commented 1 year ago

The the following job sets commitMode to true but still contains unneeded references to nonexisting PRs.

Job

jobs:
  create-release:
    name: Create release
    runs-on: ubuntu-latest
    outputs:
      upload_url: ${{ steps.create-release.outputs.upload_url }}
    steps:
      - name: Build Changelog
        id: build-changelog
        uses: mikepenz/release-changelog-builder-action@v4
        with:
          commitMode: true
      - name: Create Release
        id: create-release
        uses: softprops/action-gh-release@v1
        with:
          body: ${{steps.build-changelog.outputs.changelog}}

Output

## 📦 Uncategorized

- Add coloring by prefix using conf:byPrefix.
   - PR: #0
- added travis file
   - PR: #0
- Travis update
   - PR: #0
- Travis deploy setup
   - PR: #0
- Trying to figure out right file location
   - PR: #0
- hardcoded path for test
   - PR: #0
- Skip cleanup
   - PR: #0
- Travis on tags
   - PR: #0
- Initial Dockerfile, runs but no config yet
   - PR: #0
- Merge pull request #29 from zazukoians/master
   - PR: #0
- added new comment for issue 32
   - PR: #0
- Merge pull request #27 from IMISE/feature-colorbyprefix
   - PR: #0
- Build docker image from source.
   - PR: #0
- Fix whitespace.
   - PR: #0
- Update the jena dependency.
   - PR: #0
- Merge pull request #39 from attadanta/better-docker-build
   - PR: #0
- Merge pull request #40 from attadanta/update-jena
   - PR: #0
- Support environment variables with the 'LodLive' prefix to override single config values in conf.ttl.
   - PR: #0
- Support .env file for configuration. Bump up Java version to 1.8 to support the Java dotenv library.
   - PR: #0
- Use SLF4J Logging instead of System.out.println() and System.err.println().
   - PR: #0
- Merge pull request #50 from hitontology/feature-logging
   - PR: #0
- Upgrade Tomcat from version 7 to 9.
   - PR: #0
- Use serial garbage collector to reduce memory consumption.
   - PR: #0
- Merge pull request #47 from KonradHoeffner/feature-environment-variables
   - PR: #0
- Merge pull request #55 from KonradHoeffner/optimize-docker-memory
   - PR: #0
- Upgrade Jena from version 2.13.0 to 4.4.0. Upgrade Java to version 11.
   - PR: #0
- Use Docker layer cache for Maven dependencies to speed up repeated builds with the same pom.xml
   - PR: #0
- fix conf:homeUrl default value
   - PR: #0
- Added translations for Spanish and Asturian
   - PR: #0
- Merge pull request #68 from herminiogg/master
   - PR: #0
- Merge pull request #61 from KonradHoeffner/patch-1
   - PR: #0
- Merge pull request #48 from KonradHoeffner/feature-dotenv
   - PR: #0
- Merge pull request #51 from KonradHoeffner/upgrade-docker-tomcat-9
   - PR: #0
- Merge pull request #60 from KonradHoeffner/docker-dependency-layer-cache
   - PR: #0
- Merge branch 'master' into upgrade-jena-4.4.0
   - PR: #0
- Merge pull request #58 from KonradHoeffner/upgrade-jena-4.4.0
   - PR: #0
- fix dotenv, resolve #69
   - PR: #0
- Add GitHub Container Registry publish action.
   - PR: #0
- Specify syntax version 1 in Dockerfile.
   - PR: #0
- update to actions/checkout@v4
   - PR: #0
- automatically generate release with release notes on appropriate tags
   - PR: #0

Solution

When commitMode is active, all lines containing - PR: #0 should not be generated.

mikepenz commented 1 year ago

Thank you for creating the ticket. This currently works as expected, as this follows the default template (in line with the default behavior using pull requests)

You can see the default template defined here: https://github.com/mikepenz/release-changelog-builder-action/blob/develop/src/configuration.ts#L74

Configure the action to use a different PR template to match your requirements.

mikepenz commented 1 year ago
      - name: Build Changelog
        id: build-changelog
        uses: mikepenz/release-changelog-builder-action@v4
        with:
          commitMode: true
          configurationJson: |
            {
              "pr_template": "- #{{TITLE}}"
            }
KonradHoeffner commented 1 year ago

Thank you for the quick help and the awesome GitHub action, I will do that!