Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

chore(travis): add commitplease validation to ci-checks #16097

Merged
merged 2 commits into from
Jul 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"changez-angular": "^2.1.2",
"cheerio": "^0.17.0",
"commitizen": "^2.3.0",
"commitplease": "^2.7.10",
"cross-spawn": "^4.0.0",
"cz-conventional-changelog": "1.1.4",
"dgeni": "^0.4.0",
Expand Down Expand Up @@ -95,9 +96,13 @@
"stringmap": "^0.2.2"
},
"dependencies": {},
"commitplease": {
"style": "angular",
"nohook": true
},
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
}
}
}
}
7 changes: 7 additions & 0 deletions scripts/travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`

if [ "$JOB" == "ci-checks" ]; then
grunt ci-checks
if [[ $TRAVIS_PULL_REQUEST != 'false' ]]; then
# validate commit messages of all commits in the PR
# convert commit range to 2 dots, as commitplease uses `git log`.
# See https://github.com/travis-ci/travis-ci/issues/4596 for more info
echo "Validate commit messages in PR."
yarn run commitplease -- "${TRAVIS_COMMIT_RANGE/.../..}"
fi
elif [ "$JOB" == "unit" ]; then
if [ "$BROWSER_PROVIDER" == "browserstack" ]; then
BROWSERS="BS_Chrome,BS_Safari,BS_Firefox,BS_IE_9,BS_IE_10,BS_IE_11,BS_EDGE,BS_iOS_8,BS_iOS_9"
Expand Down
20 changes: 20 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,16 @@ commitizen@^2.3.0:
shelljs "0.7.5"
strip-json-comments "2.0.1"

commitplease@^2.7.10:
version "2.7.10"
resolved "https://registry.yarnpkg.com/commitplease/-/commitplease-2.7.10.tgz#129af5abb365b46f25e652020c5d1548c947f163"
dependencies:
chalk "^1.1.1"
git-tools "^0.2.1"
ini "^1.3.4"
object-assign "^4.1.0"
semver "^5.1.0"

[email protected]:
version "0.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-0.0.1.tgz#89f00fdcd51b519c578733fec563e6a6da7f5be2"
Expand Down Expand Up @@ -2475,6 +2485,12 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"

git-tools@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/git-tools/-/git-tools-0.2.1.tgz#6e1846af2c0e91ab59258b48f9b53c1279b3b273"
dependencies:
spawnback "~1.0.0"

glob-base@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
Expand Down Expand Up @@ -5912,6 +5928,10 @@ spawn-sync@^1.0.15:
concat-stream "^1.4.7"
os-shim "^0.1.2"

spawnback@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/spawnback/-/spawnback-1.0.0.tgz#f73662f7e54d95367eca74d6426c677dd7ea686f"

spdx-correct@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40"
Expand Down