Skip to content

Commit ab4436b

Browse files
committed
fix
1 parent bc452d3 commit ab4436b

24 files changed

+496
-272
lines changed

cmd/actions.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ var (
3030
Aliases: []string{"grt"},
3131
Flags: []cli.Flag{
3232
&cli.StringFlag{
33-
Name: "scope, s",
34-
Value: "",
35-
Usage: "{owner}[/{repo}] - leave empty for a global runner",
33+
Name: "scope",
34+
Aliases: []string{"s"},
35+
Value: "",
36+
Usage: "{owner}[/{repo}] - leave empty for a global runner",
3637
},
3738
},
3839
}

cmd/admin.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,9 @@ var (
267267
Value: "",
268268
},
269269
&cli.BoolFlag{
270-
Name: "force,f",
271-
Usage: "A flag to bypass a confirmation step",
270+
Name: "force",
271+
Aliases: []string{"f"},
272+
Usage: "A flag to bypass a confirmation step",
272273
},
273274
},
274275
}

cmd/admin_user_change_password.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ var microcmdUserChangePassword = &cli.Command{
2121
Action: runChangePassword,
2222
Flags: []cli.Flag{
2323
&cli.StringFlag{
24-
Name: "username,u",
25-
Value: "",
26-
Usage: "The user to change password for",
24+
Name: "username",
25+
Aliases: []string{"u"},
26+
Value: "",
27+
Usage: "The user to change password for",
2728
},
2829
&cli.StringFlag{
29-
Name: "password,p",
30-
Value: "",
31-
Usage: "New password to set for user",
30+
Name: "password",
31+
Aliases: []string{"p"},
32+
Value: "",
33+
Usage: "New password to set for user",
3234
},
3335
},
3436
}

