File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,10 +28,24 @@ jobs:
2828 - name : Run the generator script
2929 run : python .github/ISSUE_TEMPLATE/sample_issue_generator.py
3030
31- - name : Commit and push changes
31+ - name : Check for discrepancies
3232 run : |
33- git config user.name "github-actions[bot]"
34- git config user.email "github-actions[bot]@users.noreply.github.com"
35- git add .github/ISSUE_TEMPLATE/sample_issue.yml
36- git commit -m "Auto-generate sample issue template from CODEOWNERS" || echo "No changes to commit"
37- git push origin HEAD:${{ github.head_ref }}
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
You can’t perform that action at this time.
0 commit comments