-
Notifications
You must be signed in to change notification settings - Fork 41
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
| PreRunE: func(cmd *cobra.Command, _ []string) error { | ||
| 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
| 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 <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
b3cb901 to
7740cfa
Compare
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
Signed-off-by: Miguel Martinez <miguel@chainloop.dev>
javirln
left a comment
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{"Attestation ID", status.AttestationID}) | ||
| gt.AppendRow(table.Row{"Organization", meta.Organization}) | ||
| 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 initwith an optional--projectflag so we can cut a release and prepare our clients (and dagger module) for a switch.