Skip to content

Commit 1c6f1fe

Browse files
authored
SNOW-1266560: Add github merge gate port sp changes (#1986)
* SNOW-1266560: Add merge gate to port changes to SP * update template * update * update
1 parent c35a161 commit 1c6f1fe

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ Please answer these questions before submitting your pull requests. Thanks!
1717
3. Please describe how your code solves the related issue.
1818

1919
Please write a short description of how your code change solves the related issue.
20+
21+
4. (Optional) PR for stored-proc connector:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Port Changes to SP
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, labeled, unlabeled]
6+
branches:
7+
- main
8+
9+
jobs:
10+
port_changes_to_sp:
11+
runs-on: ubuntu-latest
12+
if: ${{!contains(github.event.pull_request.labels.*.name, 'DO_NOT_PORT_CHANGES_TO_SP')}}
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Check PR description and labels
20+
run: |
21+
regex_pattern=".*https://github.com/snowflakedb/Stored-Proc-Python-Connector/pull/[0-9]+.*"
22+
description=$(jq -r '.pull_request.body' $GITHUB_EVENT_PATH)
23+
24+
if [[ ! $description =~ $regex_pattern ]]; then
25+
echo "Error: PR description must contain a regex or label DO_NOT_PORT_CHANGES_TO_SP"
26+
exit 1
27+
fi

0 commit comments

Comments
 (0)