-target doesn't work with terraform apply when the apply is being run on
a planfile (which is how Atlantis runs plan). We should give the user an
error if they attempt this.
Fixes#399
- Use logger for all warnings. Previously we were writing warnings from
cmd/server.go directly to stderr which bypassed our normal log format.
- Add the timezone to log output. This is just really nice to have if
you're looking at old logs.
- Change levels to all be 4 characters: DBUG, INFO, WARN, EROR. This
makes the logs easier to read because it lines up.
- Log when we first receive the request as well as when we send a
response. This makes it easier to see where the request starts and ends.
Previously, we were just logging when an error happened early in our
comment processing code. However it's possible for us to write comments
on error even at this early stage which will make for a better user
experience.
Fixes#398
If users have created an atlantis.yaml config for a specific directory,
only allow commands for workspaces that have been configured in that
directory. This will help prevent errors when users mis-type a workspace
name.
Detect if the GitLab event is a comment on a commit instead of a merge
request and log a debug message that we don't support this.
Previously, Atlantis would panic if it received this event.
- Need to use the mergeable_state field in GitHub to know if a pull
request is mergeable.
- Add tests.
- Since we updated our vendored go-github library, fix how we were
creating webhooks in testdrive.
Introduce new `mergeable` requirement, in similar vein to the `approved`
requirement. Ran `make go-generate` to update mocks accordingly.
This addresses issue #43.
If projects are configured using an atlantis.yaml with a specific
project name, include that in the output for comments. This is useful
because often the project names are better identifiers than the
directory and workspace names and also because some projects use the
same dir and workspace so the only way to differentiate them is via
their names.
Fixes#353
Prior to this change, we were formatting the output from terraform plan
inside the markdown_renderer. Part of this formatting is to remove all
output relating to refreshing state. The way we were doing this was to
simply delete all lines before the refreshing completes.
The problem with this approach was that any output from custom steps
that ran before plan would also be deleted. This change moves the
formatting of the plan output inside the plan step. Then the
markdown_renderer deals with the pre-formatted output and doesn't need
to delete anything before it combines all the step outputs into one.
On startup, make a call to the /version endpoint of Gitlab to get which
version we're running. Then use that version to determine whether we
should use the markdown folding syntax where the code is expandable.
Versions of Gitlab < 11.1 don't support the "Common Mark" markdown
format.
Fixes https://github.com/runatlantis/atlantis/issues/315