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
Allow setting copyright header file for generated completions #40023
Allow setting copyright header file for generated completions #40023
Conversation
@@ -103,6 +104,7 @@ func NewCmdCompletion(f cmdutil.Factory, out io.Writer) *cobra.Command { | |||
}, | |||
ValidArgs: shells, | |||
} | |||
cmd.Flags().String("boiler-plate", "", "The name of the copyright header file, defaults to hardcoded header value.") |
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.
a bit odd to have this parameter here. Would have expected some way to change the boilerplate per command such that downstream like oc can customize that.
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.
Odd because this feels like the user can choose the licence himself (I know the actual use-case to export completions and check them in for origin; but kubectl completion is also a user-facing command).
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.
Fair argument, lemme see how can I address that.
Jenkins verification failed for commit edbbe0a. Full PR test history. cc @soltysh The magic incantation to run this job again is Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
edbbe0a
to
56147c5
Compare
@sttts is this approach more to your liking? |
@soltysh much better. lgtm |
/lgtm |
Automatic merge from submit-queue (batch tested with PRs 39446, 40023, 36853) |
This PR allows downstream vendors (like openshift) to generate completions with custom header, similarly to other generated code.
@fabianofranz ptal
@kubernetes/sig-cli-misc fyi