MCPcopy Create free account
hub / github.com/urfave/cli / SetMkdocsRemoteActionFunc

Function SetMkdocsRemoteActionFunc

scripts/build.go:611–630  ·  view source on GitHub ↗
(ctx context.Context, cmd *cli.Command)

Source from the content-addressed store, hash-verified

609}
610
611func SetMkdocsRemoteActionFunc(ctx context.Context, cmd *cli.Command) error {
612 ghToken := strings.TrimSpace(cmd.String("github-token"))
613 if ghToken == "" {
614 return errors.New("empty github token")
615 }
616
617 if err := os.Chdir(cmd.String("top-dir")); err != nil {
618 return err
619 }
620
621 if err := runCmd(ctx, "git", "remote", "rm", "origin"); err != nil {
622 return err
623 }
624
625 return runCmd(
626 ctx,
627 "git", "remote", "add", "origin",
628 fmt.Sprintf("https://x-access-token:%[1]s@github.com/urfave/cli.git", ghToken),
629 )
630}
631
632func LintActionFunc(ctx context.Context, cmd *cli.Command) error {
633 topDir := cmd.String("top-dir")

Callers

nothing calls this directly

Calls 2

runCmdFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…