Skip to content

Commit

Permalink
Update/pr size workflow with skip tag for necessary need. (#710)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsinnit authored Jun 3, 2024
1 parent e3df811 commit b2615ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/restrict-pr-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ jobs:
echo $size
shell: bash
- run: |
if [[ $size -gt ${{ env.MAX_LINE_CHANGED }} ]]
COMMITMSG=$(git log --format=%B -n 1 ${{github.event.after}})
echo "${COMMITMSG}"
if [[ $size -gt ${{ env.MAX_LINE_CHANGED }} && "${COMMITMSG}" != *"[skip pr-size]"* ]]
then
echo "Warning - total lines changed is greater than" ${{ env.MAX_LINE_CHANGED }}.
echo "Please consider breaking this PR down."
exit 1
fi
shell: bash
shell: bash

0 comments on commit b2615ff

Please sign in to comment.