MCPcopy Create free account
hub / github.com/basecamp/hey-cli / newReplyCommand

Function newReplyCommand

internal/cmd/reply.go:19–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19func newReplyCommand() *replyCommand {
20 replyCommand := &replyCommand{}
21 replyCommand.cmd = &cobra.Command{
22 Use: "reply <thread-id>",
23 Short: "Reply to a thread",
24 Annotations: map[string]string{
25 "agent_notes": "Replies to the latest entry in a thread. Accepts message via -m, stdin, or $EDITOR.",
26 },
27 Example: ` hey reply 12345 -m "Thanks!"
28 echo "Detailed reply" | hey reply 12345`,
29 RunE: replyCommand.run,
30 Args: usageExactOneArg(),
31 }
32
33 replyCommand.cmd.Flags().StringVarP(&replyCommand.message, "message", "m", "", "Reply message (or opens $EDITOR)")
34
35 return replyCommand
36}
37
38func (c *replyCommand) run(cmd *cobra.Command, args []string) error {
39 if err := requireAuth(); err != nil {

Callers 1

newRootCmdFunction · 0.85

Calls 1

usageExactOneArgFunction · 0.85

Tested by

no test coverage detected