Skip to content

Commit 8508f15

Browse files
committed
build: only run commit message checks on PRs
Splits out the commit message check so it only runs against pull requests. If an invalid commit has made it into the main branch, we can't do much about it anymore so the failure generates unnecessary noise.
1 parent 2dbbc0d commit 8508f15

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.circleci/config.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,14 @@ jobs:
336336
yarn check-entry-point-setup $(bazel info bazel-bin)/entry_points_manifest.json
337337
338338
- run: yarn ng-dev format changed --check << pipeline.git.base_revision >>
339-
- run: yarn ng-dev commit-message validate-range --range << pipeline.git.base_revision >>...<<pipeline.git.revision>>
339+
- run:
340+
name: Check Commit Message (PR Only)
341+
# Only run the commit message checks on pull requests since we can't do
342+
# much about any failures that have made it into the main branch.
343+
command: |
344+
if [ -n "$CIRCLE_PR_NUMBER" ]; then
345+
yarn ng-dev commit-message validate-range --range << pipeline.git.base_revision >>...<<pipeline.git.revision>>
346+
fi
340347
- run: yarn ownerslint
341348
- run: yarn stylelint
342349
- run: yarn tslint

0 commit comments

Comments
 (0)