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(config): CHP-7101 add commitlint-config-jira #54

Merged
merged 1 commit into from
Jul 21, 2021
Merged

feat(config): CHP-7101 add commitlint-config-jira #54

merged 1 commit into from
Jul 21, 2021

Conversation

chanceaclark
Copy link
Contributor

@chanceaclark chanceaclark commented Jul 8, 2021

What/why?

Adds the "recommended" config that we (BigCommerce) adhere to.

@chanceaclark chanceaclark changed the title Chore/config feat(config): CHP-7101 add commitlint-config-jira Jul 8, 2021
Comment on lines +8 to +13
// https://github.com/conventional-changelog/commitlint/issues/2631
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
'subject-case': [2, 'never', ['start-case', 'pascal-case']],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I submitted a PR in commitlint to resolve this issue. Waiting for that to get merged.


const RELEASE_REGEX = new RegExp('Releas(e|ing) v?\\d+\\.\\d+\\.\\d+');

export const releases: Matcher = (commit: string) => RELEASE_REGEX.test(commit);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default commitlint ignores validation on semver commits, but validates commits with prefixes.

Also, I caught that this test case will be valid now since they check for semver commits. IMO it's not a big deal for this one case, and it's not a breaking change, so I'm fine allowing it. If we need to still cover that, I'll try and think of a way.

Copy link
Contributor

@icatalina icatalina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the typo, the rest looks good.

packages/commitlint-config-jira/src/index.ts Outdated Show resolved Hide resolved

const RELEASE_REGEX = new RegExp('Releas(e|ing) v?\\d+\\.\\d+\\.\\d+');

export const releases: Matcher = (commit: string) => RELEASE_REGEX.test(commit);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍹 Do we want to add some tests for this, to make sure it does what it should do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me throw up another PR for this, since it'll include adding jest to package.

@chanceaclark chanceaclark merged commit 2d85248 into bigcommerce:v3 Jul 21, 2021
@chanceaclark chanceaclark deleted the chore/config branch July 21, 2021 15:11
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

2 participants