ci: fix TypeError in issue_comment gate, pr was already unwrapped#102
ci: fix TypeError in issue_comment gate, pr was already unwrapped#102
Conversation
The response from github.rest.pulls.get is destructured as
`const { data: pr } = ...` on line 102, so `pr` is already the PR
object. Lines 110, 111, and 115 then did `pr.data.head.*` — double
dereference — which crashed with 'Cannot read properties of undefined
(reading head)' the first time anyone commented /testflight after
PR #97 landed the issue_comment handler.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe TestFlight workflow's Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
/testflight |
The response from github.rest.pulls.get is destructured as
const { data: pr } = ...on line 102, sopris already the PR object. Lines 110, 111, and 115 then didpr.data.head.*— double dereference — which crashed with 'Cannot read properties of undefined (reading head)' the first time anyone commented /testflight after PR #97 landed the issue_comment handler.Description
Summary by CodeRabbit