@@ -246,13 +246,19 @@ jobs:
246246 run : |
247247 echo ":"
248248 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"
249254 - name : Commit changes to branch
250255 if : inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true'
251256 run : |
252257 git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}"
253258 git config --global user.name "${{ github.triggering_actor }}"
254259
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"
256262 - name : Push changes to branch
257263 if : inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true')
258264 run : git push
@@ -411,13 +417,19 @@ jobs:
411417 run : |
412418 git add .
413419 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"
414425 - name : Commit changes to branch
415426 if : inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true'
416427 run : |
417428 git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}"
418429 git config --global user.name "${{ github.triggering_actor }}"
419430
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"
421433 - name : Push changes to branch
422434 if : inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true')
423435 run : git push
0 commit comments