-
-
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
Migrate reviews when migrating repository from github #9463
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9463 +/- ##
==========================================
- Coverage 42.35% 42.22% -0.14%
==========================================
Files 608 609 +1
Lines 79411 79692 +281
==========================================
+ Hits 33633 33648 +15
- Misses 41617 41899 +282
+ Partials 4161 4145 -16
Continue to review full report at Codecov.
|
migration has conflicts |
6501af7
to
754962a
Compare
It's ready for review. |
models/migrations/v118.go
Outdated
@@ -0,0 +1,24 @@ | |||
// Copyright 2019 The Gitea Authors. All rights reserved. |
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.
// Copyright 2019 The Gitea Authors. All rights reserved. | |
// Copyright 2020 The Gitea Authors. All rights reserved. |
models/review.go
Outdated
} | ||
sess.Close() | ||
|
||
for _, review := range reviews { |
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.
Why is this out of xorm session?
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.
- why is line 408 not behind line 404
@6543 All done. |
current state if I test i get this error: |
@lunny found the error source: https://github.com/go-gitea/gitea/pull/9463/files#diff-2557bcc0dfec751b3834722f0d5477f0R694 return the error! |
43ba9e3
to
4c1386c
Compare
@6543 Thanks! I have fixed that. |
Maybe remove the |
for _, comment := range review.Comments { | ||
headCommitID, err := g.gitRepo.GetRefCommitID(pr.GetGitRefName()) | ||
if err != nil { | ||
return fmt.Errorf("GetRefCommitID[%s]: %v", pr.GetGitRefName(), err) |
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.
Maybe if the ref can't be found we should add the comment anyway (e.g. as a normal comment)?
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.
It should be correct since we have migrated all pullrequest patches.
Currently github stored position related the patch head but gitea stored line of treepath. I will resolve that. |
Fixes #9443 |
pleace resolve confilct |
4c1386c
to
b444457
Compare
@6543 @guillep2k It's ready to review again. |
|
126c131
to
3e1c810
Compare
3e1c810
to
f37545b
Compare
Please review again. |
This PR will migrate review and review comments when migrating repository from github.
TODO:
OriginalAuthorID
A pull request migrated from go-gitea/test_repo#4 screenshot as below: