Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0dac7f2

Browse files
author
Boyne
committed
adding schema checks for snippets
1 parent 4e5950a commit 0dac7f2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/create-pr-on-snippet.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ jobs:
1717
with:
1818
template-path: .github/ISSUE_TEMPLATE/new-snippet.yml # optional but recommended
1919
- run: cat ${HOME}/issue-parser-result.json
20+
21+
22+
- name: Check if issue is from new-snippet template
23+
id: check-template
24+
run: |
25+
ISSUE_BODY=$(cat $GITHUB_EVENT_PATH | jq -r .issue.body)
26+
echo $ISSUE_BODY
27+
if [[ $ISSUE_BODY == *"This issue was created using the new-snippet template."* ]]; then
28+
echo "Match found"
29+
echo "::set-output name=template_match::true"
30+
else
31+
echo "No match found"
32+
echo "::set-output name=template_match::false"
33+
fi
2034
2135
- name: Check and write snippet to PR
2236
uses: actions/github-script@v6

0 commit comments

Comments
 (0)