mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-14 18:24:14 +01:00
[F3] ID remapping logic is in place, remove workaround
This commit is contained in:
parent
c770713656
commit
d0fee30167
2 changed files with 4 additions and 9 deletions
|
@ -110,7 +110,8 @@ func (o *Review) FromFormat(review *format.Review) {
|
|||
}
|
||||
*o = Review{
|
||||
Review: issues_model.Review{
|
||||
ID: review.GetID(),
|
||||
ID: review.GetID(),
|
||||
ReviewerID: review.ReviewerID.GetID(),
|
||||
Reviewer: &user_model.User{
|
||||
ID: review.ReviewerID.GetID(),
|
||||
},
|
||||
|
@ -191,12 +192,6 @@ func (o *ReviewProvider) Put(ctx context.Context, user *User, project *Project,
|
|||
comment.ID = 0
|
||||
}
|
||||
r.IssueID = pullRequest.IssueID
|
||||
// this is a workaround because the id remapping logic is missing, wait until it is implemented and remove it
|
||||
u, err := user_model.GetUserByName(ctx, r.Reviewer.Name)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
r.ReviewerID = u.ID
|
||||
if err := issues_model.InsertReviews([]*issues_model.Review{r}); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ func TestF3(t *testing.T) {
|
|||
fixture.NewAsset()
|
||||
fixture.NewIssueComment(nil)
|
||||
fixture.NewPullRequestComment()
|
||||
// fixture.NewReview()
|
||||
fixture.NewReview()
|
||||
fixture.NewIssueReaction()
|
||||
fixture.NewCommentReaction()
|
||||
|
||||
|
@ -109,7 +109,7 @@ func TestF3(t *testing.T) {
|
|||
assert.Contains(t, files, "/release/")
|
||||
assert.Contains(t, files, "/asset/")
|
||||
assert.Contains(t, files, "/comment/")
|
||||
// assert.Contains(t, files, "/review/")
|
||||
assert.Contains(t, files, "/review/")
|
||||
assert.Contains(t, files, "/reaction/")
|
||||
// f3_util.Command(context.Background(), "cp", "-a", f3.GetDirectory(), "abc")
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue