MCPcopy Index your code
hub / github.com/git-bug/git-bug / newBridgePullCommand

Function newBridgePullCommand

commands/bridge/bridge_pull.go:26–47  ·  view source on GitHub ↗
(env *execenv.Env)

Source from the content-addressed store, hash-verified

24}
25
26func newBridgePullCommand(env *execenv.Env) *cobra.Command {
27 options := bridgePullOptions{}
28
29 cmd := &cobra.Command{
30 Use: "pull [NAME]",
31 Short: "Pull updates from a remote bug tracker",
32 PreRunE: execenv.LoadBackend(env),
33 RunE: execenv.CloseBackend(env, func(cmd *cobra.Command, args []string) error {
34 return runBridgePull(env, options, args)
35 }),
36 Args: cobra.MaximumNArgs(1),
37 ValidArgsFunction: completion.Bridge(env),
38 }
39
40 flags := cmd.Flags()
41 flags.SortFlags = false
42
43 flags.BoolVarP(&options.noResume, "no-resume", "n", false, "force importing all bugs")
44 flags.StringVarP(&options.importSince, "since", "s", "", "import only bugs updated after the given date (ex: \"200h\" or \"june 2 2019\")")
45
46 return cmd
47}
48
49func runBridgePull(env *execenv.Env, opts bridgePullOptions, args []string) error {
50 if opts.noResume && opts.importSince != "" {

Callers 1

NewBridgeCommandFunction · 0.85

Calls 4

LoadBackendFunction · 0.92
CloseBackendFunction · 0.92
BridgeFunction · 0.92
runBridgePullFunction · 0.85

Tested by

no test coverage detected