diff options
| author | 5an7y <[email protected]> | 2025-08-11 13:25:39 -0700 |
|---|---|---|
| committer | 5an7y <[email protected]> | 2025-08-11 13:25:39 -0700 |
| commit | 73af9a13a17bd0da61ccb5faad31bf861ff5f7ff (patch) | |
| tree | 22522c00012c77ccfca314e2a5c8650628145827 | |
| parent | b45d3d65404ac64e3f831c56ed558754d3465e47 (diff) | |
sample-issue creates error instead of push
| -rw-r--r-- | .github/workflows/generate-sample-issue-template.yml | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/.github/workflows/generate-sample-issue-template.yml b/.github/workflows/generate-sample-issue-template.yml index e0a60173..d984f2e4 100644 --- a/.github/workflows/generate-sample-issue-template.yml +++ b/.github/workflows/generate-sample-issue-template.yml @@ -28,10 +28,24 @@ jobs: - name: Run the generator script run: python .github/ISSUE_TEMPLATE/sample_issue_generator.py - - name: Commit and push changes + - name: Check for discrepancies run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add .github/ISSUE_TEMPLATE/sample_issue.yml - git commit -m "Auto-generate sample issue template from CODEOWNERS" || echo "No changes to commit" - git push origin HEAD:${{ github.head_ref }} + 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 |
