Skip to content

Commit eeb35cd

Browse files
committed
fix: webhook 参数传错了
1 parent 88233f6 commit eeb35cd

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

cmd/murphy/internal/common/webhook_mode.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ func (w *WebhookModeFlag) IsSimple() bool {
1717

1818
func (w *WebhookModeFlag) String() string {
1919
if w.simple {
20-
return "webhook_mode:simple"
20+
return "simple"
2121
}
22-
return "webhook_mode:full"
22+
return "full"
2323
}
2424

2525
func (w *WebhookModeFlag) Set(s string) error {

cmd/murphy/internal/scan/cmd.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ func Cmd() *cobra.Command {
5555
c.Flags().StringVar(&privateSourceName, "maven-setting-name", "", "specify the name of the Maven settings.xml file used during the scan")
5656
c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project")
5757
c.Flags().IntVarP(&concurrentNumber, "max-concurrent-uploads", "j", 1, "Set the maximum number of parallel uploads.")
58-
c.Flags().StringVar(&webhookAddr, "webhook-addr", "", "Specify the webhook address")
59-
c.Flags().Var(&webhookMode, "webhook-mode", "Specify the webhook mode, currently supports: simple, full(default)")
60-
c.Flags().StringVar(&extraData, "extra-data", "", "Specify the extra data")
58+
c.Flags().StringVar(&webhookAddr, "webhook-addr", "", "specify the webhook address")
59+
c.Flags().Var(&webhookMode, "webhook-mode", "specify the webhook mode, currently supports: simple, full")
60+
c.Flags().StringVar(&extraData, "extra-data", "", "specify the extra data")
6161
return &c
6262
}
6363

@@ -75,10 +75,10 @@ func DfCmd() *cobra.Command {
7575
c.Flags().BoolVar(&onlyTaskId, "only-task-id", false, "print task id after task created, the scan result will not be printed")
7676
c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project")
7777
c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "Specify the SBOM output file path, use \"-\" to output to stdout")
78-
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: msdx1.1+json")
79-
c.Flags().StringVar(&webhookAddr, "webhook-addr", "", "Specify the webhook address")
80-
c.Flags().Var(&webhookMode, "webhook-mode", "Specify the webhook mode, currently supports: simple, full(default)")
81-
c.Flags().StringVar(&extraData, "extra-data", "", "Specify the extra data")
78+
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) specify the SBOM format, currently supports: msdx1.1+json")
79+
c.Flags().StringVar(&webhookAddr, "webhook-addr", "", "specify the webhook address")
80+
c.Flags().Var(&webhookMode, "webhook-mode", "specify the webhook mode, currently supports: simple, full(default)")
81+
c.Flags().StringVar(&extraData, "extra-data", "", "specify the extra data")
8282
return &c
8383
}
8484

@@ -92,10 +92,10 @@ func EnvCmd() *cobra.Command {
9292
c.Flags().BoolVar(&onlyTaskId, "only-task-id", false, "print task id after task created, the scan result will not be printed")
9393
c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project")
9494
c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "Specify the SBOM output file path, use \"-\" to output to stdout")
95-
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: msdx1.1+json")
96-
c.Flags().StringVar(&webhookAddr, "webhook-addr", "", "Specify the webhook address")
97-
c.Flags().Var(&webhookMode, "webhook-mode", "Specify the webhook mode, currently supports: simple, full(default)")
98-
c.Flags().StringVar(&extraData, "extra-data", "", "Specify the extra data")
95+
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) specify the SBOM format, currently supports: msdx1.1+json")
96+
c.Flags().StringVar(&webhookAddr, "webhook-addr", "", "specify the webhook address")
97+
c.Flags().Var(&webhookMode, "webhook-mode", "specify the webhook mode, currently supports: simple, full(default)")
98+
c.Flags().StringVar(&extraData, "extra-data", "", "specify the extra data")
9999
return &c
100100
}
101101

0 commit comments

Comments
 (0)