Skip to content

Commit

Permalink
(#1) Replacing all occurrences of 'jira' with 'github' as we're going…
Browse files Browse the repository at this point in the history
… to convert it to work similarly but for GitHub Issues instead of Jira Issues.
  • Loading branch information
danrivett committed Feb 22, 2020
1 parent b5b1330 commit 17834fd
Show file tree
Hide file tree
Showing 35 changed files with 243 additions and 243 deletions.
62 changes: 31 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<div align="center">
<img height="200"
src="https://raw.githubusercontent.com/Gherciu/commitlint-jira/master/logo.png">
<h1>commitlint-jira</h1>
<p>commitlint-jira checks if your commit messages meet the Jira conventional commit format.</p>
src="https://raw.githubusercontent.com/Gherciu/commitlint-github/master/logo.png">
<h1>commitlint-github</h1>
<p>commitlint-github checks if your commit messages meet the Jira conventional commit format.</p>
</div>

[![GitHub](https://img.shields.io/github/license/Gherciu/commitlint-jira)](https://github.com/Gherciu/commitlint-jira/blob/master/LICENSE)
[![GitHub](https://img.shields.io/github/license/Gherciu/commitlint-github)](https://github.com/Gherciu/commitlint-github/blob/master/LICENSE)
[![Multipack](https://img.shields.io/badge/Generated%20from-Gherciu%2Fmultipack-green)](https://github.com/Gherciu/multipack)

## Getting started.

##### Install dependencies

```bash
npm install --save-dev @commitlint/cli commitlint-plugin-jira-rules commitlint-config-jira
npm install --save-dev @commitlint/cli commitlint-plugin-github-rules commitlint-config-github
```

- [commitlint-config-jira](https://github.com/Gherciu/commitlint-jira/tree/master/packages/commitlint-config-jira) - is a **recomended** config who contain preconfigured rules for jira commits messages style. See all rules in description below
- [commitlint-plugin-jira-rules](https://github.com/Gherciu/commitlint-jira/tree/master/packages/commitlint-plugin-jira-rules) - is a plugin that implement all jira commits messages style rules and validate commit messages
- [commitlint-config-github](https://github.com/Gherciu/commitlint-github/tree/master/packages/commitlint-config-github) - is a **recomended** config who contain preconfigured rules for github commits messages style. See all rules in description below
- [commitlint-plugin-github-rules](https://github.com/Gherciu/commitlint-github/tree/master/packages/commitlint-plugin-github-rules) - is a plugin that implement all github commits messages style rules and validate commit messages

##### Configure commitlint to use jira commits messages style config
##### Configure commitlint to use github commits messages style config

```js
// commitlint.config.js
module.exports = {
plugins: ['commitlint-plugin-jira-rules'],
extends: ['jira'],
plugins: ['commitlint-plugin-github-rules'],
extends: ['github'],
}
```

Expand All @@ -44,7 +44,7 @@ module.exports = {

## Rules

`jira-task-id-empty` - this rule check if commit message task id is not empty.
`github-task-id-empty` - this rule check if commit message task id is not empty.

```bash
// If your task do not have an id use a conventional task id e.g: IB-0000
Expand All @@ -56,43 +56,43 @@ git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-0000: My commit message body"
```

`jira-task-id-max-length` - this rule check if jira task id length is loonger that the provided value.
`github-task-id-max-length` - this rule check if github task id length is loonger that the provided value.

```bash
// Preconfigured and recomended value in commitlint-config-jira is 9 chars
// Preconfigured and recomended value in commitlint-config-github is 9 chars
// ❌ Bad commit messages
git commit -m"IB-2121212121212121: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-task-id-min-length` - this rule check if jira task id length is shorter that the provided value.
`github-task-id-min-length` - this rule check if github task id length is shorter that the provided value.

```bash
// Preconfigured and recomended value in commitlint-config-jira is 3 chars
// Preconfigured and recomended value in commitlint-config-github is 3 chars
// ❌ Bad commit messages
git commit -m"I1: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-task-id-case` - this rule check if taskId is in provided case.
`github-task-id-case` - this rule check if taskId is in provided case.

```bash
// Preconfigured and recomended value in commitlint-config-jira is "uppercase"
// Preconfigured and recomended value in commitlint-config-github is "uppercase"
// ❌ Bad commit messages
git commit -m"ib-21: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-task-id-separator` - this rule check if taskId header and footer is separated with provided value.
`github-task-id-separator` - this rule check if taskId header and footer is separated with provided value.

```bash
// Preconfigured and recomended value in commitlint-config-jira is "-"
// Preconfigured and recomended value in commitlint-config-github is "-"
// ❌ Bad commit messages
git commit -m"IB/21: My commit message body"
git commit -m"IB_21 :My commit message body"
Expand All @@ -101,20 +101,20 @@ git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-commit-status-case` - this rule check if commit status is in provided case.
`github-commit-status-case` - this rule check if commit status is in provided case.

```bash
// Preconfigured and recomended value in commitlint-config-jira is "uppercase"
// Preconfigured and recomended value in commitlint-config-github is "uppercase"
// ❌ Bad commit messages
git commit -m"[wip]IB-21: My commit message body"
// ✅ Good commit messages
git commit -m"[WIP]IB-21: My commit message body"
```

`jira-commit-message-separator` - this rule check if commit message separator match provided separator.
`github-commit-message-separator` - this rule check if commit message separator match provided separator.

```bash
// Preconfigured and recomended value in commitlint-config-jira is ":"
// Preconfigured and recomended value in commitlint-config-github is ":"
// ❌ Bad commit messages
git commit -m"IB-21/ My commit message body"
git commit -m"IB-21 - My commit message body"
Expand All @@ -123,18 +123,18 @@ git commit -m"IB-21% My commit message body"
git commit -m"IB-21: My commit message body"
```

## Customise/Override `commitlint-jira-config` rules
## Customise/Override `commitlint-github-config` rules

```diff
// commitlint.config.js
module.exports = {
plugins: ['commitlint-plugin-jira-rules'],
extends: ['jira'],
plugins: ['commitlint-plugin-github-rules'],
extends: ['github'],
rules: {
// to Customise/Override a rule
+ 'jira-task-id-max-length': [2, 'always', 10]
+ 'github-task-id-max-length': [2, 'always', 10]
// to turn off a rule
+ 'jira-task-id-max-length': 0
+ 'github-task-id-max-length': 0
},
}
```
Expand All @@ -153,7 +153,7 @@ module.exports = {

## Author

**[@Gherciu/commitlint-jira](https://github.com/Gherciu/commitlint-jira)** © [GHERCIU](https://github.com/Gherciu), Released under the [MIT](https://github.com/Gherciu/commitlint-jira/blob/master/LICENSE) License.<br>
Authored and maintained by GHERCIU with help from contributors ([list](https://github.com/Gherciu/commitlint-jira/contributors)).
**[@Gherciu/commitlint-github](https://github.com/Gherciu/commitlint-github)** © [GHERCIU](https://github.com/Gherciu), Released under the [MIT](https://github.com/Gherciu/commitlint-github/blob/master/LICENSE) License.<br>
Authored and maintained by GHERCIU with help from contributors ([list](https://github.com/Gherciu/commitlint-github/contributors)).

#### If you like this repository star⭐ and watch👀 on [GitHub](https://github.com/Gherciu/commitlint-jira)
#### If you like this repository star⭐ and watch👀 on [GitHub](https://github.com/Gherciu/commitlint-github)
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
collectCoverageFrom: [
'packages/**/*.(ts)',
'!packages/commitlint-jira-e2e-tests/**',
'!packages/commitlint-github-e2e-tests/**',
],
coverageThreshold: {
global: {
Expand All @@ -12,6 +12,6 @@ module.exports = {
},
},
testRegex: 'tests/.*\\.test\\.ts$',
testPathIgnorePatterns: ['/packages/commitlint-jira-e2e-tests/'],
testPathIgnorePatterns: ['/packages/commitlint-github-e2e-tests/'],
preset: 'ts-jest',
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "commitlint-jira",
"name": "commitlint-github",
"description": "✔️❌ Shareable commitlint config enforcing Jira commits messages style",
"version": "1.0.0",
"license": "MIT",
Expand All @@ -10,17 +10,17 @@
},
"keywords": [
"commitlint",
"jira-commitlint",
"jira-style",
"jira",
"github-commitlint",
"github-style",
"github",
"multipack"
],
"repository": {
"type": "git",
"url": "https://github.com/Gherciu/commitlint-jira"
"url": "https://github.com/Gherciu/commitlint-github"
},
"bugs": {
"url": "https://github.com/Gherciu/commitlint-jira/issues"
"url": "https://github.com/Gherciu/commitlint-github/issues"
},
"scripts": {
"build:packages": "lerna run build",
Expand Down
62 changes: 31 additions & 31 deletions packages/commitlint-config-jira/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<div align="center">
<img height="200"
src="https://raw.githubusercontent.com/Gherciu/commitlint-jira/master/logo.png">
<h1>commitlint-config-jira</h1>
<p>A <b>recomended</b> config who contain preconfigured rules for jira commits messages style. Part of <a href="https://github.com/Gherciu/commitlint-jira">commitlint-jira</a> monorepo</p>
src="https://raw.githubusercontent.com/Gherciu/commitlint-github/master/logo.png">
<h1>commitlint-config-github</h1>
<p>A <b>recomended</b> config who contain preconfigured rules for github commits messages style. Part of <a href="https://github.com/Gherciu/commitlint-github">commitlint-github</a> monorepo</p>
</div>

[![GitHub](https://img.shields.io/github/license/Gherciu/commitlint-jira)](https://github.com/Gherciu/commitlint-jira/blob/master/LICENSE)
[![GitHub](https://img.shields.io/github/license/Gherciu/commitlint-github)](https://github.com/Gherciu/commitlint-github/blob/master/LICENSE)
[![Multipack](https://img.shields.io/badge/Generated%20from-Gherciu%2Fmultipack-green)](https://github.com/Gherciu/multipack)

## Getting started.

##### Install dependencies

```bash
npm install --save-dev @commitlint/cli commitlint-plugin-jira-rules commitlint-config-jira
npm install --save-dev @commitlint/cli commitlint-plugin-github-rules commitlint-config-github
```

- [commitlint-config-jira](https://github.com/Gherciu/commitlint-jira/tree/master/packages/commitlint-config-jira) - is a **recomended** config who contain preconfigured rules for jira commits messages style. See all rules in description below
- [commitlint-plugin-jira-rules](https://github.com/Gherciu/commitlint-jira/tree/master/packages/commitlint-plugin-jira-rules) - is a plugin that implement all jira commits messages style rules and validate commit messages
- [commitlint-config-github](https://github.com/Gherciu/commitlint-github/tree/master/packages/commitlint-config-github) - is a **recomended** config who contain preconfigured rules for github commits messages style. See all rules in description below
- [commitlint-plugin-github-rules](https://github.com/Gherciu/commitlint-github/tree/master/packages/commitlint-plugin-github-rules) - is a plugin that implement all github commits messages style rules and validate commit messages

##### Configure commitlint to use jira commits messages style config
##### Configure commitlint to use github commits messages style config

```js
// commitlint.config.js
module.exports = {
plugins: ['commitlint-plugin-jira-rules'],
extends: ['jira'],
plugins: ['commitlint-plugin-github-rules'],
extends: ['github'],
}
```

Expand All @@ -44,7 +44,7 @@ module.exports = {

## Rules

`jira-task-id-empty` - this rule check if commit message task id is not empty.
`github-task-id-empty` - this rule check if commit message task id is not empty.

```bash
// If your task do not have an id use a conventional task id e.g: IB-0000
Expand All @@ -56,43 +56,43 @@ git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-0000: My commit message body"
```

`jira-task-id-max-length` - this rule check if jira task id length is loonger that the provided value.
`github-task-id-max-length` - this rule check if github task id length is loonger that the provided value.

```bash
// Preconfigured and recomended value in commitlint-config-jira is 9 chars
// Preconfigured and recomended value in commitlint-config-github is 9 chars
// ❌ Bad commit messages
git commit -m"IB-2121212121212121: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-task-id-min-length` - this rule check if jira task id length is shorter that the provided value.
`github-task-id-min-length` - this rule check if github task id length is shorter that the provided value.

```bash
// Preconfigured and recomended value in commitlint-config-jira is 3 chars
// Preconfigured and recomended value in commitlint-config-github is 3 chars
// ❌ Bad commit messages
git commit -m"I1: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-task-id-case` - this rule check if taskId is in provided case.
`github-task-id-case` - this rule check if taskId is in provided case.

```bash
// Preconfigured and recomended value in commitlint-config-jira is "uppercase"
// Preconfigured and recomended value in commitlint-config-github is "uppercase"
// ❌ Bad commit messages
git commit -m"ib-21: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-task-id-separator` - this rule check if taskId header and footer is separated with provided value.
`github-task-id-separator` - this rule check if taskId header and footer is separated with provided value.

```bash
// Preconfigured and recomended value in commitlint-config-jira is "-"
// Preconfigured and recomended value in commitlint-config-github is "-"
// ❌ Bad commit messages
git commit -m"IB/21: My commit message body"
git commit -m"IB_21 :My commit message body"
Expand All @@ -101,20 +101,20 @@ git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"
```

`jira-commit-status-case` - this rule check if commit status is in provided case.
`github-commit-status-case` - this rule check if commit status is in provided case.

```bash
// Preconfigured and recomended value in commitlint-config-jira is "uppercase"
// Preconfigured and recomended value in commitlint-config-github is "uppercase"
// ❌ Bad commit messages
git commit -m"[wip]IB-21: My commit message body"
// ✅ Good commit messages
git commit -m"[WIP]IB-21: My commit message body"
```

`jira-commit-message-separator` - this rule check if commit message separator match provided separator.
`github-commit-message-separator` - this rule check if commit message separator match provided separator.

```bash
// Preconfigured and recomended value in commitlint-config-jira is ":"
// Preconfigured and recomended value in commitlint-config-github is ":"
// ❌ Bad commit messages
git commit -m"IB-21/ My commit message body"
git commit -m"IB-21 - My commit message body"
Expand All @@ -123,18 +123,18 @@ git commit -m"IB-21% My commit message body"
git commit -m"IB-21: My commit message body"
```

## Customise/Override `commitlint-jira-config` rules
## Customise/Override `commitlint-github-config` rules

```diff
// commitlint.config.js
module.exports = {
plugins: ['commitlint-plugin-jira-rules'],
extends: ['jira'],
plugins: ['commitlint-plugin-github-rules'],
extends: ['github'],
rules: {
// to Customise/Override a rule
+ 'jira-task-id-max-length': [2, 'always', 10]
+ 'github-task-id-max-length': [2, 'always', 10]
// to turn off a rule
+ 'jira-task-id-max-length': 0
+ 'github-task-id-max-length': 0
},
}
```
Expand All @@ -153,7 +153,7 @@ module.exports = {

## Author

**[@Gherciu/commitlint-jira](https://github.com/Gherciu/commitlint-jira)** © [GHERCIU](https://github.com/Gherciu), Released under the [MIT](https://github.com/Gherciu/commitlint-jira/blob/master/LICENSE) License.<br>
Authored and maintained by GHERCIU with help from contributors ([list](https://github.com/Gherciu/commitlint-jira/contributors)).
**[@Gherciu/commitlint-github](https://github.com/Gherciu/commitlint-github)** © [GHERCIU](https://github.com/Gherciu), Released under the [MIT](https://github.com/Gherciu/commitlint-github/blob/master/LICENSE) License.<br>
Authored and maintained by GHERCIU with help from contributors ([list](https://github.com/Gherciu/commitlint-github/contributors)).

#### If you like this repository star⭐ and watch👀 on [GitHub](https://github.com/Gherciu/commitlint-jira)
#### If you like this repository star⭐ and watch👀 on [GitHub](https://github.com/Gherciu/commitlint-github)
2 changes: 1 addition & 1 deletion packages/commitlint-config-jira/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 17834fd

Please sign in to comment.