File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121
2222if [ " ${COMMIT_COUNT} " -eq 1 ]; then
2323 echo " Pull request contains a single commit"
24- else
24+ else if [ " ${GITHUB_EVENT_ACTION} " == " opened " ] ; then
2525 echo " ::error::Pull request contains ${COMMIT_COUNT} commits. Squash commits into a single commit for initial review."
2626 exit 1
2727fi
Original file line number Diff line number Diff line change @@ -105,7 +105,16 @@ jobs:
105105 continue-on-error : true
106106 env :
107107 COMMIT_COUNT : ${{ github.event.pull_request.commits }}
108+ GITHUB_EVENT_ACTION : ${{ github.event.action }}
108109 run : .github/scripts/build/validate-single-commit.sh
110+ - name : Evaluate Validation Results
111+ env :
112+ VALIDATION_FAILED : ${{ contains(steps.*.outcome, 'failure') }}
113+ run : |
114+ if [[ "${VALIDATION_FAILED}" == "true" ]]; then
115+ echo "::error::Pull request validation failed"
116+ exit 1
117+ fi
109118
110119 ubuntu-build-en :
111120 timeout-minutes : 120
You can’t perform that action at this time.
0 commit comments