Skip to content

Fix create repo bugs #9606

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

Merged
merged 1 commit into from
Jan 5, 2020
Merged

Fix create repo bugs #9606

merged 1 commit into from
Jan 5, 2020

Conversation

jolheiser
Copy link
Member

  1. Errors on repository creation were out of scope of the handling function, so Gitea showed the 500 page (because err was nil).
  2. When an error occured, templateID was set to int default 0 and the JS was showing template units even though no template was chosen.

Signed-off-by: jolheiser <[email protected]>
@techknowlogick techknowlogick added this to the 1.11.0 milestone Jan 5, 2020
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 5, 2020
@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 Jan 5, 2020
@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 Jan 5, 2020
@codecov-io
Copy link

Codecov Report

Merging #9606 into master will decrease coverage by <.01%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9606      +/-   ##
==========================================
- Coverage   42.17%   42.17%   -0.01%     
==========================================
  Files         578      578              
  Lines       76065    76066       +1     
==========================================
- Hits        32083    32081       -2     
- Misses      40001    40002       +1     
- Partials     3981     3983       +2
Impacted Files Coverage Δ
routers/repo/repo.go 29.22% <66.66%> (+0.17%) ⬆️
models/unit.go 62.16% <0%> (-5.41%) ⬇️
modules/repository/repo.go 33.55% <0%> (-1.98%) ⬇️
modules/migrations/migrate.go 24.21% <0%> (-1.58%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
routers/repo/view.go 38.59% <0%> (-0.88%) ⬇️
modules/migrations/gitea.go 9.03% <0%> (-0.64%) ⬇️
models/repo.go 48.08% <0%> (+0.1%) ⬆️
models/error.go 33.82% <0%> (+1.1%) ⬆️
services/pull/temp_repo.go 34.18% <0%> (+2.56%) ⬆️
... and 1 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 03d59bc...5f805c0. Read the comment docs.

@techknowlogick techknowlogick merged commit 0842464 into go-gitea:master Jan 5, 2020
@6543
Copy link
Member

6543 commented Jan 6, 2020

@jolheiser can you backport this to 1.10.3?

@jolheiser jolheiser deleted the repo_500 branch January 6, 2020 01:59
@jolheiser
Copy link
Member Author

No, this bug doesn't exist in 1.10.x

@6543
Copy link
Member

6543 commented Jan 6, 2020

OK :)

@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/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.

7 participants