-
-
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 wrong identify poster on a migrated pull request when submit review #9827
Conversation
@@ -440,7 +440,7 @@ func (issue *Issue) HashTag() string { | |||
|
|||
// IsPoster returns true if given user by ID is the poster. | |||
func (issue *Issue) IsPoster(uid int64) bool { | |||
return issue.PosterID == uid | |||
return issue.OriginalAuthorID == 0 && issue.PosterID == uid |
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.
Just to confirm from what I have understand when migrating if the user exist OriginalAuthorID is not and set and issue.PosterID is not the doer (like it is by default) but found user ?
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.
If OriginalAuthorID > 0, PosterID means migrator but not poster id. OriginalAuthorID
is an external system id not gitea user id.
Codecov Report
@@ Coverage Diff @@
## master #9827 +/- ##
==========================================
+ Coverage 42.31% 42.32% +0.01%
==========================================
Files 604 604
Lines 79116 79116
==========================================
+ Hits 33479 33488 +9
+ Misses 41516 41505 -11
- Partials 4121 4123 +2
Continue to review full report at Codecov.
|
@lunny please send backports |
Fix #8959