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

Add error for fork already existing #7185

Merged
merged 8 commits into from
Jun 12, 2019

Conversation

jolheiser
Copy link
Member

Partial fix for #7154 (considered partial because it addresses the error being misleading, however I think the issue author was asking for something else and this was just a byproduct)

The error returns the authed username, the repo they are trying to fork, and the name of the already existing fork (in case it was renamed)

gitea_fork

Replaced DocURL with SwaggerURL
Added error for fork already existing

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except CI failed.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jun 12, 2019
jolheiser and others added 2 commits June 12, 2019 12:05
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@codecov-io
Copy link

codecov-io commented Jun 12, 2019

Codecov Report

Merging #7185 into master will decrease coverage by 0.01%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7185      +/-   ##
==========================================
- Coverage   41.53%   41.52%   -0.02%     
==========================================
  Files         449      449              
  Lines       61302    61308       +6     
==========================================
- Hits        25462    25458       -4     
- Misses      32488    32495       +7     
- Partials     3352     3355       +3
Impacted Files Coverage Δ
models/repo.go 48.27% <100%> (+0.02%) ⬆️
models/error.go 32.39% <60%> (+0.3%) ⬆️
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
models/repo_list.go 72.08% <0%> (-1.02%) ⬇️
models/gpg_key.go 55.83% <0%> (-0.84%) ⬇️
models/unit.go 67.56% <0%> (+5.4%) ⬆️

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 f9ec2f8...6b525a5. Read the comment docs.

models/error.go Outdated Show resolved Hide resolved
@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 Jun 12, 2019
@techknowlogick techknowlogick merged commit 744fd6a into go-gitea:master Jun 12, 2019
@techknowlogick techknowlogick added this to the 1.9.0 milestone Jun 12, 2019
@jolheiser jolheiser deleted the 7154_fork_exists branch June 12, 2019 20:21
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 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
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