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

Function githubCmd

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

Source from the content-addressed store, hash-verified

61}
62
63func githubCmd() *cobra.Command {
64 cmd := &cobra.Command{
65 Use: "github",
66 Short: "Link GitHub pull requests to Pad items",
67 Aliases: []string{"gh"},
68 RunE: unknownSubcommandRun,
69 Long: `Link GitHub pull requests to Pad items and view their status.
70
71Requires the GitHub CLI (gh) to be installed: https://cli.github.com/`,
72 Example: ` pad github link TASK-5 # Link current branch's PR to TASK-5
73 pad github link # Auto-detect item ref from branch name
74 pad github status # Show PR status for all linked items
75 pad github status TASK-5 # Show PR status for a specific item
76 pad github unlink TASK-5 # Remove PR link from an item`,
77 }
78
79 cmd.AddCommand(
80 githubLinkCmd(),
81 githubStatusCmd(),
82 githubUnlinkCmd(),
83 )
84
85 return cmd
86}
87
88// getCurrentBranch returns the current git branch name.
89func 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