Skip to content

Commit

Permalink
rename report to export. (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Duppils authored Nov 19, 2024
1 parent a480c27 commit 560541c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions internal/cmd/report/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ const (
func NewLicenseCmd(reporter report.IReporter) *cobra.Command {
cmd := &cobra.Command{
Use: "license",
Short: "Generate license report",
Long: `Generate license report from a commit hash.
Short: "Generate license export",
Long: `Generate license export from a commit hash.
This is a premium feature. Please visit https://debricked.com/pricing/ for more info.
The finished report will be sent to the specified email address.`,
The finished export will be sent to the specified email address.`,
PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlags(cmd.Flags())
},
RunE: RunE(reporter),
}

cmd.Flags().StringVarP(&email, EmailFlag, "e", "", "The email address that the report will be sent to")
cmd.Flags().StringVarP(&email, EmailFlag, "e", "", "The email address that the export will be sent to")
viper.MustBindEnv(EmailFlag)

cmd.Flags().StringVarP(&commitHash, CommitFlag, "c", "", "commit hash")
Expand All @@ -51,7 +51,7 @@ func RunE(r report.IReporter) func(_ *cobra.Command, args []string) error {
return fmt.Errorf("%s %s\n", color.RedString("⨯"), err.Error())
}

fmt.Printf("%s Successfully ordered license report\n", color.GreenString("✔"))
fmt.Printf("%s Successfully ordered license export\n", color.GreenString("✔"))

return nil
}
Expand Down
8 changes: 4 additions & 4 deletions internal/cmd/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ func NewReportCmd(
sbomReporter sbomReport.Reporter,
) *cobra.Command {
cmd := &cobra.Command{
Use: "report",
Short: "Generate reports",
Long: `Generate reports.
Premium is required for license and vulnerability reports. Enterprise is required for SBOM reports. Please visit https://debricked.com/pricing/ for more info.`,
Use: "export",
Short: "Generate exports for vulnerabilities, licenses, and SBOM.",
Long: `Generate exports.
Premium is required for license and vulnerability exports. Enterprise is required for SBOM exports. Please visit https://debricked.com/pricing/ for more info.`,
PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlags(cmd.Flags())
},
Expand Down
12 changes: 6 additions & 6 deletions internal/cmd/report/sbom/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const FormatFlag = "format"
func NewSBOMCmd(reporter report.IReporter) *cobra.Command {
cmd := &cobra.Command{
Use: "sbom",
Short: "Generate SBOM report",
Long: `Generate SBOM report for chosen commit and repository.
Short: "Generate SBOM export",
Long: `Generate SBOM export for chosen commit and repository.
For an example of the SBOM format see https://github.com/debricked/blog-snippets/blob/main/example-sbom-report/SBOM_2022-12-14.json.
This is an enterprise feature. Please visit https://debricked.com/pricing/ for more info.`,
Expand All @@ -41,18 +41,18 @@ This is an enterprise feature. Please visit https://debricked.com/pricing/ for m
RunE: RunE(reporter),
}

cmd.Flags().StringVarP(&commitId, CommitFlag, "c", "", "The commit that you want an SBOM report for")
cmd.Flags().StringVarP(&commitId, CommitFlag, "c", "", "The commit that you want an SBOM export for")
_ = cmd.MarkFlagRequired(CommitFlag)
viper.MustBindEnv(CommitFlag)

cmd.Flags().StringVarP(&repositoryId, RepositorylFlag, "r", "", "The repository that you want an SBOM report for")
cmd.Flags().StringVarP(&repositoryId, RepositorylFlag, "r", "", "The repository that you want an SBOM export for")
_ = cmd.MarkFlagRequired(RepositorylFlag)
viper.MustBindEnv(RepositorylFlag)

cmd.Flags().StringVarP(&branch, BranchFlag, "b", "", "The branch that you want an SBOM report for")
cmd.Flags().StringVarP(&branch, BranchFlag, "b", "", "The branch that you want an SBOM export for")
viper.MustBindEnv(BranchFlag)

cmd.Flags().StringVarP(&format, FormatFlag, "f", "", `The format that you want the SBOM report in.
cmd.Flags().StringVarP(&format, FormatFlag, "f", "", `The format that you want the SBOM export in.
Supported options are: 'CycloneDX', 'SPDX'`,
)
Expand Down
10 changes: 5 additions & 5 deletions internal/cmd/report/vulnerability/vulnerability.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ const EmailFlag = "email"
func NewVulnerabilityCmd(reporter report.IReporter) *cobra.Command {
cmd := &cobra.Command{
Use: "vulnerability",
Short: "Generate vulnerability report",
Long: `Generate vulnerability report for all your repositories.
Short: "Generate vulnerability export",
Long: `Generate vulnerability export for all your repositories.
This is a premium feature. Please visit https://debricked.com/pricing/ for more info.
The finished report will be sent to the specified email address.`,
The finished export will be sent to the specified email address.`,
PreRun: func(cmd *cobra.Command, _ []string) {
_ = viper.BindPFlags(cmd.Flags())
},
RunE: RunE(reporter),
}

cmd.Flags().StringVarP(&email, EmailFlag, "e", "", "The email address that the report will be sent to")
cmd.Flags().StringVarP(&email, EmailFlag, "e", "", "The email address that the export will be sent to")
_ = cmd.MarkFlagRequired(EmailFlag)
viper.MustBindEnv(EmailFlag)

Expand All @@ -41,7 +41,7 @@ func RunE(r report.IReporter) func(_ *cobra.Command, args []string) error {
return fmt.Errorf("%s %s\n", color.RedString("⨯"), err.Error())
}

fmt.Printf("%s Successfully ordered vulnerability report\n", color.GreenString("✔"))
fmt.Printf("%s Successfully ordered vulnerability export\n", color.GreenString("✔"))

return nil
}
Expand Down

0 comments on commit 560541c

Please sign in to comment.