The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
* Add support for deleting a branch on merge in BitBucket Server
* Add support for deleting a branch on merge in BitBucket Server
* Making linter happy although the code would fall through and return err anyway.
* Add client_test for deleting source branch
* Added err check
Co-authored-by: Wendell Beckwith <wendell.beckwith@redfin.com>
Previously we were stripping the basepath from the passed in URL. i.e.
if I passed in --bitbucket-base-url=https://me.com/basepath then we
would just strip off /basepath.
This change fixes that bug (#508).
Features:
- remote plans and applies will set a commit status with a link to the
Terraform Enterpise UI where the streaming output can be viewed.
- because remote plans don't support the -out flag, we diff the plan
output between plan and apply phases to ensure users are applying the
plan they expected
How:
We add a new capability to execute a terraform command while
concurrently reading its real-time output and performing actions
accordingly.
This is needed so we can set different commit statuses for plan and
apply phases.
Also, append os env variables to git commands during cloning. This fixed
a bug when running tests where I got an error because git couldn't expand
'~' from its git config to my home directory because the HOME env var
wasn't set.
Automerging merges pull requests automatically if all plans have been
successfully applied.
* Save status of PR's to BoltDB so after each apply, we can check if
there are pending plans.
* Add new feature where we delete successful plans *unless* all plans
have succeeded *if* automerge is enabled. This was requested by users
because when automerge is enabled, they want to enforce that a pull
request's changes have been fully applied. They asked that plans not be
allowed to be applied "piecemeal" and instead, all plans must be
generated successfully prior to allowing any plans to be applied.
Implement the change from the previous commit for GitLab and Bitbucket
Server/Cloud. Test the change for GitHub.
If a file is moved, we want to run plan in the directory it is moved to
*and* the directory it was moved from.
Introduce new `mergeable` requirement, in similar vein to the `approved`
requirement. Ran `make go-generate` to update mocks accordingly.
This addresses issue #43.