Skip to content

Commit e4b2815

Browse files
committed
Fail check rather than add nag comment
1 parent 2247ae5 commit e4b2815

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/enforce_localtest.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Request Local Testing approval if necessary
22

33
on:
44
pull_request:
5-
branches: '**'
5+
types: [review_requested, review_request_removed, opened, synchronize]
6+
branches:
7+
- main
68

79
jobs:
810
request_review:
@@ -16,10 +18,10 @@ jobs:
1618
uses: actions/checkout@v4
1719
with:
1820
fetch-depth: 0
19-
20-
- name: Request Local Testing review if PR contains local_testing_mode
21+
- name: Check for local-testing changes
22+
id: check-diff
2123
env:
2224
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2325
url: ${{ github.event.pull_request.html_url }}
2426
run: |
25-
(gh pr diff "$url" | grep "^+" | grep "local_testing_mode" && gh pr comment "$url" --body "Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing") || echo "PR does not seem to contain Local Testing changes"
27+
if gh pr diff "$url" | grep "^+" | grep "local_testing_mode"; then echo "Seems like your changes contain some Local Testing changes, please request review from @snowflakedb/local-testing"; exit 1; else echo "PR does not seem to contain Local Testing changes"; fi

0 commit comments

Comments
 (0)