Handle missing commit author data - #2116
Conversation
🦋 Changeset detectedLatest commit: 13a1d19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2116 +/- ##
==========================================
+ Coverage 85.11% 85.13% +0.02%
==========================================
Files 66 66
Lines 2526 2530 +4
Branches 698 695 -3
==========================================
+ Hits 2150 2154 +4
Misses 346 346
Partials 30 30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| let user = data?.author?.user; | ||
|
|
||
| const associatedPullRequest = | ||
| data.associatedPullRequests && |
There was a problem hiding this comment.
the reported problem was related to an attempt of reading .author from data (undefined). So it seems with this propoposed patch we'd just move the crash to this place
There was a problem hiding this comment.
could you/we add a regression test to help verify the error and fix? :)
|
Looks like it's better to address this as a breaking change I think. Going to re-open a new PR |
fix #795
Did a very simple fix only since the pr variant also handles similarly
changesets/packages/get-github-info/src/index.ts
Lines 300 to 301 in c0e6d14
Could look into better warnings or types later maybe.