Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/enforce_localtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Request Local Testing approval if necessary

on:
pull_request:
branches: '**'
types: [review_requested, review_request_removed, opened, synchronize]
branches:
- main

jobs:
request_review:
Expand All @@ -16,10 +18,10 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Request Local Testing review if PR contains local_testing_mode
- name: Check for local-testing changes
id: check-diff
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
url: ${{ github.event.pull_request.html_url }}
run: |
(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"
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
Loading