Documentation
¶
Overview ¶
Package prcommand parses /levelrail commands out of a pull request comment.
Index ¶
Constants ¶
View Source
const Prefix = "/levelrail"
Prefix starts every command line.
Variables ¶
View Source
var ErrMultiple = errors.New("prcommand: more than one command in the comment")
ErrMultiple means the comment holds more than one command line. Acting on one of several would be a guess, so none runs.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command string
Command is one accepted command.
const ( Redeploy Command = "redeploy" Rollback Command = "rollback" Status Command = "status" PreviewRedeploy Command = "preview redeploy" )
The accepted commands. Nothing else parses.
func Parse ¶
Parse returns the single command in body, or "" when there is none. A command is a line that starts with the prefix at column zero, outside fenced code, with nothing after the verb. Quoted replies, indented code and prose mentions never match. Unknown verbs and trailing text are ignored.
Click to show internal directories.
Click to hide internal directories.