MCPcopy Create free account
hub / github.com/alibaba/open-code-review / addDiffFlags

Function addDiffFlags

cmd/opencodereview/shared_flags.go:23–27  ·  view source on GitHub ↗
(cmd *cobra.Command, from, to, commit *string)

Source from the content-addressed store, hash-verified

21}
22
23func addDiffFlags(cmd *cobra.Command, from, to, commit *string) {
24 cmd.Flags().StringVar(from, "from", "", "source ref to start diff from (e.g., 'main')")
25 cmd.Flags().StringVar(to, "to", "", "target ref to end diff at (e.g., 'feature-branch')")
26 cmd.Flags().StringVarP(commit, "commit", "c", "", "single commit hash or tag to review (vs its parent)")
27}
28
29func addBackgroundFlags(cmd *cobra.Command, background, backgroundFile *string) {
30 cmd.Flags().StringVarP(background, "background", "b", "", "optional requirement/business context for the review")

Callers 2

registerReviewFlagsFunction · 0.85
registerDelegateFlagsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected