fix(ci): Remove CI/CD check differences between PR and push events#5
Merged
fix(ci): Remove CI/CD check differences between PR and push events#5
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #4
This applies best practices from js-ai-driven-development-pipeline-template#18 to fix the issue where CI/CD checks behave differently for pull request events vs push/merge events. Changes: - Add `detect-changes` job with cross-platform `detect_code_changes.py` script - Make lint job independent of changelog check (runs based on file changes only) - Allow docs-only PRs without changelog requirement - Handle changelog-check 'skipped' state in dependent jobs - Exclude `changelog.d/`, `docs/`, `experiments/`, `examples/` folders and markdown files from code changes detection Benefits: 1. Lint and tests run on ALL PRs regardless of changelog status 2. Docs-only PRs don't require changelog fragments (reducing friction for documentation updates) 3. No differences between PR checks and push/merge checks (preventing future surprises) 4. Changelog validation only runs when code changes (more sensible behavior) 5. Cross-platform compatible - the detection script is written in Python 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 4e99f5c.
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR applies best practices from js-ai-driven-development-pipeline-template#18 to fix the issue where CI/CD checks behave differently for pull request events vs push/merge events.
Root Cause
When documentation-only PRs are merged without changelog fragments:
changelogjob fails with "No changelog fragment found"lintjob depends onchangelogsucceedinglint, which could fail on unformatted filesChanges
New Script:
scripts/detect_code_changes.py- a cross-platform Python script for detecting file changes in CI/CDWorkflow Changes:
detect-changesjob that runs the new script and outputs what types of files changedlintjob independent ofchangelog- it's a fast check that should always runchangelogskip for docs-only PRs by adding condition:needs.detect-changes.outputs.any-code-changed == 'true'|| needs.lint.result == 'skipped'and|| needs.test.result == 'skipped'tobuildjob to handle the new skipped statesany-code-changeddetection to exclude:changelog.d/folder (changelog metadata)docs/folder (documentation)experiments/folder (experimental scripts)examples/folder (example scripts)*.md) in any folderBenefits
After this fix:
Testing
Local checks:
ruff check .passesruff format --check .passesmypy srcpassespytest tests/passesFiles Changed
.github/workflows/release.yml- Workflow structure updates + use new scriptscripts/detect_code_changes.py- NEW Cross-platform change detection scriptFixes #4
🤖 Generated with Claude Code