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

feat(conventionalcommits): allow the scope to be omitted #708

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

felipecrs
Copy link

Example:

{ type: 'build', scope: 'deps', section: 'Dependencies', omitScope: true }

produces:

## Dependencies

- upgrade example from 1 to 2

rather than:

## Dependencies

- **deps:** upgrade example from 1 to 2

@bcoe
Copy link
Member

bcoe commented Dec 25, 2020

@felipecrs I'm wondering if we could avoid adding an additional configuration option, what if you passed the commits through a transform stream and remove the scope:

class PostProcessCommits extends Transform {
  _transform(
    chunk: ParsedConventionalCommit,
    _encoding: string,
    done: Function
  ) {
  delete chunk.scope
}

☝️ something like this.

@felipecrs
Copy link
Author

I'm not sure if I understood. Apart from the implementation suggestion, are you saying that we should automatically omit the scope if the user defined a scope for the type?

@bcoe
Copy link
Member

bcoe commented Dec 29, 2020

Apart from the implementation suggestion, are you saying that we should automatically omit the scope if the user defined a scope for the type?

@felipecrs because there are so many configuration options that someone could set, I'm hesitant to add a toggle; an alternative option would be changing the commit object before it goes to the parser, or passing an alternate template for commits.

@felipecrs
Copy link
Author

an alternative option would be changing the commit object before it goes to the parser, or passing an alternate template for commits.

Okay... I'm just confused, how could I set this with https://github.com/semantic-release/release-notes-generator then?

@bcoe
Copy link
Member

bcoe commented Jan 8, 2021

@felipecrs I'll make an effort to pull together an example 👍

sorry for the slow reply.

@felipecrs
Copy link
Author

@bcoe ping :)

@maximenathan
Copy link

Following :)

@felipecrs
Copy link
Author

felipecrs commented May 2, 2022

Hello, can someone give this another chance? I believe it's ready to be reviewed, if not to be merged.

Unfortunately, my changelogs (like this) still keeps suffering of such a redundant text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants