File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626 steps :
2727 - name : Extract scope from branch
2828 id : meta
29+ env :
30+ PR_HEAD_REF : ${{ github.event.pull_request.head.ref }}
2931 run : |
30- BRANCH="${{ github.event.pull_request.head.ref } }"
32+ BRANCH="${PR_HEAD_REF }"
3133 # Branch format: release/publish/<scope>/v<version>
3234 SCOPE=$(echo "$BRANCH" | sed 's|release/publish/\([^/]*\)/v.*|\1|')
3335 echo "scope=$SCOPE" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change 5959 - name : Collect PR-changed files for formatting
6060 if : github.event_name == 'pull_request'
6161 id : changed
62+ env :
63+ PR_BASE_REF : ${{ github.event.pull_request.base.ref }}
6264 run : |
63- base_ref="${{ github.event.pull_request.base.ref } }"
65+ base_ref="${PR_BASE_REF }"
6466 # Fetch the current tip of the base branch so the merge-base tracks
6567 # main as it advances (using the PR's stored base.sha would pull in
6668 # every file main has touched since the PR opened).
@@ -228,7 +230,10 @@ jobs:
228230 id : commitlint
229231 if : github.event_name == 'pull_request'
230232 continue-on-error : true
231- run : npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose 2>&1 | tee /tmp/commitlint-output.txt
233+ env :
234+ PR_BASE_SHA : ${{ github.event.pull_request.base.sha }}
235+ PR_HEAD_SHA : ${{ github.event.pull_request.head.sha }}
236+ run : npx commitlint --from "${PR_BASE_SHA}" --to "${PR_HEAD_SHA}" --verbose 2>&1 | tee /tmp/commitlint-output.txt
232237
233238 - name : Post fix suggestion on failure
234239 if : github.event_name == 'pull_request' && steps.commitlint.outcome == 'failure'
Original file line number Diff line number Diff line change 6161 if : failure()
6262 id : failure-cause
6363 working-directory : examples/integrations/${{ matrix.starter }}
64+ env :
65+ EVENT_NAME : ${{ github.event_name }}
66+ PR_NUMBER : ${{ github.event.pull_request.number }}
67+ PR_USER_LOGIN : ${{ github.event.pull_request.user.login }}
68+ PR_TITLE : ${{ github.event.pull_request.title }}
69+ PR_HEAD_SHA : ${{ github.event.pull_request.head.sha }}
6470 run : |
6571 {
6672 echo "summary<<CAUSE_EOF"
@@ -86,10 +92,10 @@ jobs:
8692 echo ""
8793
8894 # Identify recent changes that may have caused the failure
89- if [ "${{ github.event_name }} " = "pull_request" ]; then
90- echo "Triggered by PR #${{ github.event.pull_request.number }} (${{ github.event.pull_request.user.login }} ): ${{ github.event.pull_request.title } }"
91- echo "Head: ${{ github.event.pull_request.head.sha } }"
92- elif [ "${{ github.event_name }} " = "schedule" ] || [ "${{ github.event_name }} " = "workflow_run" ]; then
95+ if [ "$EVENT_NAME " = "pull_request" ]; then
96+ echo "Triggered by PR #${PR_NUMBER} (${PR_USER_LOGIN} ): ${PR_TITLE }"
97+ echo "Head: ${PR_HEAD_SHA }"
98+ elif [ "$EVENT_NAME " = "schedule" ] || [ "$EVENT_NAME " = "workflow_run" ]; then
9399 # Use GitHub API instead of git log (avoids needing deep clone)
94100 echo "Recent commits touching this starter (last 12h):"
95101 gh api "repos/${{ github.repository }}/commits?path=examples/integrations/${{ matrix.starter }}&since=$(date -u -d '12 hours ago' +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u -v-12H +%Y-%m-%dT%H:%M:%SZ)&per_page=5" \
You can’t perform that action at this time.
0 commit comments