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

Suggest some feature #111

Closed
vacnex opened this issue Jun 16, 2023 · 18 comments
Closed

Suggest some feature #111

vacnex opened this issue Jun 16, 2023 · 18 comments

Comments

@vacnex
Copy link
Contributor

vacnex commented Jun 16, 2023

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.

jaywcjlove added a commit that referenced this issue Jun 16, 2023
@jaywcjlove
Copy link
Owner

@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

@jaywcjlove
Copy link
Owner

@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.

@jaywcjlove
Copy link
Owner

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

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

@vacnex
Copy link
Contributor Author

vacnex commented Jun 16, 2023

@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
Copy link
Contributor Author

vacnex commented Jun 16, 2023

@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?

jaywcjlove added a commit that referenced this issue Jun 16, 2023
jaywcjlove added a commit that referenced this issue Jun 16, 2023
@jaywcjlove
Copy link
Owner

@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"

@jaywcjlove
Copy link
Owner

@vacnex Upgrade v1.8.0, use template input.

jaywcjlove added a commit that referenced this issue Jun 16, 2023
@vacnex
Copy link
Contributor Author

vacnex commented Jun 16, 2023

@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

@jaywcjlove
Copy link
Owner

@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.

@vacnex
Copy link
Contributor Author

vacnex commented Jun 16, 2023

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

@jaywcjlove
Copy link
Owner

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.

@jaywcjlove
Copy link
Owner

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

@vacnex
Copy link
Contributor Author

vacnex commented Jun 16, 2023

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}}

@jaywcjlove
Copy link
Owner

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

@vacnex
Copy link
Contributor Author

vacnex commented Jun 16, 2023

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

@jaywcjlove
Copy link
Owner

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

@vacnex
Copy link
Contributor Author

vacnex commented Jun 16, 2023

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

jaywcjlove added a commit that referenced this issue Jun 16, 2023
jaywcjlove added a commit that referenced this issue Jun 16, 2023
@jaywcjlove
Copy link
Owner

@vacnex Upgrade v1.9.1

@vacnex vacnex closed this as completed Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants