Skip to content

Commit b2335c4

Browse files
committed
📝 Use auto-generated docs
1 parent 5e5905c commit b2335c4

File tree

17 files changed

+280
-58
lines changed

17 files changed

+280
-58
lines changed

cmd/actions.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ var (
3939
Use: "actions",
4040
Short: "Report on GitHub Actions",
4141
Long: heredoc.Docf(
42-
`Report on GitHub Actions, requires %s scope`,
43-
utils.HiBlack("repo"),
42+
`Report on GitHub Actions, requires %[1]srepo%[1]s scope`,
43+
"`",
4444
),
4545
RunE: GetActionsReport,
4646
}

cmd/billing.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@ var (
3838
Use: "billing",
3939
Short: "Report on GitHub billing",
4040
Long: heredoc.Docf(
41-
`Report on GitHub billing, requires %s and/or %s scope`,
42-
utils.HiBlack("read:enterprise"),
43-
utils.HiBlack("read:org"),
41+
`Report on GitHub billing, requires %[1]sread:enterprise%[1]s and/or %[1]sread:org%[1]s scope`,
42+
"`",
4443
),
4544
RunE: GetBilling,
4645
}

cmd/root.go renamed to cmd/cmd.go

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var (
6464
sp = spinner.New(spinner.CharSets[14], 40*time.Millisecond)
6565

6666
RootCmd = &cobra.Command{
67-
Use: "gh-report",
67+
Use: "report",
6868
Short: "gh cli extension to generate reports",
6969
Long: "gh cli extension to generate enterprise/organization/user/repository reports",
7070
Version: "2.2.0",
@@ -111,23 +111,22 @@ func init() {
111111
RootCmd.PersistentFlags().StringVarP(
112112
&enterprise, "enterprise", "e", "",
113113
heredoc.Docf(
114-
`GitHub Enterprise Cloud account (requires %s scope)`,
115-
utils.HiBlack("read:enterprise"),
114+
`GitHub Enterprise Cloud account (requires %[1]sread:enterprise%[1]s scope)`,
115+
"`",
116116
),
117117
)
118118
RootCmd.PersistentFlags().StringVarP(
119119
&owner, "owner", "o", "",
120120
heredoc.Docf(
121-
`GitHub account organization (requires %s scope) or user account (requires %s scope)`,
122-
utils.HiBlack("read:org"),
123-
utils.HiBlack("n/a"),
121+
`GitHub account organization (requires %[1]sread:org%[1]s scope) or user account (requires %[1]sn/a%[1]s scope)`,
122+
"`",
124123
),
125124
)
126125
RootCmd.PersistentFlags().StringVarP(
127126
&repo, "repo", "r", "",
128127
heredoc.Docf(
129-
`GitHub repository (owner/repo), requires %s scope`,
130-
utils.HiBlack("repo"),
128+
`GitHub repository (owner/repo), requires %[1]srepo%[1]s scope`,
129+
"`",
131130
),
132131
)
133132

File renamed without changes.

cmd/license.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ var (
3636
Use: "license",
3737
Short: "Report on GitHub Enterprise licensing",
3838
Long: heredoc.Docf(
39-
`Report on GitHub Enterprise licensing, requires %s and %s scope`,
40-
utils.HiBlack("read:enterprise"),
41-
utils.HiBlack("user:email"),
39+
`Report on GitHub Enterprise licensing, requires %[1]sread:enterprise%[1]s and %[1]suser:email%[1]s scope`,
40+
"`",
4241
),
4342
RunE: GetLicensing,
4443
}

cmd/repo.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ var (
4242
Use: "repo",
4343
Short: "Report on GitHub repositories",
4444
Long: heredoc.Docf(
45-
`Report on GitHub repositories, requires %s and/or %s scope`,
46-
utils.HiBlack("read:enterprise"),
47-
utils.HiBlack("read:org"),
45+
`Report on GitHub repositories, requires %[1]sread:enterprise%[1]s and/or %[1]sread:org%[1]s scope`,
46+
"`",
4847
),
4948
Aliases: []string{"repos"},
5049
RunE: GetRepos,

cmd/verified_emails.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ var (
3838
Use: "verified-emails",
3939
Short: "List enterprise/organization members' verified emails",
4040
Long: heredoc.Docf(
41-
`List enterprise/organization members' verified emails, requires %s, %s and/or %s scope`,
42-
utils.HiBlack("user:email"),
43-
utils.HiBlack("read:enterprise"),
44-
utils.HiBlack("read:org"),
41+
`List enterprise/organization members' verified emails, requires %[1]suser:email%[1]s, %[1]sread:enterprise%[1]s and/or %[1]sread:org%[1]s scope`,
42+
"`",
4543
),
4644
Aliases: []string{"emails", "email"},
4745
RunE: GetUserEmails,

docs/report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## report
2+
3+
gh cli extension to generate reports
4+
5+
### Synopsis
6+
7+
gh cli extension to generate enterprise/organization/user/repository reports
8+
9+
### Options
10+
11+
```
12+
--csv string Path to CSV file, to save report to file
13+
-e, --enterprise read:enterprise GitHub Enterprise Cloud account (requires read:enterprise scope)
14+
-h, --help help for report
15+
--hostname string GitHub Enterprise Server hostname (default "github.com")
16+
--json string Path to JSON file, to save report to file
17+
--md string Path to MD file, to save report to file
18+
--no-cache Do not cache results for one hour (default "false")
19+
-o, --owner read:org GitHub account organization (requires read:org scope) or user account (requires `n/a` scope)
20+
-r, --repo repo GitHub repository (owner/repo), requires repo scope
21+
--silent Do not print any output (default: "false")
22+
-t, --token string GitHub Personal Access Token (default "gh auth token")
23+
```
24+
25+
### SEE ALSO
26+
27+
* [report actions](report_actions.md) - Report on GitHub Actions
28+
* [report billing](report_billing.md) - Report on GitHub billing
29+
* [report license](report_license.md) - Report on GitHub Enterprise licensing
30+
* [report repo](report_repo.md) - Report on GitHub repositories
31+
* [report verified-emails](report_verified-emails.md) - List enterprise/organization members' verified emails
32+
33+
###### Auto generated by spf13/cobra on 25-Mar-2023

docs/report_actions.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## report actions
2+
3+
Report on GitHub Actions
4+
5+
### Synopsis
6+
7+
Report on GitHub Actions, requires `repo` scope
8+
9+
```
10+
report actions [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
--exclude Exclude Github Actions authored by GitHub
17+
-h, --help help for actions
18+
```
19+
20+
### Options inherited from parent commands
21+
22+
```
23+
--csv string Path to CSV file, to save report to file
24+
-e, --enterprise read:enterprise GitHub Enterprise Cloud account (requires read:enterprise scope)
25+
--hostname string GitHub Enterprise Server hostname (default "github.com")
26+
--json string Path to JSON file, to save report to file
27+
--md string Path to MD file, to save report to file
28+
--no-cache Do not cache results for one hour (default "false")
29+
-o, --owner read:org GitHub account organization (requires read:org scope) or user account (requires `n/a` scope)
30+
-r, --repo repo GitHub repository (owner/repo), requires repo scope
31+
--silent Do not print any output (default: "false")
32+
-t, --token string GitHub Personal Access Token (default "gh auth token")
33+
```
34+
35+
### SEE ALSO
36+
37+
* [report](report.md) - gh cli extension to generate reports
38+
39+
###### Auto generated by spf13/cobra on 25-Mar-2023

docs/report_billing.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
## report billing
2+
3+
Report on GitHub billing
4+
5+
### Synopsis
6+
7+
Report on GitHub billing, requires `read:enterprise` and/or `read:org` scope
8+
9+
```
10+
report billing [flags]
11+
```
12+
13+
### Options
14+
15+
```
16+
--actions Get GitHub Actions billing
17+
--all Get all billing data (default true)
18+
-h, --help help for billing
19+
--packages Get GitHub Packages billing
20+
--security Get GitHub Advanced Security active committers
21+
--storage Get shared storage billing
22+
```
23+
24+
### Options inherited from parent commands
25+
26+
```
27+
--csv string Path to CSV file, to save report to file
28+
-e, --enterprise read:enterprise GitHub Enterprise Cloud account (requires read:enterprise scope)
29+
--hostname string GitHub Enterprise Server hostname (default "github.com")
30+
--json string Path to JSON file, to save report to file
31+
--md string Path to MD file, to save report to file
32+
--no-cache Do not cache results for one hour (default "false")
33+
-o, --owner read:org GitHub account organization (requires read:org scope) or user account (requires `n/a` scope)
34+
-r, --repo repo GitHub repository (owner/repo), requires repo scope
35+
--silent Do not print any output (default: "false")
36+
-t, --token string GitHub Personal Access Token (default "gh auth token")
37+
```
38+
39+
### SEE ALSO
40+
41+
* [report](report.md) - gh cli extension to generate reports
42+
43+
###### Auto generated by spf13/cobra on 25-Mar-2023

0 commit comments

Comments
 (0)