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

fix bug when migrate repository 500 when repo is existed #6188

Merged
merged 3 commits into from Feb 26, 2019

Conversation

@lunny
Copy link
Member

commented Feb 26, 2019

will fix #4140

@lunny lunny added the kind/bug label Feb 26, 2019

@lunny lunny added this to the 1.8.0 milestone Feb 26, 2019

@lunny lunny added the backport/v1.7 label Feb 26, 2019

@codecov-io

This comment has been minimized.

Copy link

commented Feb 26, 2019

Codecov Report

Merging #6188 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6188      +/-   ##
==========================================
- Coverage   38.87%   38.87%   -0.01%     
==========================================
  Files         354      354              
  Lines       50184    50192       +8     
==========================================
+ Hits        19508    19510       +2     
- Misses      27851    27857       +6     
  Partials     2825     2825
Impacted Files Coverage Δ
routers/repo/repo.go 20.56% <0%> (-0.26%) ⬇️
routers/api/v1/repo/repo.go 55.37% <0%> (-0.46%) ⬇️
models/repo_list.go 67.89% <0%> (+1.05%) ⬆️

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 594f591...f20c655. Read the comment docs.

@NefixEstrada

This comment has been minimized.

Copy link

commented Feb 26, 2019

Hey! First of all thanks for fixing the bug!

I see you are sending back a 422 HTTP Code. Shouldn't a 409 be more appropiate?

Thanks,
Néfix Estrada

@lunny

This comment has been minimized.

Copy link
Member Author

commented Feb 26, 2019

Show resolved Hide resolved routers/repo/repo.go Outdated
Show resolved Hide resolved routers/api/v1/repo/repo.go Outdated

@GiteaBot GiteaBot added lgtm/need 1 and removed lgtm/need 2 labels Feb 26, 2019

@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Feb 26, 2019

@techknowlogick techknowlogick merged commit 7afe81f into go-gitea:master Feb 26, 2019

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/drone/pr the build was successful
Details

@lunny lunny deleted the lunny:lunny/fix_migrate_exist_500 branch Feb 26, 2019

@techknowlogick

This comment has been minimized.

Copy link
Member

commented Feb 26, 2019

@lunny please backport 😃

lunny added a commit to lunny/gitea that referenced this pull request Feb 27, 2019

fix bug when migrate repository 500 when repo is existed (go-gitea#6188)
* fix bug when migrate repository 500 when repo is existed

* use 409 but not 422 for error status code when not exist

* translation fix

@lunny lunny added the backport/done label Feb 27, 2019

techknowlogick added a commit that referenced this pull request Feb 27, 2019

Mikescher added a commit to Mikescher/gitea that referenced this pull request Mar 20, 2019

fix bug when migrate repository 500 when repo is existed (go-gitea#6188)
* fix bug when migrate repository 500 when repo is existed

* use 409 but not 422 for error status code when not exist

* translation fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants
You can’t perform that action at this time.