From a5ecf06c2ac92ebfdccaa3f6d698d583a758161e Mon Sep 17 00:00:00 2001 From: Minjie Fang Date: Thu, 7 May 2026 00:12:12 +0000 Subject: [PATCH 1/2] Fix login edit to open one editor only (#977) Fix https://gitea.com/gitea/tea/issues/906 Reviewed-on: https://gitea.com/gitea/tea/pulls/977 Reviewed-by: Lunny Xiao Co-authored-by: Minjie Fang Co-committed-by: Minjie Fang --- cmd/login/edit.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/login/edit.go b/cmd/login/edit.go index a413715..a052ba3 100644 --- a/cmd/login/edit.go +++ b/cmd/login/edit.go @@ -32,9 +32,7 @@ func runLoginEdit(_ context.Context, _ *cli.Command) error { cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - return err - } + return cmd.Run() } return open.Start(config.GetConfigPath()) } From f617f26da0840fce6092eaa05357a4fe62708082 Mon Sep 17 00:00:00 2001 From: cpamayo Date: Thu, 7 May 2026 00:14:22 +0000 Subject: [PATCH 2/2] fix: pass the name flag value as the organization FullName (#832) This change proposes that, when creating an organization using the CLI, the value provided in the `--name` parameter is used as the organization `FullName`. --------- Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/tea/pulls/832 Reviewed-by: Lunny Xiao Co-authored-by: cpamayo Co-committed-by: cpamayo --- cmd/organizations/create.go | 10 +++++----- docs/CLI.md | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/organizations/create.go b/cmd/organizations/create.go index 94be20c..8eea3ad 100644 --- a/cmd/organizations/create.go +++ b/cmd/organizations/create.go @@ -4,14 +4,14 @@ package organizations import ( - "fmt" - stdctx "context" + "fmt" "code.gitea.io/sdk/gitea" "code.gitea.io/tea/cmd/flags" "code.gitea.io/tea/modules/context" "code.gitea.io/tea/modules/print" + "github.com/urfave/cli/v3" ) @@ -25,7 +25,7 @@ var CmdOrganizationCreate = cli.Command{ ArgsUsage: "", Flags: []cli.Flag{ &cli.StringFlag{ - Name: "name", + Name: "full-name", Aliases: []string{"n"}, }, &cli.StringFlag{ @@ -75,8 +75,8 @@ func RunOrganizationCreate(_ stdctx.Context, cmd *cli.Command) error { } org, _, err := ctx.Login.Client().CreateOrg(gitea.CreateOrgOption{ - Name: ctx.Args().First(), - // FullName: , // not really meaningful for orgs (not displayed in webui, use description instead?) + Name: ctx.Args().First(), + FullName: ctx.String("full-name"), Description: ctx.String("description"), Website: ctx.String("website"), Location: ctx.String("location"), diff --git a/docs/CLI.md b/docs/CLI.md index 94474b8..6e71101 100644 --- a/docs/CLI.md +++ b/docs/CLI.md @@ -1043,12 +1043,12 @@ Create an organization **--description, -d**="": +**--full-name, -n**="": + **--location, -L**="": **--login, -l**="": Use a different Gitea Login. Optional -**--name, -n**="": - **--repo-admins-can-change-team-access**: **--visibility, -v**="":