Skip to content

Commit

Permalink
feat: use conventional-pr-title for PR title validation (#227)
Browse files Browse the repository at this point in the history
Co-authored-by: danji90 <[email protected]>
  • Loading branch information
danji90 and danji90 authored Jun 20, 2022
1 parent 9ee6bc2 commit 607e5ec
Show file tree
Hide file tree
Showing 9 changed files with 593 additions and 534 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/conventional-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Check PR title
on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: aslafy-z/[email protected]
with:
success-state: Title follows the specification.
failure-state: Title does not follow the specification.
context-name: conventional-pr-title
preset: conventional-changelog-angular@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --frozen-lockfile
4 changes: 4 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --frozen-lockfile
4 changes: 4 additions & 0 deletions .husky/post-rebase
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn install --frozen-lockfile
10 changes: 10 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

if git grep -n -E \"5cc87b12d7c5370001c1d656\(5\)\";
then
echo \"Remove private geOps API keys !!!!\";
exit 1;
else
CI=true npx lint-staged
fi;
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.15.0
23 changes: 8 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"@babel/plugin-transform-destructuring": "7.12.1",
"@babel/plugin-transform-object-assign": "7.12.1",
"@babel/preset-env": "7.12.1",
"@commitlint/cli": "11.0.0",
"@commitlint/config-conventional": "11.0.0",
"@commitlint/cli": "17.0.2",
"@commitlint/config-conventional": "17.0.2",
"@constgen/neutrino-svg-loader": "1.9.2",
"@cypress/webpack-preprocessor": "5.4.11",
"@neutrinojs/image-loader": "9.4.0",
Expand All @@ -32,7 +32,7 @@
"eslint-plugin-import": "2.22.1",
"eslint-plugin-prettier": "3.1.4",
"fixpack": "3.0.6",
"husky": "4.3.0",
"husky": "8.0.1",
"jest": "26.6.3",
"jsdoc": "3.6.6",
"jsdoc-export-default-interop": "0.3.1",
Expand All @@ -41,7 +41,7 @@
"neutrino": "9.4.0",
"ol": "6.4.3",
"prettier": "2.1.2",
"standard-version": "9.0.0",
"standard-version": "9.5.0",
"start-server-and-test": "1.11.5",
"stylelint": "13.7.2",
"stylelint-config-standard": "20.0.0",
Expand All @@ -57,8 +57,10 @@
"doc": "jsdoc -p -r -c jsdoc_conf.json src -d doc README.md",
"format": "prettier --write 'cypress/integration/*.js' 'src/**/*.js' && eslint 'src/**/*.js' --fix && stylelint 'style/**/*.css' 'src/**/*.css' 'src/**/*.scss' --fix",
"lint": "eslint 'cypress/integration/**/*.js' 'src/**/*.js' && stylelint 'style/**/*.css' 'src/**/*.css' 'src/**/*.scss'",
"publish:beta": "yarn release -- --prerelease beta --skip.changelog && yarn build && git push origin HEAD && yarn publish --tag beta",
"publish:public": "yarn release && yarn build && git push origin HEAD && yarn publish",
"publish:beta": "yarn release -- --prerelease beta --skip.changelog && yarn build && git push origin HEAD && git push --tags && yarn publish --tag beta",
"publish:beta:dryrun": "yarn release -- --prerelease beta --dry-run --skip.changelog",
"publish:public": "yarn release && yarn build && git push origin HEAD && git push --tags && yarn publish",
"publish:public:dryrun": "yarn release --dry-run",
"release": "standard-version",
"start": "webpack-dev-server --mode development --open",
"test": "jest \"src/.*\\.test\\.js\" --passWithNoTests --env=jsdom --transformIgnorePatterns \"/node_modules/(?!(ol|ol-mapbox-style)/).*/\"",
Expand All @@ -85,15 +87,6 @@
"prettier/prettier": "error"
}
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"post-checkout": "yarn install --frozen-lockfile",
"post-merge": "yarn install --frozen-lockfile",
"post-rebase": "yarn install --frozen-lockfile",
"pre-commit": "(if git grep -n -E \"5cc87b12d7c5370001c1d65(5)\"; then exit \"Remove private geOps API keys !!!!\"; fi;) && CI=true lint-staged "
}
},
"keywords": [
"Editor",
"OpenLayers"
Expand Down
Loading

0 comments on commit 607e5ec

Please sign in to comment.