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