@samitouri / QOS-React / commits / b0446ff06a

[ci] Properly format commit message take 2 (#32673)

We need to use the commit message from `main`, not the builds branch

lauren committed Mar 19, 2025 at 14:01 UTC b0446ff06a484127412638c2be9a0382c6f3a84b
1 file changed +14 -2
.github/workflows/runtime_commit_artifacts.yml
+14 -2
@@ -246,13 +246,19 @@ jobs:
246 run: |
247 echo ":"
248 git status -u
249 + - name: Check commit message
250 + if: inputs.dry_run
251 + run: |
252 + git fetch origin --quiet
253 + git show ${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} --no-patch --pretty=format:"%B"
254 - name: Commit changes to branch
255 if: inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true'
256 run: |
257 git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}"
258 git config --global user.name "${{ github.triggering_actor }}"
259
255 - git commit -m "$(git show --no-patch --pretty=format:'%B%n%nDiffTrain build for [${{ github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ github.event.workflow_run.head_sha || github.sha}})')" || echo "No changes to commit"
260 + git fetch origin --quiet
261 + git commit -m "$(git show ${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} --no-patch --pretty=format:'%B%n%nDiffTrain build for [${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha}})')" || echo "No changes to commit"
262 - name: Push changes to branch
263 if: inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true')
264 run: git push
@@ -411,13 +417,19 @@ jobs:
417 run: |
418 git add .
419 git status
420 + - name: Check commit message
421 + if: inputs.dry_run
422 + run: |
423 + git fetch origin --quiet
424 + git show ${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} --no-patch --pretty=format:"%B"
425 - name: Commit changes to branch
426 if: inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true'
427 run: |
428 git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}"
429 git config --global user.name "${{ github.triggering_actor }}"
430
420 - git commit -m "$(git show --no-patch --pretty=format:'%B%n%nDiffTrain build for [${{ github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ github.event.workflow_run.head_sha || github.sha}})')" || echo "No changes to commit"
431 + git fetch origin --quiet
432 + git commit -m "$(git show ${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} --no-patch --pretty=format:'%B%n%nDiffTrain build for [${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha}})')" || echo "No changes to commit"
433 - name: Push changes to branch
434 if: inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true')
435 run: git push