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

Discard commits in commit_preprocessors or similar extension point #144

Open
gabyx opened this issue Mar 8, 2023 · 0 comments
Open

Discard commits in commit_preprocessors or similar extension point #144

gabyx opened this issue Mar 8, 2023 · 0 comments
Assignees
Labels
feature/request New feature or request

Comments

@gabyx
Copy link

gabyx commented Mar 8, 2023

Is your feature request related to a problem? Please describe.
I want to discard commits after git-cliff has extracted the range of commits. The commit_preprocessors exists but I am not sure if that is possible, its probably the wrong place.

Describe the solution you'd like

I think a commit_filter section similar to the commit_preprocessors might be useful, with the ability to run some custom commands. We have some internal tool which can detect if a commit should be included in the changelog, basically for the monorepo usecase. It would be nice to specify

{ filter_command: "detect-if-commit-is-included.py" }

which will get --input input.yaml which contains all commits

commits:
  - 123123123123123...
  - a12312312341212...

and myspecialtool.py outputs the filtered new list to input.yaml which then will get taken care of by git-cliff.

One could also think of the commit_filter run after parsing the conventional commits, so we would already have more input, basically handing over the whole template context to the command.

Describe alternatives you've considered

  • Nothing.
@gabyx gabyx changed the title feat: Discard commits in commit_preprocessors feat: Discard commits in commit_preprocessors or similar extension point Mar 8, 2023
@orhun orhun added the feature/request New feature or request label Apr 26, 2023
@orhun orhun changed the title feat: Discard commits in commit_preprocessors or similar extension point Discard commits in commit_preprocessors or similar extension point Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants