Files
atlantis/server/help_executor.go
Luke Kysow 57e18399d7 Delete plan on successful apply (#46)
* Return locks when they're deleted

* Implement DeletePlan and DeletePlanByPull

* Clean up data from pull request on close

* Delete plan on successful apply
2017-06-25 10:11:51 -07:00

38 lines
978 B
Go

package server
import "github.com/spf13/viper"
type HelpExecutor struct{}
var helpComment = "```cmake\n" +
`atlantis - Terraform collaboration tool that enables you to collaborate on infrastructure
safely and securely. (v` + viper.GetString("version") + `)
Usage: atlantis <command> [environment] [--verbose]
Commands:
plan Runs 'terraform plan' on the files changed in the pull request
apply Runs 'terraform apply' using the plans generated by 'atlantis plan'
help Get help
Examples:
# Generates a plan for staging environment
atlantis plan staging
# Generates a plan for a standalone terraform project
atlantis plan
# Applies a plan for staging environment
atlantis apply staging
# Applies a plan for a standalone terraform project
atlantis apply
`
func (h *HelpExecutor) execute(ctx *CommandContext, github *GithubClient) {
ctx.Log.Info("generating help comment....")
github.CreateComment(ctx.Repo, ctx.Pull, helpComment)
return
}