Skip to content

Commit

Permalink
Update restrict-pr-size.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsinnit authored Jun 3, 2024
1 parent 2e5150e commit e584c07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/restrict-pr-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,11 @@ jobs:
echo $size
shell: bash
- run: |
echo "${{ github.event.commit.message }} -- ${{ github.event.head_commit.message }}"
if [[ $size -gt ${{ env.MAX_LINE_CHANGED }} && "${{ github.event.commit.message }}" == *"[skip pr-size]"* ]]
run: |
MSG=$(git log --format=%B -n 1 ${{github.event.after}})
echo "::set-env name=COMMIT_MESSAGE::${MSG}"
echo "${{ env.COMMIT_MESSAGE }} -- ${COMMIT_MESSAGE}"
if [[ $size -gt ${{ env.MAX_LINE_CHANGED }} && "${{ env.COMMIT_MESSAGE }}" == *"[skip pr-size]"* ]]
then
echo "Warning - total lines changed is greater than" ${{ env.MAX_LINE_CHANGED }}.
echo "Please consider breaking this PR down."
Expand Down

0 comments on commit e584c07

Please sign in to comment.