cmd/admin_user_delete.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ var microcmdUserDelete = &cli.Command{
2323
Usage: "ID of user of the user to delete",
2424
},
2525
&cli.StringFlag{
26-
Name: "username,u",
27-
Usage: "Username of the user to delete",
26+
Name: "username",
27+
Aliases: []string{"u"},
28+
Usage: "Username of the user to delete",
2829
},
2930
&cli.StringFlag{
30-
Name: "email,e",
31-
Usage: "Email of the user to delete",
31+
Name: "email",
32+
Aliases: []string{"e"},
33+
Usage: "Email of the user to delete",
3234
},
3335
&cli.BoolFlag{
3436
Name: "purge",

cmd/admin_user_generate_access_token.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ var microcmdUserGenerateAccessToken = &cli.Command{
1717
Usage: "Generate an access token for a specific user",
1818
Flags: []cli.Flag{
1919
&cli.StringFlag{
20-
Name: "username,u",
21-
Usage: "Username",
20+
Name: "username",
21+
Aliases: []string{"u"},
22+
Usage: "Username",
2223
},
2324
&cli.StringFlag{
24-
Name: "token-name,t",
25-
Usage: "Token name",
26-
Value: "gitea-admin",
25+
Name: "token-name",
26+
Aliases: []string{"t"},
27+
Usage: "Token name",
28+
Value: "gitea-admin",
2729
},
2830
&cli.BoolFlag{
2931
Name: "raw",

cmd/admin_user_must_change_password.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ var microcmdUserMustChangePassword = &cli.Command{
1818
Action: runMustChangePassword,
1919
Flags: []cli.Flag{
2020
&cli.BoolFlag{
21-
Name: "all,A",
22-
Usage: "All users must change password, except those explicitly excluded with --exclude",
21+
Name: "all",
22+
Aliases: []string{"A"},
23+
Usage: "All users must change password, except those explicitly excluded with --exclude",
2324
},
2425
&cli.StringSliceFlag{
25-
Name: "exclude,e",
26-
Usage: "Do not change the must-change-password flag for these users",
26+
Name: "exclude",
27+
Aliases: []string{"e"},
28+
Usage: "Do not change the must-change-password flag for these users",
2729
},
2830
&cli.BoolFlag{
2931
Name: "unset",

cmd/docs.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ var CmdDocs = &cli.Command{
2323
Usage: "Output man pages instead",
2424
},
2525
&cli.StringFlag{
26-
Name: "output, o",
27-
Usage: "Path to output to instead of stdout (will overwrite if exists)",
26+
Name: "output",
27+
Aliases: []string{"o"},
28+
Usage: "Path to output to instead of stdout (will overwrite if exists)",
2829
},
2930
},
3031
}

cmd/doctor.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ var CmdDoctor = &cli.Command{
5454
Usage: `Name of the log file (default: "doctor.log"). Set to "-" to output to stdout, set to "" to disable`,
5555
},
5656
&cli.BoolFlag{
57-
Name: "color, H",
58-
Usage: "Use color for outputted information",
57+
Name: "color",
58+
Aliases: []string{"H"},
59+
Usage: "Use color for outputted information",
5960
},
6061
},
6162
Subcommands: []*cli.Command{

cmd/dump.go

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,34 +104,41 @@ It can be used for backup and capture Gitea server image to send to maintainer`,
104104
Action: runDump,
105105
Flags: []cli.Flag{
106106
&cli.StringFlag{
107-
Name: "file, f",
108-
Value: fmt.Sprintf("gitea-dump-%d.zip", time.Now().Unix()),
109-
Usage: "Name of the dump file which will be created. Supply '-' for stdout. See type for available types.",
107+
Name: "file",
108+
Aliases: []string{"f"},
109+
Value: fmt.Sprintf("gitea-dump-%d.zip", time.Now().Unix()),
110+
Usage: "Name of the dump file which will be created. Supply '-' for stdout. See type for available types.",
110111
},
111112
&cli.BoolFlag{
112-
Name: "verbose, V",
113-
Usage: "Show process details",
113+
Name: "verbose",
114+
Aliases: []string{"V"},
115+
Usage: "Show process details",
114116
},
115117
&cli.BoolFlag{
116-
Name: "quiet, q",
117-
Usage: "Only display warnings and errors",
118+
Name: "quiet",
119+
Aliases: []string{"q"},
120+
Usage: "Only display warnings and errors",
118121
},
119122
&cli.StringFlag{
120-
Name: "tempdir, t",
121-
Value: os.TempDir(),
122-
Usage: "Temporary dir path",
123+
Name: "tempdir",
124+
Aliases: []string{"t"},
125+
Value: os.TempDir(),
126+
Usage: "Temporary dir path",
123127
},
124128
&cli.StringFlag{
125-
Name: "database, d",
126-
Usage: "Specify the database SQL syntax",
129+
Name: "database",
130+
Aliases: []string{"d"},
131+
Usage: "Specify the database SQL syntax",
127132
},
128133
&cli.BoolFlag{
129-
Name: "skip-repository, R",
130-
Usage: "Skip the repository dumping",
134+
Name: "skip-repository",
135+
Aliases: []string{"R"},
136+
Usage: "Skip the repository dumping",
131137
},
132138
&cli.BoolFlag{
133-
Name: "skip-log, L",
134-
Usage: "Skip the log dumping",
139+
Name: "skip-log",
140+
Aliases: []string{"L"},
141+
Usage: "Skip the log dumping",
135142
},
136143
&cli.BoolFlag{
137144
Name: "skip-custom-dir",

cmd/dump_repo.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ var CmdDumpRepository = &cli.Command{
3535
Usage: "Git service, git, github, gitea, gitlab. If clone_addr could be recognized, this could be ignored.",
3636
},
3737
&cli.StringFlag{
38-
Name: "repo_dir, r",
39-
Value: "./data",
40-
Usage: "Repository dir path to store the data",
38+
Name: "repo_dir",
39+
Aliases: []string{"r"},
40+
Value: "./data",
41+
Usage: "Repository dir path to store the data",
4142
},
4243
&cli.StringFlag{
4344
Name: "clone_addr",

cmd/embedded.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ var (
4141
Action: runList,
4242
Flags: []cli.Flag{
4343
&cli.BoolFlag{
44-
Name: "include-vendored,vendor",
45-
Usage: "Include files under public/vendor as well",
44+
Name: "include-vendored",
45+
Aliases: []string{"vendor"},
46+
Usage: "Include files under public/vendor as well",
4647
},
4748
},
4849
}
@@ -53,8 +54,9 @@ var (
5354
Action: runView,
5455
Flags: []cli.Flag{
5556
&cli.BoolFlag{
56-
Name: "include-vendored,vendor",
57-
Usage: "Include files under public/vendor as well",
57+
Name: "include-vendored",
58+
Aliases: []string{"vendor"},
59+
Usage: "Include files under public/vendor as well",
5860
},
5961
},
6062
}
@@ -65,8 +67,9 @@ var (
6567
Action: runExtract,
6668
Flags: []cli.Flag{
6769
&cli.BoolFlag{
68-
Name: "include-vendored,vendor",
69-
Usage: "Include files under public/vendor as well",
70+
Name: "include-vendored",
71+
Aliases: []string{"vendor"},
72+
Usage: "Include files under public/vendor as well",
7073
},
7174
&cli.BoolFlag{
7275
Name: "overwrite",
@@ -81,8 +84,9 @@ var (
8184
Usage: "Extract to the 'custom' directory as per app.ini",
8285
},
8386
&cli.StringFlag{
84-
Name: "destination,dest-dir",
85-
Usage: "Extract to the specified directory",
87+
Name: "destination",
88+
Aliases: []string{"dest-dir"},
89+
Usage: "Extract to the specified directory",
8690
},
8791
},
8892
}

cmd/keys.go

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,28 @@ var CmdKeys = &cli.Command{
2222
Action: runKeys,
2323
Flags: []cli.Flag{
2424
&cli.StringFlag{
25-
Name: "expected, e",
26-
Value: "git",
27-
Usage: "Expected user for whom provide key commands",
25+
Name: "expected",
26+
Aliases: []string{"e"},
27+
Value: "git",
28+
Usage: "Expected user for whom provide key commands",
2829
},
2930
&cli.StringFlag{
30-
Name: "username, u",
31-
Value: "",
32-
Usage: "Username trying to log in by SSH",
31+
Name: "username",
32+
Aliases: []string{"u"},
33+
Value: "",
34+
Usage: "Username trying to log in by SSH",
3335
},
3436
&cli.StringFlag{
35-
Name: "type, t",
36-
Value: "",
37-
Usage: "Type of the SSH key provided to the SSH Server (requires content to be provided too)",
37+
Name: "type",
38+
Aliases: []string{"t"},
39+
Value: "",
40+
Usage: "Type of the SSH key provided to the SSH Server (requires content to be provided too)",
3841
},
3942
&cli.StringFlag{
40-
Name: "content, k",
41-
Value: "",
42-
Usage: "Base64 encoded content of the SSH key provided to the SSH Server (requires type to be provided too)",
43+
Name: "content",
44+
Aliases: []string{"k"},
45+
Value: "",
46+
Usage: "Base64 encoded content of the SSH key provided to the SSH Server (requires type to be provided too)",
4347
},
4448
},
4549
}

0 commit comments

Comments
 (0)