Skip to content

Conversation

@6543
Copy link
Member

@6543 6543 commented Dec 30, 2019

fix #9544

@6543 6543 force-pushed the fix-9544_duplicate-reaction-return-200 branch from 3d88f40 to 67767b4 Compare December 30, 2019 16:42
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 30, 2019
@zeripath
Copy link
Contributor

Is StatusOK really right here ? - I would have thought StatusConflict would have been better? However, I think there's a place for putting a 200 here.

@6543
Copy link
Member Author

6543 commented Dec 30, 2019

We can still decide wich status we return - github does it the 200 way reverence: link

But this is also a smal code/refactor <- now we can explicit handle dubble add and filter/find reactions by more options

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Dec 30, 2019
@codecov-io
Copy link

codecov-io commented Dec 30, 2019

Codecov Report

Merging #9550 into master will decrease coverage by 0.01%.
The diff coverage is 62.06%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9550      +/-   ##
==========================================
- Coverage   41.99%   41.98%   -0.02%     
==========================================
  Files         577      577              
  Lines       75939    75970      +31     
==========================================
+ Hits        31890    31894       +4     
- Misses      40100    40132      +32     
+ Partials     3949     3944       -5
Impacted Files Coverage Δ
models/error.go 32.71% <0%> (-1.43%) ⬇️
routers/api/v1/repo/issue_reaction.go 75.27% <57.14%> (-0.72%) ⬇️
models/issue_reaction.go 84.02% <80%> (-3.92%) ⬇️
services/pull/check.go 48.59% <0%> (-4.93%) ⬇️
modules/task/migrate.go 25% <0%> (-3.95%) ⬇️
modules/process/manager.go 74.69% <0%> (-3.62%) ⬇️
routers/repo/view.go 38.59% <0%> (-0.88%) ⬇️
models/repo.go 47.97% <0%> (-0.11%) ⬇️
... and 6 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 655aea1...f367800. Read the comment docs.

@zeripath zeripath added the modifies/api This PR adds API routes or modifies them label Dec 30, 2019
@lafriks lafriks added this to the 1.11.0 milestone Dec 31, 2019
@6543
Copy link
Member Author

6543 commented Dec 31, 2019

@lafriks done

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Dec 31, 2019
@6543
Copy link
Member Author

6543 commented Dec 31, 2019

@techknowlogick ready for merge 🚀

@techknowlogick techknowlogick merged commit 9600c27 into go-gitea:master Dec 31, 2019
@6543 6543 deleted the fix-9544_duplicate-reaction-return-200 branch December 31, 2019 08:39
6543 added a commit to 6543-forks/gitea that referenced this pull request Dec 31, 2019
 * add ErrReactionAlreadyExist
 * extend FindReactionsOptions
 * createReaction check if exit before create
@6543
Copy link
Member Author

6543 commented Dec 31, 2019

@techknowlogick since reaction api is not in 1.10.0 I only backported error handling

lafriks pushed a commit that referenced this pull request Dec 31, 2019
* add ErrReactionAlreadyExist
 * extend FindReactionsOptions
 * createReaction check if exit before create
@lafriks lafriks added backport/done All backports for this PR have been created backport/v1.10 labels Dec 31, 2019
@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

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug Report] Reactions API throws 500 for duplicate reaction

7 participants