Skip to content

Commit

Permalink
Add skip pr-size tag for skipping pr checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tatsinnit committed Jun 3, 2024
1 parent 124c7b7 commit 4f86318
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/restrict-pr-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ permissions:

jobs:
build:
if: ${{ !contains(github.event.head_commit.message, '[skip pr-size]') }}
runs-on: ubuntu-latest
permissions:
actions: read
Expand Down Expand Up @@ -43,7 +42,9 @@ 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."
Expand Down

0 comments on commit 4f86318

Please sign in to comment.