Skip to content

Commit

Permalink
SNOW-1063738 Add template and Github Action changes to enforce local …
Browse files Browse the repository at this point in the history
…testing parity (#1639)
  • Loading branch information
sfc-gh-stan authored May 20, 2024
1 parent d029525 commit ec983a6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ Please answer these questions before creating your pull request. Thanks!
2. Fill out the following pre-review checklist:

- [ ] I am adding a new automated test(s) to verify correctness of my new code
- [ ] If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
- [ ] I am adding new logging messages
- [ ] I am adding a new telemetry message
- [ ] I am adding new credentials
- [ ] I am adding a new dependency
- [ ] If this is a new feature/behavior, I'm adding the Local Testing parity changes.

3. Please describe how your code solves the related issue.

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/enforce_localtest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check for Local Testing changes

on:
pull_request:
branches: '**'

jobs:
request_local_testing_review_if_necessary:
if: ${{!contains(toJSON(github.event.pull_request.requested_teams), 'local-testing')}}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Request Local Testing review if PR contains local_testing_mode
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"

0 comments on commit ec983a6

Please sign in to comment.