MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / githubCmd

Function githubCmd

cmd/pad/cmd_github.go:34–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34func githubCmd() *cobra.Command {
35 cmd := &cobra.Command{
36 Use: "github",
37 Short: "Link GitHub pull requests to Pad items",
38 Aliases: []string{"gh"},
39 RunE: unknownSubcommandRun,
40 Long: `Link GitHub pull requests to Pad items and view their status.
41
42Requires the GitHub CLI (gh) to be installed: https://cli.github.com/
43
44Examples:
45 pad github link TASK-5 # Link current branch's PR to TASK-5
46 pad github link # Auto-detect item ref from branch name
47 pad github status # Show PR status for all linked items
48 pad github status TASK-5 # Show PR status for a specific item
49 pad github unlink TASK-5 # Remove PR link from an item`,
50 }
51
52 cmd.AddCommand(
53 githubLinkCmd(),
54 githubStatusCmd(),
55 githubUnlinkCmd(),
56 )
57
58 return cmd
59}
60
61// getCurrentBranch returns the current git branch name.
62func getCurrentBranch() (string, error) {

Callers 1

newRootCmdFunction · 0.85

Calls 3

githubLinkCmdFunction · 0.85
githubStatusCmdFunction · 0.85
githubUnlinkCmdFunction · 0.85

Tested by

no test coverage detected