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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 馃幐 allow user to customize format with issues #338

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LiJiahaoCoder
Copy link

This PR allows users to customize format with issues, and Close: #issue will not show in commit message if users have configured issues in format. Just as test case in PR:

it('does not include emoji, if emojis disabled in config (with issues)', () => {
  const message = formatCommitMessage({
    ...defaultState,
    answers: {
      ...defaultState.answers,
      issues: '#123'
    },
    config: {
      ...defaultConfig,
      disableEmoji: true,
      format: '{issues} {type}: {subject}'
    }
  });

  expect(message).equal('#123 feat: First commit');
});

If users don't configure issues in format, the result will be:

it('does not include emoji, if emojis disabled in config (without issues)', () => {
  const message = formatCommitMessage({
    ...defaultState,
    answers: {
      ...defaultState.answers,
      issues: '#123'
    },
    config: {
      ...defaultConfig,
      disableEmoji: true
    }
  });

  expect(message).equal('feat: First commit\n\nClosed: #123');
});

@AbdealiLoKo
Copy link

Any lluck in getting this merged ? Would be great to have this

@nigelbro
Copy link

nigelbro commented Jun 9, 2022

Can we get this merged?

@Nunnius
Copy link

Nunnius commented May 8, 2024

@streamich Can we get this merged?

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

Successfully merging this pull request may close these issues.

None yet

4 participants