-
-
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 for user to create org #5268
Conversation
@lunny this appears to be failing to build because there's a newline at the end of the committed |
b897350
to
b44bc57
Compare
@zeripath the newline at the end of v1_json.tmpl is generated by |
@lunny CI failed (401 Unauthorized) |
a1263e3
to
150ef64
Compare
Codecov Report
@@ Coverage Diff @@
## master #5268 +/- ##
==========================================
+ Coverage 37.37% 37.42% +0.04%
==========================================
Files 312 312
Lines 46399 46444 +45
==========================================
+ Hits 17341 17380 +39
- Misses 26574 26576 +2
- Partials 2484 2488 +4
Continue to review full report at Codecov.
|
@sapk fixed. |
@@ -62,6 +62,56 @@ func ListUserOrgs(ctx *context.APIContext) { | |||
listUserOrgs(ctx, u, false) | |||
} | |||
|
|||
// Create api for create organization |
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.
Can you add Gitea copyright to header of this file?
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.
Ugh sorry @techknowlogick forgot to look for that!
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.
@zeripath it's ok. It's something that is missed a lot, and we thankfully have git so if we do miss in one PR it we can just look at the history of the repo and add the appropriate dates when fixing.
@@ -578,6 +578,7 @@ func RegisterRoutes(m *macaron.Macaron) { | |||
// Organizations | |||
m.Get("/user/orgs", reqToken(), org.ListMyOrgs) | |||
m.Get("/users/:username/orgs", org.ListUserOrgs) | |||
m.Post("/orgs", reqToken(), bind(api.CreateOrgOption{}), org.Create) |
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.
Can you add Gitea copyright to header of this file?
150ef64
to
7f8d4e4
Compare
@techknowlogick done. |
@techknowlogick need your approval. |
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.
@lunny thanks for reminder 😄 LGTM
This will fix #5260. And github API v3 doesn't implement this route.