Skip to content

Commit 6ea851a

Browse files
crisbetommalerba
authored andcommitted
build: only run commit message checks on PRs (#20698)
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. (cherry picked from commit 6842b3e)
1 parent f514ae5 commit 6ea851a

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)