Skip to content

Commit

Permalink
Remove unused autoplan param.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkysow committed Jul 16, 2018
1 parent 39c3f7e commit 84078dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion server/events/command_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (c *DefaultCommandRunner) updatePull(ctx *CommandContext, command CommandIn
if err := c.CommitStatusUpdater.UpdateProjectResult(ctx, command.CommandName(), res); err != nil {
ctx.Log.Warn("unable to update commit status: %s", err)
}
comment := c.MarkdownRenderer.Render(res, command.CommandName(), ctx.Log.History.String(), command.IsVerbose(), command.IsAutoplan())
comment := c.MarkdownRenderer.Render(res, command.CommandName(), ctx.Log.History.String(), command.IsVerbose())
c.VCSClient.CreateComment(ctx.BaseRepo, ctx.Pull.Num, comment) // nolint: errcheck
}

Expand Down
2 changes: 1 addition & 1 deletion server/events/markdown_renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type ProjectResultTmplData struct {

// Render formats the data into a markdown string.
// nolint: interfacer
func (m *MarkdownRenderer) Render(res CommandResult, cmdName CommandName, log string, verbose bool, autoplan bool) string {
func (m *MarkdownRenderer) Render(res CommandResult, cmdName CommandName, log string, verbose bool) string {
commandStr := strings.Title(cmdName.String())
common := CommonData{commandStr, verbose, log}
if res.Error != nil {
Expand Down
8 changes: 4 additions & 4 deletions server/events/markdown_renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestRenderErr(t *testing.T) {
}
for _, verbose := range []bool{true, false} {
t.Log("testing " + c.Description)
s := r.Render(res, c.Command, "log", verbose, false)
s := r.Render(res, c.Command, "log", verbose)
if !verbose {
Equals(t, c.Expected, s)
} else {
Expand Down Expand Up @@ -91,7 +91,7 @@ func TestRenderFailure(t *testing.T) {
}
for _, verbose := range []bool{true, false} {
t.Log("testing " + c.Description)
s := r.Render(res, c.Command, "log", verbose, false)
s := r.Render(res, c.Command, "log", verbose)
if !verbose {
Equals(t, c.Expected, s)
} else {
Expand All @@ -109,7 +109,7 @@ func TestRenderErrAndFailure(t *testing.T) {
Error: errors.New("error"),
Failure: "failure",
}
s := r.Render(res, events.Plan, "", false, false)
s := r.Render(res, events.Plan, "", false)
Equals(t, "**Plan Error**\n```\nerror\n```\n\n", s)
}

Expand Down Expand Up @@ -302,7 +302,7 @@ func TestRenderProjectResults(t *testing.T) {
}
for _, verbose := range []bool{true, false} {
t.Run(c.Description, func(t *testing.T) {
s := r.Render(res, c.Command, "log", verbose, false)
s := r.Render(res, c.Command, "log", verbose)
if !verbose {
Equals(t, c.Expected, s)
} else {
Expand Down

0 comments on commit 84078dc

Please sign in to comment.