-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix migration panic when Head.User is not exist #7226
Fix migration panic when Head.User is not exist #7226
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7226 +/- ##
==========================================
+ Coverage 40.96% 40.98% +0.01%
==========================================
Files 462 462
Lines 62567 62584 +17
==========================================
+ Hits 25631 25647 +16
+ Misses 33576 33575 -1
- Partials 3360 3362 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that base.PullRequestBranch can tolerate these being potentially empty - I'll approve
@@ -443,10 +462,10 @@ func (g *GithubDownloaderV3) GetPullRequests(page, perPage int) ([]*base.PullReq | |||
MergedTime: pr.MergedAt, | |||
IsLocked: pr.ActiveLockReason != nil, | |||
Head: base.PullRequestBranch{ | |||
Ref: *pr.Head.Ref, | |||
SHA: *pr.Head.SHA, | |||
Ref: headRef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will base be able to cope with these being effectively empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Base Repo's Ref
, SHA
information should be stored in databased even if the branch deleted. So they will not be empty, but it will fail on coming process.
* fix migration panic when Head.User is not exist * fix test
As title