Add tea org create <name> (#420)

fixes #287, fixes #363

Co-authored-by: Norwin <git@nroo.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/420
Reviewed-by: techknowlogick <techknowlogick@gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
Norwin
2021-09-29 04:32:16 +08:00
committed by 6543
parent 42e423470c
commit 1e59dee685
3 changed files with 117 additions and 7 deletions

View File

@ -10,6 +10,18 @@ import (
"code.gitea.io/sdk/gitea"
)
// OrganizationDetails prints details of an org with formatting
func OrganizationDetails(org *gitea.Organization) {
outputMarkdown(fmt.Sprintf(
"# %s\n%s\n\n- Visibility: %s\n- Location: %s\n- Website: %s\n",
org.UserName,
org.Description,
org.Visibility,
org.Location,
org.Website,
), "")
}
// OrganizationsList prints a listing of the organizations
func OrganizationsList(organizations []*gitea.Organization, output string) {
if len(organizations) == 0 {