jaywcjlove / changelog-generator

A GitHub Action that compares the commit differences between two branches

Home Page:https://jaywcjlove.github.io/changelog-generator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suggest some feature

vacnex opened this issue · comments

Hi, thank for great work, I highly appreciate the convenience provided by this tool and I would like to contribute some ideas to further enhance its functionality.

  1. Currently, the changelog is listed from top to bottom in chronological order, starting from the oldest to the newest. I want to categorize them into separate types. For example, feat will be listed under #Feature, fix will be under #Bugs, and so on for other types.

  2. Sometimes, there are commits that I don't want to appear in the changelog, so I have used the following filter:
    ^(?!type\b|feat\b|style\b|chore\b|doc\b|docs\b|build\b|fix\b|test\b|refactor\b|website\b|revert\ b|clean\b|perf\b|ci\b).*
    Therefore, I think there should be an option to allow users to create a custom type and include or exclude it from the changelog.

  3. Some my projects are developed solely by me, there should also be an option to hide the author, as all commits are mine. I don't find it necessary to display @author on every entry in the changelog.

@vacnex To filter username display you can use filter-author

filter-author:
description: 'Regular expression to filter user name not to display.'
default: ''
required: false

@vacnex 1 idea, I may need to define templates to achieve this idea.

- name: Generate changelog
  uses: jaywcjlove/changelog-generator@main
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    filter-author: (jaywcjlove|小弟调调™|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
    filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
    template: |
        ## Bugs

        {{fix}}

        ## Feature

        {{feat}}{{type}}

        ## Document 

        {{doc}}

@vacnex If you are sure that your idea can be satisfied, I will start to realize it.

@vacnex 2 To exclude logs, you can use the following method.

filter:
description: 'Regular expression filtering'
default: ''
required: false

@vacnex 1 idea, I may need to define templates to achieve this idea.

- name: Generate changelog
  uses: jaywcjlove/changelog-generator@main
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    filter-author: (jaywcjlove|小弟调调™|dependabot|renovate\\[bot\\]|dependabot\\[bot\\]|Renovate Bot)
    filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
    template: |
        ## Bugs

        {{fix}}

        ## Feature

        {{feat}}{{type}}

        ## Document 

        {{doc}}

@vacnex If you are sure that your idea can be satisfied, I will start to realize it.

great this is what I expected 👍

@vacnex To filter username display you can use filter-author

filter-author:
description: 'Regular expression to filter user name not to display.'
default: ''
required: false

my understanding is that this will not display the changlogs created by me, am I understanding its purpose correctly?

@vacnex To filter username display you can use filter-author

filter-author:
description: 'Regular expression to filter user name not to display.'
default: ''
required: false

my understanding is that this will not display the changlogs created by me, am I understanding its purpose correctly?

Match "@author", do not display "@author"

@vacnex Upgrade v1.8.0, use template input.

@vacnex Upgrade v1.8.0, use template input.

Just tested
image
work great, can you add default like "🔶 Nothing change" if type has nothing change

@vacnex Upgrade v1.8.0, use template input.

Just tested image work great, can you add default like "🔶 Nothing change" if type has nothing change

I don't understand how Misc matches.

I don't understand how Misc matches.

Im config like this

template: |
         ## Bugs
          {{fix}}
          ## Feature
          {{feat}}
          ## Improve
          {{refactor}}
          {{perf}}
          {{clean}}
          ## Misc 
          {{chore}}
          {{style}}
          {{ci}}
          {{build}}

as you see im add {{chore}} {{style}} {{ci}} {{build}} and my commit list has nothing in these type so ##mics will empty so im want add default if nothing in these type will return 🔶 Nothing change

my expected like this

Bugs

  • 🐞 fix: Fixed test 46bccf4

Feature

  • 🌟 feat: test feat 3959ee2

Improve

  • 💊 clean: remove comment code. 5630fce
  • 💊 clean: remove comment code. c255511
  • 💊 clean: test clean add83cc

Misc

  • 🔶 Nothing change
template: |
  ## Bugs
  {{fix}}
  ## Feature
  {{feat}}
  ## Improve
  {{refactor,perf,clean}}
  ## Misc 
  {{chore,style,ci||🔶 Nothing change}}

@vacnex Do you think it is possible to design such a template? I think it could be very flexible.

@vacnex If you think it's okay, I'll implement this feature.

template: |
  ## Bugs
  {{fix}}
  ## Feature
  {{feat}}
  ## Improve
  {{refactor,perf,clean}}
  ## Misc 
  {{chore,style,ci||🔶 Nothing change}}

@vacnex Do you think it is possible to design such a template? I think it could be very flexible.

hmm i think it's okay but if i define more type so i need add "||🔶 Nothing change" on every type, any else solution?

template: |
  ## Bugs
  {{fix ||🔶 Nothing change}}
  ## Feature
  {{feat ||🔶 Nothing change}}
  ## Improve
  {{refactor,perf,clean ||🔶 Nothing change}}
  ## Misc 
  {{chore,style,ci||🔶 Nothing change}}

@vacnex || xxxx is not defined, will be removed

I'm imagining this
config template like

template: |
  ## Bugs
  {{fix, type}}
  ## Feature
  {{feat}}
  ## Improve
  {{refactor,perf,clean}}
  ## Misc 
  {{chore,style,ci}}

with every {{}} and type defined inside, we will check if just one type like {{feat}} and feat is empty so show "🔶 Nothing change" else more than one type {{fix, type}} and if all defined type is empty then show "🔶 Nothing change"
exp {{fix, type}}
fix emtpy and type not empty => show type
fix and type => show fix and type
fix and type emtpy => show fix
both empty => 🔶 Nothing change

{{refactor,perf,clean ||🔶 Nothing change}} This prompt is defined by myself, because I am in the Chinese area and need to modify it. @vacnex

That's great, I'm looking forward to your next update

@vacnex Upgrade v1.9.1