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

@lunny lunny commented Feb 26, 2019

will fix #4140

@codecov-io
Copy link

codecov-io 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.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 26, 2019
@NefixEstrada
Copy link

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
Copy link
Member Author

lunny commented Feb 26, 2019

@NefixEstrada done.

routers/repo/repo.go Outdated Show resolved Hide resolved
routers/api/v1/repo/repo.go Outdated Show resolved Hide resolved
@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 Feb 26, 2019
@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 Feb 26, 2019
@techknowlogick techknowlogick merged commit 7afe81f into go-gitea:master Feb 26, 2019
@lunny lunny deleted the lunny/fix_migrate_exist_500 branch February 26, 2019 14:50
@techknowlogick
Copy link
Member

@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

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

* translation fix
@lunny lunny added the backport/done All backports for this PR have been created label Feb 27, 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. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

If there's a repo with the same name, the migration throws a 500 error
6 participants