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

Filter scopes #1186

Open
jcornaz opened this issue Jan 1, 2022 · 3 comments
Open

Filter scopes #1186

jcornaz opened this issue Jan 1, 2022 · 3 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jcornaz
Copy link

jcornaz commented Jan 1, 2022

Is your feature request related to a problem? Please describe.

Let's say I have some changes pending to be released. Then I realized there is a bug in one of the new unreleased features. So I fix it.

What should be the commit message type for that fix? It is definitely a fix, so the only commit type that makes sense is fix. But it's a fix of a bug that is not released, so I don't want that log to appear in the changelog (the next release will not fix that bug, because that bug didn't exist in the last release).

Describe the solution you'd like

  1. I would like to use the fix type with a special unreleased "scope". Example: fix(unreleased): blablabla.
  2. I'd like to configure release-please ignore all commits that have the unreleased scope.

Note that release-please would not know about the unreleased scope. That would be my own project-wide convention. I'd only tell release please to ignore some scopes.

This has the advantage to be a generic solution that can be applied to other needs. For example, if my repository contains multiple parts let's say frontend and backend. I may decide to exclude the backend scope from the changelog because I destinate the changelog to users of the frontend.

Describe alternatives you've considered

There could be a special footer, that tells what commit introduced the bug. Example:

fix: blablabla

bug-introduced-by: deadbeef

And then release-please would automatically choose to either include it in the changelog (if it fixes an already released bug) or exclude it (if it fixes a non-released bug).

But I think it is more complex to implement/maintain and is useful to fewer use cases.

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jan 2, 2022
@tmatsuo tmatsuo added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed triage me I really want to be triaged. labels Jan 4, 2022
@collindutter
Copy link

@jcornaz did you ever find a good solution for this?

@jcornaz
Copy link
Author

jcornaz commented Mar 7, 2025

@jcornaz did you ever find a good solution for this?

No, not really.

@collindutter
Copy link

Don't love this solution but I introduced new hidden types, hfix and hrevert. Now I can "hide" commits by using the commit override feature.

fix: fixed an unreleased bug
BEGIN_COMMIT_OVERRIDE
hfix: fixed an unreleased bug
END_COMMIT_OVERRIDE

release-please-config.json

{
  "versioning": "always-bump-minor",
  "release-type": "python",
  "changelog-sections": [
    {
      "type": "feat",
      "section": "✨ Features",
      "hidden": false
    },
    {
      "type": "fix",
      "section": "🐛 Bug Fixes",
      "hidden": false
    },
    {
      "type": "hfix",
      "section": "🤫 Bug Fixes",
      "hidden": true
    },
    {
      "type": "perf",
      "section": "🚀 Performance Improvements",
      "hidden": false
    },
    {
      "type": "revert",
      "section": "🗑 Reverts",
      "hidden": false
    },
    {
      "type": "hrevert",
      "section": "🤫 Reverts",
      "hidden": true
    },
    {
      "type": "docs",
      "section": "📚 Documentation",
      "hidden": true
    },
    {
      "type": "style",
      "section": "💎 Styles",
      "hidden": true
    },
    {
      "type": "chore",
      "section": "♻️ Miscellaneous Chores",
      "hidden": true
    },
    {
      "type": "refactor",
      "section": "📦 Code Refactoring",
      "hidden": true
    },
    {
      "type": "test",
      "section": "🚨 Tests",
      "hidden": true
    },
    {
      "type": "build",
      "section": "🛠 Build System",
      "hidden": true
    },
    {
      "type": "ci",
      "section": "⚙️ Continuous Integration",
      "hidden": true
    }
  ],
  "packages": {
    ".": {}
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

5 participants