-
Notifications
You must be signed in to change notification settings - Fork 34
feat: require project name on workflow management #1378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
if workflowName == "" { | ||
return errors.New("workflow name is required, set it via --name flag") | ||
return errors.New("workflow name is required, set it via --workflow flag") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got some feedback from @juamedgod that --name
was confusing since it seemed the name of the attestation itself.
So I have changed it to workflow
while keeping the existing --name
as deprecated
cmd.Flags().StringVar(&workflowName, "name", "", "name of the workflow to run the attestation") | ||
|
||
cobra.CheckErr(cmd.Flags().MarkDeprecated("name", "please use --workflow instead")) | ||
cmd.Flags().StringVar(&projectName, "project", "", "name of the project of this workflow") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
project is not yet fully enforced in the attestation init
@@ -38,5 +38,8 @@ func newWorkflowDeleteCmd() *cobra.Command { | |||
cmd.Flags().StringVar(&name, "name", "", "workflow name") | |||
cobra.CheckErr(cmd.MarkFlagRequired("name")) | |||
|
|||
cmd.Flags().StringVar(&projectName, "project", "", "project name") | |||
cobra.CheckErr(cmd.MarkFlagRequired("project")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it is in the rest of the APIs.
Signed-off-by: Miguel Martinez <[email protected]>
Signed-off-by: Miguel Martinez <[email protected]>
Signed-off-by: Miguel Martinez <[email protected]>
b3cb901
to
7740cfa
Compare
Signed-off-by: Miguel Martinez <[email protected]>
Signed-off-by: Miguel Martinez <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
gt.AppendRow(table.Row{"Name", meta.Name}) | ||
gt.AppendRow(table.Row{"Team", meta.Team}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we removing team
in the future?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, but I see no value in showing it, not sure
This is the first step towards #1375 it
attestation init
with an optional--project
flag so we can cut a release and prepare our clients (and dagger module) for a switch.