fix: Resolve changelog check failures on large PRs#1782
Conversation
Replace GitHub's diff API with local git diff to avoid API limitations. GitHub's diff API has hard limits (~300 files or ~3000 lines) that cause failures on large PRs. Using git diff with base/head SHAs works reliably for any PR size without API constraints. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
📝 WalkthroughWalkthroughThis PR updates Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Suggested labels
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1782 +/- ##
==========================================
+ Coverage 70.74% 70.76% +0.02%
==========================================
Files 432 432
Lines 39916 39916
==========================================
+ Hits 28238 28246 +8
+ Misses 9275 9268 -7
+ Partials 2403 2402 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/changelog-check.yml (2)
47-54: Solid fix for API limitations using local git diff.The switch to
git diffwith commit SHAs bypasses GitHub's API constraints effectively. The pattern^website/blog/.*\.(md|mdx)$correctly captures blog files, and the explanatory comments (lines 50–52) are helpful for future maintainers.One minor note: the
grep -v 'tags.yml'is redundant since the preceding grep already filters for.md|.mdxextensions. You can drop it for clarity, but it's harmless as-is.- NEW_BLOG_FILES=$(git diff --name-only "$BASE_REF" "$HEAD_REF" | grep -E '^website/blog/.*\.(md|mdx)$' | grep -v 'tags.yml' || true) + NEW_BLOG_FILES=$(git diff --name-only "$BASE_REF" "$HEAD_REF" | grep -E '^website/blog/.*\.(md|mdx)$' || true)
101-105: Consistent application of git diff approach in success message step.The same pattern is correctly applied here. However,
BASE_REFandHEAD_REFare extracted twice (lines 47–48 and 101–102). Consider moving these to a common step to reduce duplication and make future updates easier.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.github/workflows/changelog-check.yml(2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: Listener430
Repo: cloudposse/atmos PR: 934
File: tests/fixtures/scenarios/docs-generate/README.md.gotmpl:99-118
Timestamp: 2025-01-25T03:51:57.689Z
Learning: For the cloudposse/atmos repository, changes to template contents should be handled in dedicated PRs and are typically considered out of scope for PRs focused on other objectives.
Learnt from: aknysh
Repo: cloudposse/atmos PR: 944
File: go.mod:206-206
Timestamp: 2025-01-17T00:18:57.769Z
Learning: For indirect dependencies with license compliance issues in the cloudposse/atmos repository, the team prefers to handle them in follow-up PRs rather than blocking the current changes, as these issues often require deeper investigation of the dependency tree.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Build (macos)
- GitHub Check: Build (windows)
- GitHub Check: autofix
- GitHub Check: Analyze (go)
- GitHub Check: Run pre-commit hooks
- GitHub Check: Lint (golangci)
- GitHub Check: Review Dependency Licenses
- GitHub Check: Summary
Resolved snapshot conflicts by taking main's version. User will regenerate snapshots as needed for ai-1 branch changes. Merged changes from main: - feat: add error handling infrastructure with context-aware capabilities (#1763) - fix: Resolve changelog check failures on large PRs (#1782) - Refine homepage hero and typing animation (#1781) - fix: Reduce log spam for imports outside base directory (#1780) - feat: Add custom sanitization map to test CLI for test-specific output rules (#1779) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
These changes were released in v1.199.0-rc.0. |
Summary
Replace GitHub's diff API with local
git diffto avoid API limitations that cause changelog check failures on large PRs. GitHub's diff API has hard limits (~300 files or ~3000 lines), but using localgit diffwith base/head SHAs works reliably for any PR size.Test Plan
🤖 Generated with Claude Code
Summary by CodeRabbit