Skip to content
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

[WIP] Add API for comment reactions #8823

Closed
wants to merge 27 commits into from

Conversation

6543
Copy link
Member

@6543 6543 commented Nov 4, 2019

close #8313

@6543 6543 force-pushed the add_api_for_comment-reactions branch from 8881ade to 83343fa Compare November 4, 2019 20:26
@6543 6543 force-pushed the add_api_for_comment-reactions branch from 9606c96 to ffb31cd Compare November 4, 2019 21:23
6543 and others added 6 commits November 5, 2019 01:58
sometimes the CI doesnt now what to do ... so lest just restart it
I'll write this long message of an empty commit just for funn

 > commit -m 'some message' --allow-empty

and '-S' if you like to add Signature

why this long text: just for funn
@6543

This comment has been minimized.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 5, 2019
@codecov-io
Copy link

codecov-io commented Nov 5, 2019

Codecov Report

Merging #8823 into master will decrease coverage by 0.08%.
The diff coverage is 5.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8823      +/-   ##
==========================================
- Coverage   41.21%   41.13%   -0.09%     
==========================================
  Files         543      543              
  Lines       69768    69950     +182     
==========================================
+ Hits        28756    28773      +17     
- Misses      37319    37486     +167     
+ Partials     3693     3691       -2
Impacted Files Coverage Δ
routers/api/v1/repo/issue_comment.go 36.71% <0%> (-17%) ⬇️
routers/api/v1/api.go 73.57% <100%> (+0.19%) ⬆️
models/issue_reaction.go 78.69% <8.69%> (-11.17%) ⬇️
modules/sync/unique_queue.go 78.57% <0%> (-10.72%) ⬇️
modules/task/migrate.go 24.35% <0%> (-3.85%) ⬇️
models/error.go 31.75% <0%> (-1.24%) ⬇️
models/repo.go 48.62% <0%> (+0.05%) ⬆️
routers/repo/view.go 38.59% <0%> (+0.87%) ⬆️
models/repo_list.go 74.27% <0%> (+0.97%) ⬆️
modules/migrations/gitea.go 11.77% <0%> (+1.49%) ⬆️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 05e7715...18ac502. Read the comment docs.

@jolheiser
Copy link
Member

@6543
I believe it's because you made a type definition, not a struct.

type CommentReactionList []*CommentReaction

I think what you want is

type CommentReacionList struct {
    CommentReactions []*CommentReaction `json:"comment_reactions"`
}

or something similar

Reflect is mad because a type definition reflection doesn't have a NumField

@6543 6543 force-pushed the add_api_for_comment-reactions branch from d7f50e7 to d561946 Compare November 5, 2019 09:27
@6543
Copy link
Member Author

6543 commented Nov 5, 2019

@jolheiser thanks this fixes the reflection ...

routers/api/v1/repo/issue_comment.go Outdated Show resolved Hide resolved
models/issue_reaction.go Outdated Show resolved Hide resolved
@6543 6543 force-pushed the add_api_for_comment-reactions branch from aa024e8 to cf0332a Compare November 5, 2019 22:46
@6543
Copy link
Member Author

6543 commented Nov 8, 2019

because there were no "reactions" anymore ... I'll implement the API like described in #8313 (comment) ... hopefully this is good enouth

@6543
Copy link
Member Author

6543 commented Dec 2, 2019

#9220 replace this PR

@6543 6543 closed this Dec 2, 2019
@6543 6543 deleted the add_api_for_comment-reactions branch December 6, 2019 19:23
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: handle reactions to comments
5 participants