* fix(deps): update module github.com/petergtz/pegomock/v3 to v4 in go.mod
* remove pegomock generate m option, which is not support after v4
* make regen-mocks
* replace pegomock v4 primitive eq/matchers
* convert pegomock v4 Eq/Any matchers
* remove custom models.Repo matcher
* pegomock v4 cannot use result method args
ref https://github.com/petergtz/pegomock/issues/123
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* whitespace fixes
* Only re-clone on upstream updates just before planning
When using the merge checkout strategy, we would peviously
re-clone on upstream updates on any call to Clone(), for example
when running workflow hooks or runing import commands.
If we had already ran a plan, and master was updated, this
would delete the plan and apply would not have anything to
apply.
Modified to only re-clone on upstream updates in doPlan()
* Apply suggestions from code review
---------
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* Capture stats in plan changes regexp
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
* Add PlanSuccessStats model to hold plan stats
This will be useful to pass down to the templates to include
additional information when formatting the messages emitted by Atlantis.
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
* Return stats for a PlanSuccess
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
* Add plan success stats to template data
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
* Refactor plan success template data creation
DRY. Also highlights a bug where the stats should be a field in
planSuccessData in order to be accessible from the templates.
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
* Move plan stats to planSuccessData struct
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
---------
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* feat: when using order group, abort plan/apply if any fail
* feat: add 'abort_on_execution_order_fail' flag on repo level
* feat: use runProjectCmdsParallelGroups in version_command_runner
* chore: add plan tests
---------
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
* fix: Previous implementation tried to do comment parsing inside github, and only worked for 'atlantis' command.
This commit improves on that to make it possible to implement reactions in other VCS providers and also reuse the existing comment parsing.
* test: Add negative test to confirm reactions are not added for invalid comments
* test: Add a negative test to confirm invalid commands do not get a reaction
* Basic case insensitive for pr comments.
* Add test for uppercase/lowercase case.
* Merge test functions that check similar behaviors.
---------
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
* feat: Basic implementation of github reactions on PRs
Adds eyes whenever it detects an `atlantis` command.
* feat: Make the emoji reaction configurable
* tests: Add a mocked test for EmojiReaction being called in github
* ci: Disable revive linter for stubs
Reverts "fix(github): branch protection not supported (#3276)"
Reverts "fix: allow Require Linear History when selecting merge method (#3211)"
Closes#3320
* Modify the automere commit message to include the PR number [DEVOPS-674]
* Update server/events/vcs/common/common.go
Co-authored-by: Ken Kaizu <k.kaizu38@gmail.com>
* added test for PR message func [DEVOPS-674]
---------
Co-authored-by: Ken Kaizu <k.kaizu38@gmail.com>