mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-31 19:18:42 +00:00
- Refactor EventParser so it returns a comment we can send to the pull request when a bad command or help command is commented. - Remove now unneeded HelpExecutor because we comment right from the EventsController now - Use pflag package to parse commands instead of doing it manually - Comment back when user types terraform instead of atlantis
22 lines
350 B
Go
22 lines
350 B
Go
package events
|
|
|
|
// CommandName is the type of command.
|
|
type CommandName int
|
|
|
|
const (
|
|
Apply CommandName = iota
|
|
Plan
|
|
// Adding more? Don't forget to update String() below
|
|
)
|
|
|
|
// String returns the string representation of c.
|
|
func (c CommandName) String() string {
|
|
switch c {
|
|
case Apply:
|
|
return "apply"
|
|
case Plan:
|
|
return "plan"
|
|
}
|
|
return ""
|
|
}
|