Skip to content

Commit c7e53ea

Browse files
authored
Merge pull request #21 from microsoft/user/5an7y/issues_based_on_samples
User/5an7y/issues based on samples
2 parents 9014cc3 + 28716b5 commit c7e53ea

2 files changed

Lines changed: 51 additions & 37 deletions

File tree

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Check Sample Issue Template
2+
3+
on:
4+
push:
5+
paths:
6+
- '.github/CODEOWNERS'
7+
pull_request:
8+
paths:
9+
- '.github/CODEOWNERS'
10+
11+
12+
jobs:
13+
generate-template:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
25+
- name: Install dependencies
26+
run: pip install pyyaml
27+
28+
- name: Run the generator script
29+
run: python .github/ISSUE_TEMPLATE/sample_issue_generator.py
30+
31+
- name: Check for discrepancies
32+
run: |
33+
if git diff --quiet .github/ISSUE_TEMPLATE/sample_issue.yml; then
34+
echo "✅ No discrepancies found. The sample issue template is up to date."
35+
else
36+
echo "❌ Discrepancy detected!"
37+
echo "The CODEOWNERS file was modified, but the sample issue template is not up to date."
38+
echo ""
39+
echo "Please regenerate the sample issue template by running:"
40+
echo " python .github/ISSUE_TEMPLATE/sample_issue_generator.py"
41+
echo ""
42+
echo "Or manually update it."
43+
echo ""
44+
echo "Then commit both files together:"
45+
echo " git add .github/CODEOWNERS .github/ISSUE_TEMPLATE/sample_issue.yml"
46+
echo " git commit -m 'Update CODEOWNERS and regenerate sample issue template'"
47+
echo ""
48+
echo "Differences found:"
49+
git diff .github/ISSUE_TEMPLATE/sample_issue.yml
50+
exit 1
51+
fi

.github/workflows/generate-sample-issue-template.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)