File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments