Skip to content

Conversation

roggervalf
Copy link
Contributor

@roggervalf roggervalf commented Aug 18, 2025

conventional commits preset support ignoreCommits options from https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/src/index.js#L11. This is an extension of release-notes-generator for supporting this option from this preset.
I've been trying to ignore few specific patterns from one of my repos like messages that contains [python] string. This is successfully working commit-analyzer level with this plugin config:

[
        "@semantic-release/commit-analyzer",
        {
          "releaseRules": [
            {
              "message": "*\\[python\\]*",
              "release": false
            }
          ]
        }
      ],

but when generating release notes with the following config:

[
        "@semantic-release/release-notes-generator",
        {
          "preset": "conventionalcommits",
          "presetConfig": {
            "ignoreCommits": "\\[python\\]"
          }
]

that conventional commits seems to receive, it's not working. This pr is trying to support this existing presetConfig https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-conventionalcommits#specific-options, this option is being passed here

@roggervalf
Copy link
Contributor Author

pls @travi @gr2m if you get some time

@travi
Copy link
Member

travi commented Aug 21, 2025

This is an open source project maintained by volunteers. Please refrain from pinging maintainers after this has only been open for three days. We will review when we have time. You could really help us out by explaining the value that this proposal would unlock.

@roggervalf
Copy link
Contributor Author

sorry about it, no hurries. I'll update my pr description to explain my use case

@travi
Copy link
Member

travi commented Aug 22, 2025

i'm ok with accepting this change, but it should be documented in the README. could you add it to the options there with a brief description that aligns with the descriptions of the other options documented there?

Copy link
Member

@travi travi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in addition to the readme addition, it looks like there are linting issues that need to be resolved. you should be able to handle those by running npm run lint:prettier:fix locally. be sure to run npm test locally to make sure all of our automated verification passes

@roggervalf
Copy link
Contributor Author

thank you, I could fix lint issues and validate that tests are passing locally. For documenting this option I added it as a side note as others that I could see, as it's specific to conventionalcommits preset

@roggervalf roggervalf force-pushed the support-ignoreCommits branch from 4245152 to 56832df Compare August 26, 2025 03:38
@roggervalf roggervalf requested a review from travi August 28, 2025 00:38
@travi
Copy link
Member

travi commented Aug 29, 2025

i'm coming back to this with fresh eyes and i'm still confused why this is necessary.

presetConfig is already being passed through to the preset that is being loaded. that should allow the preset to take care of this option as long as the preset supports it, like the conventionalcommits preset does.

the change you've proposed here seems to lift the ignore capability from the preset to be directly in this plugin. why is this necessary rather than letting the preset handle the ignoring? does this introduce this functionality for presets that do not support it?

what am i misunderstanding?

@travi
Copy link
Member

travi commented Aug 29, 2025

For documenting this option I added it as a side note as others that I could see, as it's specific to conventionalcommits preset

given my updated perspective, i think youre right that this is too specific to the conventionalcommits preset. i think the passing of that option under presetConfig is already described in a generic way in the options table. lets go ahead and remove this addition in favor of what was already there. sorry for the confusion around this detail

@roggervalf
Copy link
Contributor Author

i'm coming back to this with fresh eyes and i'm still confused why this is necessary.
presetConfig is already being passed through to the preset that is being loaded. that should allow the preset to take care of this option as long as the preset supports it, like the conventionalcommits preset does.
the change you've proposed here seems to lift the ignore capability from the preset to be directly in this plugin. why is this necessary rather than letting the preset handle the ignoring? does this introduce this functionality for presets that do not support it?
what am i misunderstanding?

hey @travi, yes. Preset has that option but it does not do anything special than return it as in this line https://github.com/conventional-changelog/conventional-changelog/blob/master/packages/conventional-changelog-conventionalcommits/src/index.js#L11. As it's only returning this option transformed, this pr is handling that functionality.

@roggervalf roggervalf force-pushed the support-ignoreCommits branch from 73a146f to a655fbc Compare August 30, 2025 16:45
@travi travi merged commit 485bc0a into semantic-release:master Sep 5, 2025
5 checks passed
Copy link

github-actions bot commented Sep 5, 2025

🎉 This PR is included in version 14.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@roggervalf roggervalf deleted the support-ignoreCommits branch September 5, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants