You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feat: Create an Organisation on Gogs (Fly.io) via REST API #8
We are going to get around this by simply doing "org_name-repo_name in the short term.
But it would be great to be able to programatically create organisations for GitHub Backup to work. 💭
Parking this code here for now. Sadly it doesn't work ...
@doc""" `patch/1` accepts `url`; the `url` of the API endpoint to create the `org`. """@specpatch(String.t(),map)::{:ok,map}|{:error,any}defpatch(url,params)dobody=Jason.encode!(params)headers=[{"Accept","application/json"},{"Authorization","token #{@access_token}"},{"Content-Type","application/json"}]inject_poison().patch(url,body,headers)|>parse_body_response()end@doc""" `org_create/1` accepts 1 argument: `org_name` to be crated. """deforg_create(org_name)dourl=@api_base_url<>"orgs/#{org_name}?token=#{@access_token}"# IO.inspect(url, label: "remote_repo_delete url")params=%{full_name: org_name,description: org_name,}patch(url,params)end
changed the title [-]Create an Organisation on Gogs (Fly.io) via REST API[/-][+]Feat: Create an Organisation on Gogs (Fly.io) via REST API[/+]on May 5, 2022
I didn't see this as a "Red flag" at the time because I didn't think we would need all the Org-related APIs ...
But I was wrong. Not only would the better Orgs API be useful it would be transformative in our particular use-case.
Activity
nelsonic commentedon May 2, 2022
Sadly, there doesn't appear to be an org creation endpoint ...
Issue created: gogs/docs-api#33
nelsonic commentedon May 2, 2022
We are going to get around this by simply doing
"org_name-repo_namein the short term.But it would be great to be able to programatically create organisations for GitHub Backup to work. 💭
nelsonic commentedon May 2, 2022
Parking this code here for now. Sadly it doesn't work ...
[-]Create an Organisation on Gogs (Fly.io) via REST API[/-][+]Feat: Create an Organisation on Gogs (Fly.io) via REST API[/+]nelsonic commentedon May 14, 2022
Dang ... 🤦♂️

GiteaallowsPOST /orgsto create an Org: https://try.gitea.io/api/swagger#/For reference, the
GogsAPI docs for Organizations at the time of writing:https://github.com/gogs/docs-api/tree/9740f402bd1e28892fe544eaac83ee016a7202df/Organizations
Were last updated Dec 17, 2018 ...

I didn't see this as a "Red flag" at the time because I didn't think we would need all the Org-related APIs ...
But I was wrong. Not only would the better Orgs API be useful it would be transformative in our particular use-case.
nelsonic commentedon May 16, 2022
GOTO: dwyl/gitea#7