From 3b59c3f3b9acdbb31f00c557bbd68f4f0520c71b Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 13 Jul 2025 11:31:44 +1000 Subject: [PATCH] Prevent validation script from being committed to PRs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add validation script to git exclude to prevent accidental commits - Only commit changelog changes, not the temporary validation script - Keep PR commits clean and focused 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/changelog-v3.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/changelog-v3.yml b/.github/workflows/changelog-v3.yml index a175504da..506a9aade 100644 --- a/.github/workflows/changelog-v3.yml +++ b/.github/workflows/changelog-v3.yml @@ -97,10 +97,13 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" + # Check only the changelog file for changes if git diff --quiet docs/src/content/docs/changelog.mdx; then echo "No changes to commit" echo "committed=false" >> $GITHUB_OUTPUT else + # Ensure validation script doesn't get committed + echo "v3/scripts/validate-changelog.go" >> .git/info/exclude # Get the correct branch name to push to if [ "${{ github.event_name }}" = "pull_request" ]; then BRANCH_NAME="${{ github.event.pull_request.head.ref }}" @@ -114,6 +117,7 @@ jobs: echo "Pushing to branch: $BRANCH_NAME in repo: $REPO_OWNER" + # Only commit the changelog changes, not the validation script git add docs/src/content/docs/changelog.mdx git commit -m "🤖 Fix changelog: move entries to Unreleased section"