Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Commit 75daa1b

Browse files
authored
feat: advise how to fix commits
2 parents 06e34a5 + bec99f4 commit 75daa1b

File tree

10 files changed

+27
-54
lines changed

10 files changed

+27
-54
lines changed

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,6 @@ typings/
5858
.env
5959

6060
.vscode/launch.json
61+
62+
# Git To-Dos
63+
.todos.yml

‎.travis.yml‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,3 @@ after_success:
1313
branches:
1414
except:
1515
- /^v\d+\.\d+\.\d+$/
16-
deploy:
17-
script: scripts/deploy.sh
18-
provider: script
19-
skip_cleanup: true
20-
on:
21-
branch: master

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# commitlint-bot
1+
# commitlint [bot]
2+
23

34
[![Travis](https://img.shields.io/travis/ahmed-taj/commitlint-bot.svg)](https://travis-ci.org/ahmed-taj/commitlint-bot)
45
[![npm](https://img.shields.io/npm/v/commitlint-bot.svg)](https://www.npmjs.com/package/commitlint-bot)
56

6-
77
<p align="center">
88
<img src="docs/robot.svg" width="256" alt="commitlint logo" />
99
</p>
1010

1111
> Built with [probot](https://github.com/probot/probot) framework
1212
13-
A GitHub App that runs [commitlint](https://github.com/marionebl/commitlint) over all commits of new or edited pull requests
13+
A GitHub App that runs [commitlint](https://github.com/marionebl/commitlint) against all commits of new or edited pull requests
1414
and sets an appropriate status check.
1515

1616
## Usage
@@ -27,7 +27,6 @@ Problem details will be reported as a comment like this:
2727

2828
![status-comment-screenshot][]
2929

30-
3130
For best results, enable branch protection (in the repository's settings) and require the `commitlint` status check to pass before merging:
3231

3332
![branch-protection-screenshot][]
@@ -60,7 +59,8 @@ npm install
6059

6160
## Deployment
6261

63-
This app is deployed on free (and single) [Now](https://now.sh) instance which isn't not suitable for real-world usage, you may need to deploy your own instance of the app. See [docs/deploy.md](./docs/deploy.md) for more info.
62+
See [docs/deploy.md](./docs/deploy.md) for more info.
63+
6464

6565
## Credits
6666

‎app.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"repository": "https://github.com/ahmed-taj/commitlint-bot",
66
"env": {
77
"PRIVATE_KEY": {
8-
"description":
9-
"the private key of your GitHub App. It must be base64 encoded!"
8+
"description": "the private key of your GitHub App."
109
},
1110
"APP_ID": {
1211
"description": "the ID of your GitHub App"

‎lib/format.js‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Formats commitlint report as GitHub status report
3-
*
4-
* @param {Object} report
3+
*
4+
* @param {Object} report
55
*/
66
const format = report => {
77
const { commits } = report
@@ -29,7 +29,17 @@ const format = report => {
2929
// Summary
3030
const summary = `found ${errorsCount} problems, ${warnsCount} warnings`
3131
if (errorsCount > 0 || warnsCount > 0) {
32-
message = `There were the following issues with this Pull Request\n${message}`
32+
message = `
33+
There were the following issues with this Pull Request
34+
35+
${message}
36+
37+
You may need to [change the commit messages](https://help.github.com/articles/changing-a-commit-message/) to comply with the repository contributing guidelines.
38+
39+
--------
40+
41+
🤖 This comment was generated by [**commitlint[bot]**](https://github.com/ahmed-taj/commitlint-bot). Please report issues [here](https://github.com/ahmed-taj/commitlint-bot/issues). Happy coding!
42+
`
3343
}
3444
return { summary, message }
3545
}

‎lib/lint.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const config = require('./config')
66
const format = require('./format')
77

88
/**
9-
* Runs commitlint over all commits of the pull request and sets an appropriate
9+
* Runs commitlint against all commits of the pull request and sets an appropriate
1010
* status check
1111
*/
1212
const commitlint = async ({ github, payload }) => {
@@ -53,7 +53,7 @@ const commitlint = async ({ github, payload }) => {
5353
// Final status
5454
await github.repos.createStatus({
5555
...statusInfo,
56-
state: report.valid ? 'success' : 'error',
56+
state: report.valid ? 'success' : 'failure',
5757
description: summary
5858
})
5959
// Write a comment with the details (if any)

‎now.json‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎package-lock.json‎

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
"keywords": ["validate", "commit", "pr", "conventional", "git", "probot-app"],
99
"main": "index.js",
1010
"scripts": {
11-
"now": "now",
12-
"now-start": "PRIVATE_KEY=$(echo $PRIVATE_KEY | base64 -d) npm start",
1311
"start": "probot run ./index.js",
1412
"test": "mocha",
1513
"semantic-release":
@@ -24,11 +22,10 @@
2422
"expect": "^1.20.2",
2523
"localtunnel": "^1.8.2",
2624
"mocha": "^3.2.0",
27-
"now": "^8.3.10",
2825
"semantic-release": "^8.2.0"
2926
},
3027
"engines": {
31-
"node": ">=8",
32-
"npm": ">=5"
28+
"node": "8.9.x",
29+
"npm": "5.5.x"
3330
}
3431
}

‎scripts/deploy.sh‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /