diff --git a/.gitignore b/.gitignore
index 1fbf5ab..bc80bbf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -58,3 +58,6 @@ typings/
.env
.vscode/launch.json
+
+# Git To-Dos
+.todos.yml
\ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
index a6a17cf..1efe2a7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,9 +13,3 @@ after_success:
branches:
except:
- /^v\d+\.\d+\.\d+$/
-deploy:
- script: scripts/deploy.sh
- provider: script
- skip_cleanup: true
- on:
- branch: master
\ No newline at end of file
diff --git a/README.md b/README.md
index 05b978b..91455a3 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
-# commitlint-bot
+# commitlint [bot]
+
[](https://travis-ci.org/ahmed-taj/commitlint-bot)
[](https://www.npmjs.com/package/commitlint-bot)
-
> Built with [probot](https://github.com/probot/probot) framework
-A GitHub App that runs [commitlint](https://github.com/marionebl/commitlint) over all commits of new or edited pull requests
+A GitHub App that runs [commitlint](https://github.com/marionebl/commitlint) against all commits of new or edited pull requests
and sets an appropriate status check.
## Usage
@@ -27,7 +27,6 @@ Problem details will be reported as a comment like this:
![status-comment-screenshot][]
-
For best results, enable branch protection (in the repository's settings) and require the `commitlint` status check to pass before merging:
![branch-protection-screenshot][]
@@ -60,7 +59,8 @@ npm install
## Deployment
-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.
+See [docs/deploy.md](./docs/deploy.md) for more info.
+
## Credits
diff --git a/app.json b/app.json
index d9787dd..90e9855 100644
--- a/app.json
+++ b/app.json
@@ -5,8 +5,7 @@
"repository": "https://github.com/ahmed-taj/commitlint-bot",
"env": {
"PRIVATE_KEY": {
- "description":
- "the private key of your GitHub App. It must be base64 encoded!"
+ "description": "the private key of your GitHub App."
},
"APP_ID": {
"description": "the ID of your GitHub App"
diff --git a/lib/format.js b/lib/format.js
index 75d8998..bf7ca03 100644
--- a/lib/format.js
+++ b/lib/format.js
@@ -1,7 +1,7 @@
/**
* Formats commitlint report as GitHub status report
- *
- * @param {Object} report
+ *
+ * @param {Object} report
*/
const format = report => {
const { commits } = report
@@ -29,7 +29,17 @@ const format = report => {
// Summary
const summary = `found ${errorsCount} problems, ${warnsCount} warnings`
if (errorsCount > 0 || warnsCount > 0) {
- message = `There were the following issues with this Pull Request\n${message}`
+ message = `
+There were the following issues with this Pull Request
+
+${message}
+
+You may need to [change the commit messages](https://help.github.com/articles/changing-a-commit-message/) to comply with the repository contributing guidelines.
+
+--------
+
+🤖 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!
+`
}
return { summary, message }
}
diff --git a/lib/lint.js b/lib/lint.js
index 056d51f..611cd2f 100644
--- a/lib/lint.js
+++ b/lib/lint.js
@@ -6,7 +6,7 @@ const config = require('./config')
const format = require('./format')
/**
- * Runs commitlint over all commits of the pull request and sets an appropriate
+ * Runs commitlint against all commits of the pull request and sets an appropriate
* status check
*/
const commitlint = async ({ github, payload }) => {
@@ -53,7 +53,7 @@ const commitlint = async ({ github, payload }) => {
// Final status
await github.repos.createStatus({
...statusInfo,
- state: report.valid ? 'success' : 'error',
+ state: report.valid ? 'success' : 'failure',
description: summary
})
// Write a comment with the details (if any)
diff --git a/now.json b/now.json
deleted file mode 100644
index af47cc5..0000000
--- a/now.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "name": "commitlint-bot",
- "alias": ["commitlint"],
- "type": "npm",
- "env": {
- "APP_ID": "@commitlint_bot_app_id",
- "NODE_ENV": "production",
- "PRIVATE_KEY": "@commitlint_bot_private_key",
- "WEBHOOK_SECRET": "@commitlint_bot_webhook_secret"
- },
- "engines": {
- "node": ">=8.8.0"
- }
-}
diff --git a/package-lock.json b/package-lock.json
index e91eff6..a033592 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "commitlint-bot",
- "version": "0.0.0",
+ "version": "0.0.0-development",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -3895,13 +3895,6 @@
"remove-trailing-separator": "1.1.0"
}
},
- "now": {
- "version": "8.3.10",
- "resolved": "https://registry.npmjs.org/now/-/now-8.3.10.tgz",
- "integrity":
- "sha512-5OfF/nnNHZoh64AQzhhbNZ4baj5wMzcPuPgGrmuPh2xehDFp6k1TdujLcRgjJjFcrUjodHkdN6vCi62K9Bfw3A==",
- "dev": true
- },
"npm-run-path": {
"version": "2.0.2",
"resolved":
diff --git a/package.json b/package.json
index 7baa0a9..240d8cd 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,6 @@
"keywords": ["validate", "commit", "pr", "conventional", "git", "probot-app"],
"main": "index.js",
"scripts": {
- "now": "now",
- "now-start": "PRIVATE_KEY=$(echo $PRIVATE_KEY | base64 -d) npm start",
"start": "probot run ./index.js",
"test": "mocha",
"semantic-release":
@@ -24,11 +22,10 @@
"expect": "^1.20.2",
"localtunnel": "^1.8.2",
"mocha": "^3.2.0",
- "now": "^8.3.10",
"semantic-release": "^8.2.0"
},
"engines": {
- "node": ">=8",
- "npm": ">=5"
+ "node": "8.9.x",
+ "npm": "5.5.x"
}
}
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
deleted file mode 100755
index 2c18daa..0000000
--- a/scripts/deploy.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-
-now="npm run -s now -- --token=$NOW_TOKEN"
-repo_name="${TRAVIS_REPO_SLUG##*/}"
-
-$now --public
-$now alias
-$now rm --safe --yes "$repo_name"
\ No newline at end of file