Handle workflow events without commits - #327
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe non-static-checking workflow now resolves commits from event data or a pull request commits link, reports a descriptive error when commits are unavailable, and processes the directory only after successful resolution. ChangesWorkflow commit resolution
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.45.0)lib/index.jsast-grep timed out on this file 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 |
Summary
Fixes #218 by replacing the current
eventObj.pull_request._links.commits.hrefassumption with an explicit event commit resolver.When the action runs on events that do not include
commitsand are not pull request events, it now fails with an actionable message that points users toward push/pull_request events orstatic-checking+file-url.Validation
npm cinpm run lintnpm run build_linkscommits: []still exits successfully withchanged=falseThis PR was prepared with AI coding-agent assistance; I reviewed the change and ran the validation above locally.
Summary by CodeRabbit