From 2be3de6047351d62e2c51b2023c8151094260987 Mon Sep 17 00:00:00 2001 From: Meredith Lancaster Date: Tue, 13 Feb 2024 14:04:52 -0700 Subject: [PATCH] update args passed to the attestation cmd Signed-off-by: Meredith Lancaster --- pkg/cmd/attestation/root.go | 15 ++++----------- pkg/cmd/root/root.go | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/pkg/cmd/attestation/root.go b/pkg/cmd/attestation/root.go index f24194910..0ba61cd56 100644 --- a/pkg/cmd/attestation/root.go +++ b/pkg/cmd/attestation/root.go @@ -3,25 +3,18 @@ package attestation import ( "github.com/github/gh-attestation/cmd/app" - "github.com/cli/cli/v2/pkg/cmdutil" + "github.com/cli/cli/v2/pkg/iostreams" "github.com/spf13/cobra" ) -func NewCmdAttestation(f *cmdutil.Factory) *cobra.Command { +func NewCmdAttestation(io *iostreams.IOStreams, version, buildDate string) *cobra.Command { root := &cobra.Command{ Use: "attestation", Short: "attestations", - // Aliases: []string{"cs"}, - // GroupID: "core", } - version := "test" - date := "test" - shortSHA := "test" - - root.AddCommand(app.NewDownloadCmd(version, date)) - root.AddCommand(app.NewVerifyCmd(version, date)) - root.AddCommand(app.NewVersionCmd(version, date, shortSHA)) + root.AddCommand(app.NewDownloadCmd(version, buildDate)) + root.AddCommand(app.NewVerifyCmd(version, buildDate)) root.AddCommand(app.NewTUFRootVerifyCmd()) return root diff --git a/pkg/cmd/root/root.go b/pkg/cmd/root/root.go index b9600145f..b97dc09f0 100644 --- a/pkg/cmd/root/root.go +++ b/pkg/cmd/root/root.go @@ -125,7 +125,7 @@ func NewCmdRoot(f *cmdutil.Factory, version, buildDate string) (*cobra.Command, cmd.AddCommand(actionsCmd.NewCmdActions(f)) cmd.AddCommand(aliasCmd.NewCmdAlias(f)) cmd.AddCommand(authCmd.NewCmdAuth(f)) - cmd.AddCommand(attestationCmd.NewCmdAttestation(f)) + cmd.AddCommand(attestationCmd.NewCmdAttestation(f.IOStreams, version, buildDate)) cmd.AddCommand(configCmd.NewCmdConfig(f)) cmd.AddCommand(creditsCmd.NewCmdCredits(f, nil)) cmd.AddCommand(gistCmd.NewCmdGist(f))