-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 API endpoint for repo transfer #9947
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9947 +/- ##
==========================================
+ Coverage 42.38% 43.44% +1.05%
==========================================
Files 620 566 -54
Lines 80961 78978 -1983
==========================================
- Hits 34317 34313 -4
+ Misses 42408 40429 -1979
Partials 4236 4236
Continue to review full report at Codecov.
|
2c56968
to
e861f30
Compare
@camlafit here it is :) |
@lunny done |
@lunny removed the nonesense :D |
35a2ae1
to
df565d4
Compare
@zeripath thanks :D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit - stop routers/api/v1/repo/repo.go from getting too large by splitting out the transfer function as repo_transfer.go
@lunny look at last two commits - did code-refactor |
I would like to rename |
db960df
to
da4a318
Compare
@lunny removed prefix because of package/folder name ... |
Could be set teams_ids it's a great idea thanks :) |
services/repository/transfer.go
Outdated
if err != nil { | ||
return err | ||
} | ||
for _, team := range teams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you check the two things?
- if the new owner is an orgnization?
- if the teams are belong to the new owner?
66cf951
to
84e5454
Compare
AddRepository handle OrgCheck and DubleAdd Prefention for us! Lines 274 to 280 in 1f01f53
it also check |
And I already added a test witch make sure it works: https://github.com/go-gitea/gitea/pull/9947/files#diff-ffd1c307569a21f7d0f7234d5e8f3724R407 |
@lunny I think there is no problem, your described |
ed18d4688cb78317b315a8a3570603de8e289011 should make sure this functin os "atomic" |
2e2c0d5
to
a2002d2
Compare
ready to merge 🚀 |
close #9858
GitHub Spec: link
original PR: https://gitea.artixlinux.org/artix/gitea/pulls/1