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: choice nested eemoji rule apply mode {scope}, {subject} or boths #31

Open
pabloaugusto opened this issue May 27, 2024 · 0 comments

Comments

@pabloaugusto
Copy link

pabloaugusto commented May 27, 2024

Its primordial an option make nested eemoji rule only be applied to the {scope} context. The actual behavior is to be applied to any keyword (at any position) in the context of {scope} +{subject}.

At my example, we can see how it can make a mess in git repo icons and brings wrong information.

Maybe you can create a new context {scope} and add it to config possibilities extending format options.
Or, forgetting BDUF and concentrating only on this feat, you can create a simple additional option on nested emoji to control if should be applied to {subject} context or not.

Context options

  • subject: apply only to {subject}
  • scope: apply only to {scope}
  • all: apply to {subject} and {scope} (it how actually woks)

example idea:

export default defineDefaultConfig({
	format: '{emoji} {type}: {subject}',
        nest-context: 'subject|scope|all'
})

My actual scenario example

Example eemoji config:

chore: {
	'.': '🗑️',
	'release': '🔖',
	'cleanup': '🧹',
	'license': '📜',
	'deps': '📦',
	'lint': '🧼',
	'readme': '📕,📗,📘,📙'

Example commit:

git commit -m 'chore(my-package): maybe in future we need bump some deps'

Expected return:

[main 96301a1] 🗑️ chore(my-package): maybe in future we need bump some deps

received return at this moment:

[main 96301a1] 📦 chore(my-package): maybe in future we need bump some deps
@pabloaugusto pabloaugusto changed the title feat: choice nested eemoji rule applied mode {scope} {subject} or boths feat: choice nested eemoji rule apply mode {scope}, {subject} or boths May 27, 2024
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

1 participant