Commit Graph

124 Commits

Author SHA1 Message Date
Bruno Schaatsbergen
bcd6420db5 revert: "convert gopkg.in/yaml.v3 to goccy/go-yaml (#5579)" (#5683)
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com>
2025-07-30 16:55:35 -07:00
Luke Massa
8639729bd8 chore(deps): Convert go yaml to goccy yaml (#5579)
Signed-off-by: Luke Massa <lmassa@tripadvisor.com>
Co-authored-by: Rui Chen <rui@chenrui.dev>
2025-06-26 20:26:39 +00:00
Leandro López
375b429749 feat: add HTTP pprof endpoints (#5363)
Signed-off-by: Leandro López (inkel) <leandro.lopez@grafana.com>
2025-05-09 09:20:24 -07:00
Joshua Spork
05659b8cdb feat: BitBucket Cloud: add support for webhook secrets (#4275)
Signed-off-by: Joshua Spork <almightyfoon@gmail.com>
2025-01-25 19:03:51 +00:00
Pierre Guinoiseau
90b1b13b71 feat: Add support for GitLab groups (#4001)
Signed-off-by: Pierre Guinoiseau <pierre@guinoiseau.nz>
2025-01-25 18:39:37 +00:00
Piotr Pawluk
46e181e725 feat: add http webhook (#5233)
Signed-off-by: Piotr Pawluk <piotr.pawluk@zendesk.com>
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com>
2025-01-22 19:39:20 -08:00
Luke Massa
5fb6b0be12 chore: Add test to make sure flags are up to date and sorted (#4845)
Signed-off-by: Luke Massa <lukefrederickmassa@gmail.com>
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com>
2025-01-21 21:20:56 -08:00
Andrew Borg
9e0f3d1bb5 feat: Support project-level Terraform distribution selection (#5167)
Signed-off-by: Andrew Borg <andrew.b.borg@gmail.com>
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com>
Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com>
2025-01-02 21:06:01 -08:00
Henry Muru Paenga
74916fbf38 feat: GitHub - Support loading git token from disk (#4928) 2024-11-04 23:14:59 +00:00
bakayolo
841f7b4277 feat: add ignore-vcs-status-names (github only) (#4978)
Signed-off-by: bakayolo <benjamin.apprederisse@gmail.com>
2024-11-04 22:04:13 +00:00
Henry Muru Paenga
9c7e5fcac8 feat: OpenTofu support (#4499)
Co-authored-by: PePe Amengual <2208324+jamengual@users.noreply.github.com>
2024-09-29 18:13:20 -07:00
David Glasser
5a918e382c feat: Add --max-comments-per-command configuration (#3905)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: Benoit Toulme <benoit.toulme@gmail.com>
2024-06-26 23:13:09 -04:00
Brett Delle Grazie
854c287986 fix: add app to the github app installation id (#4650)
Co-authored-by: Rui Chen <rui@chenrui.dev>
2024-06-13 00:02:21 +00:00
john-tipper
82cd0746ee fix: support gh-installation-id flag and fix #4578 #1229 #3545 (#4579)
Co-authored-by: Rui Chen <rui@chenrui.dev>
2024-05-22 14:35:39 -04:00
Martijn van der Kleijn
722c4a9372 feat: Add Gitea support (#4229)
* Add initial Gitea client structure

* Add various missing config flags

* initial gitea support added

* Fix some post-merge issues

* Replace HidePrevCommandComments by version from @florianbeisel

* Update mocks

* feat: add Webhook Signature Verification

This changes adds support for Gitea Webhook Signatures by wrapping the
function from the Gitea SDK and calling it from `handleGiteaPost()`.

* fix: use release version in go.mod

1.22 as in the previous go.mod is a development version. When referencing
a minimum release version the correct format is 1.22.0

* Set default Gitea url to cloud.gitea.com

* Fix and Add tests for Gitea

* Fix missing copyright header

* Changed comment to reflect no max comment length

Apparently there's no max comment length in Gitea at this point in time.

* Implement GetCloneURL()

* Decode Base64 before passing on downloaded file content

* Enable Gitea client as API Client

* Remove unneded comments

* Remove old redundant file

* fix: invalid version number in go.mod

* fix: remove unnecessary type conversions

* fix: removed unused function

* fix: remove unnecessary type conversion of decodedData

* fix: fixes some tests

* Correct gitea.com URL

* Add Gitea to website docs

* fix: TestPost_UnsupportedGiteaEvent

* revert version downgrades

* docs: add Gitea documentation to Guide section

* docs: fix copy paste mistake

* Update cmd/server_test.go

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* Clarify usage msg for --gitea-base-url

* Apply suggestions from code review

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>

* Turn ebreak number into const with comments

* Add --gitea-page-size server argument

Defaults to 30 based on https://docs.gitea.com/1.18/advanced/config-cheat-sheet#api-api

* Fix broken test

* Fix event parser and comment parser

* Add missing app permission to docs

* Make Gitea client conform to updated interface

* Update server/events/vcs/gitea/client.go

Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com>

* Remove no longer needed logger

* Add extra logging statements for Gitea client

* Add debug statements

---------

Co-authored-by: Florian Beisel <florian@pacey.me>
Co-authored-by: Florian Beisel <florian@beisel.it>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: Simon Heather <32168619+X-Guardian@users.noreply.github.com>
2024-03-18 14:21:45 +00:00
Luke Massa
fad38c5ee7 feat: Prevent unused flags (#4182)
* Prevent unused flags

* Better verbiage

* Implementation for preventing unused flags

* Change comments and verbiage
2024-01-29 18:24:55 -05:00
Luke Massa
c8587b31c4 chore: Add missing flag test for DisableGlobalApplyLockFlag (#4183) 2024-01-29 13:30:36 -05:00
Luke Massa
25d800e740 chore: Add flag for SilenceVCSStatusNoProjects (#4179)
* chore: Add flag for SilenceVCSStatusNoProjects

* Add docs

* Fix desc
2024-01-28 17:08:23 +00:00
Luke Massa
34ef59d132 chore: Upgrade yaml v3 (#4172)
* fix(deps): update module gopkg.in/yaml.v2 to v3 in go.mod

* chore: Upgrade to go-yaml v3

* Fix comment

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2024-01-25 13:09:34 -05:00
Luke Massa
6cad7e6482 chore: Remove settings for require approval, mergeable, undiverged (#4047)
* Remove settings for require approval, mergeable, undiverged

* Fix
2023-12-27 16:11:45 +00:00
Luke Massa
a828ee866c Add missing test flags (#4064) 2023-12-17 20:33:25 -08:00
Luke Massa
d643c521ab feat: Remove flag for allow repo config (#3911)
* Remove option to allow repo

* Fix internal test

* Fix fmt

* Fmt

* Fix rebase

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
Co-authored-by: Dylan Page <dylan.page@autodesk.com>
2023-12-12 03:24:38 +00:00
Luke Massa
fb484ad8eb feat: Remove flag for disable apply (#3912)
* Add code for disabling apply flag

* Better comment
2023-12-11 20:29:21 -05:00
Gabriel Martinez
56e38b4151 chore(atlantis): fix linter errors (#3690)
* chore(atlantis): fix linter errors

* fix superfluous-else

* revert gitlab check

* ignore stub funcs on azuredevops_client

* remove fetch-depth

* remove fail_on_error

* fix plan_step_runner_test.go

* more lint fixes

---------

Co-authored-by: Dylan Page <dylan.page@autodesk.com>
2023-12-11 19:02:16 +00:00
jskrill
00aae565b2 feat: add autodiscover enabled feature (#3895)
* add flag to allow the user disable the autodiscover

* add global config and doc

* feat: Implement autodiscover.mode

* fix: Minor doc fixes

* fix: Small fixes to docs/indent/tests

* fix: Line length, quoting, function comments

* fix: Add a few more tests and remove newlines

* fix: Always camel case never snake

---------

Co-authored-by: Marcelo Medeiros <m.medeiros@carepay.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-29 15:43:53 -08:00
Luke Massa
9bc94dee14 feat: remove silence whitelist errors flag (#3923)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-11-09 14:36:35 -08:00
Koen van Zuijlen
786e57c1d6 feat: Added disable-unlock-label config option (#3799)
* Added disable-unlock-label config option

* Fixed tests

* Wrote tests + fixed mistakes

* Added docs

* added defaults to docs

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-10-10 11:02:26 -04:00
Ghais Zaher
80ecc38273 feat: disable autoplan label (#3649)
* feat: disable autoplan label

* documentation

* revert unrelated change

* fix property

* gitlab and github

* dd more test

* small fixes

* add tests for github and gitlab clients

* fix: remove unrelated comments

* fmt

---------

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-09-25 13:43:35 -04:00
Ross Strickland
76c482b83a feat: global repo params (#3379) 2023-07-07 18:33:21 -04:00
Pantelis Karamolegkos
8eb91d0259 Using constants for checkout strategies (#3384)
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2023-06-20 14:52:06 -04:00
Ken Kaizu
da48fb515d chore(test): add no test dir tests, rename testdata dir (#2986)
* add web_templates render tests

* add ansic strip tests

* move fixtures into testdata dir which is golang specific test dir name

* add server/metrics tests

* add recovery test

* add runtime stats test
2023-01-15 23:14:23 -06:00
Ken Kaizu
f09a9d4c01 feat: --allow-commands restricts available atlantis commands (#2877)
* feat: --allow-command configuration restricts available atlantis commands

* add version and approve_policies into allow commands defaults

* allow-commands accept all keyword which allows all commands

* remove redundant nest

* more detail abount allow-commands all keyword

* Update server/events/comment_parser.go
2022-12-27 22:52:39 -06:00
Sebastian Poxhofer
01a9a5f5a7 feat: dismiss approvals when planning (#2696)
* feat: dismiss approvals when planning

* feat: add pagination and move query in separate method

* tests: add test for dismissing

* refactor: fix linting issue

* implement change requests

* Update cmd/server.go

Co-authored-by: PePe Amengual <jose.amengual@gmail.com>

Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2022-12-18 22:31:10 -06:00
Fabiano Soares Honorato
66dc30e755 feat: prevent planning and applying directories outside PR scope using --restrict-file-list (#2440)
* Add --strict-plan-file-list config

* Update server.go

* Update server-configuration.md

* Update server_test.go

* Run gofmt -w

* Add --strict-plan-file-list for projects

* Add --strict-plan-file-list tests

* Change --strict-plan-file-list to --restrict-file-list

* Update --restrict-file-list documentation

* Update --restrict-file-list and --enable-regexp-cmd documentation

Co-authored-by: Fabiano Honorato <fabiano.honorato@ifood.com.br>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
2022-12-09 09:33:40 -06:00
noah
61bcfbab2b feat: auto-plan projects when modules change (#2507)
* feat: auto-plan projects when modules change

Fixes #920

* rename Downstream->Dependent; docs cleanup

* chore: gofmt -s
2022-11-28 14:12:29 -08:00
Ross Strickland
d620d5de98 Add custom templating support (#2647)
* added custom templates support

* made default templates DRY

* Change init to anonymous function.

* Initialize anonymous function inside var

* - Add flag/cfg param for custom template dir
- Add test for custom template

* Add documentation.

* Address PR comments.

Co-authored-by: Ricard Bejarano <ribejara@thousandeyes.com>
2022-11-11 09:56:33 -06:00
Daniel Thompson
ab2cdb833a External Locking DB: Redis (#2491)
* Initial build out of redis backend

* Regenerate locking mocks and matchers

* More test cleanup

* More test fixes

* Added tests for redis

* Test fix

* Linting fix

* Dcos update

* Update redis.go

* Update server.go

* Adding nolint to RedisDB struct
2022-09-07 16:57:06 -07:00
Casper Biering
abb9e41787 fix: Log streaming broken with TFE local execution mode (#2364) 2022-07-12 08:53:55 -07:00
Li Lin
6b0fe76f4e Add --var-file-allowlist in server configuration (#2362) 2022-07-07 10:32:18 -07:00
Nish Krishnan
d1d1539ced feat: Add stats support for basic operations (#2147) 2022-03-18 15:18:13 -07:00
Eng Zer Jun
38cf7b0141 refactor: move from io/ioutil to io and os package (#1843)
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>
2021-10-07 00:37:42 -04:00
Enoch Lo
89236d8e54 Add flag to enable markdown diff formatting (#1751) 2021-08-30 14:01:52 -07:00
David Haven
01b8718509 allow user to pass gh-app-key directly instead of filename (#1706)
* allow user to pass gh-app-key directly instead of filename

* start fixing tests

* fix make test

* update website with info about new flag

* Apply suggestions from code review

Co-authored-by: Roberto Hidalgo <un@rob.mx>

Co-authored-by: Roberto Hidalgo <un@rob.mx>
2021-08-17 22:02:01 -07:00
Gábor Lipták
a4f0e3a467 Bump golangci to 1.39.0 (#1541)
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2021-05-26 21:00:20 -04:00
Brian Zoetewey
f290780b61 feat: Add --autoplan-file-list server flag. (#1475)
* Add `--autoplan-file-list` server flag to allow modifying the list of files that trigger planning.

* Set default value for `--autoplan-file-list` and add `terragrunt.hcl` to the list.

* Default is handled in server now. No need for it here.

* Fix syntax error test.

* Fix e2e tests
2021-04-22 09:48:40 -07:00
Dylan Page
25103d72f4 feat: add new flag --silence-no-projects (#1469)
* feat: add new flag --silence-no-projects

* refactor: add tests, clean up command_runner logic

* fix: attempt at fixing PolicyCheck e2e test

* docs: add silence-no-projects flag to server-configuration.md

* docs: fix grammar

* fix: requested changes: commit status resets, misc fixes

* fix: status check comments to actually reflect their commands

* fix: logic bug in autoplan commit reset

* fix: tests make check-lint errors
2021-04-19 14:52:56 -07:00
Nish Krishnan
7ac8106f8a Add structured logger (#54) (#1467)
This is two changes:

Replacing all usages of SimpleLogger with it's interface SimpleLogging which makes it easier to swap out loggers going forward
Nukes SimpleLogger in favor of StructuredLogger which allows us to better analyze logs in our log management system we choose.
2021-04-06 12:02:25 -07:00
laurent apollis
d2ef2775c8 Support regexp in command builder on the project name (#1419) 2021-03-05 16:13:23 -08:00
Sarvar Muminov
af2a806870 Implement a new policy check workflow (#1317)
* Adding policy_check support into yaml config

* Added policy check model and runtime structs

* Adding BuildPolicyCheckCommand to ProjectCommandBuilder

* Return incorrectly deleted code

* Remove BuildAutoPolicyPlanCommand from ProjectCommandBuilder

* Split runAutoCommand into two functions

runAutoPlanCommand - does what originally RunAutoplancommand was doing
except now it returns CommandResult and []models.ProjectCommandContext
runAutoPolicyCheckCommand - accepts CommandContext, CommandResult, and
[]models.ProjectCommandContext as arguments and runs PolicyCheckStep runner

* Refactor RunCommentCommand
* Remove BuildPolicyCheckCommand and rename StepCmdExec back to TerraformExec
* Add policy step runner logic and conftest interfaces.
* Add show step runner to policy check stage.

* Adding models.PolicyCheckCommand to buildCtx

This also means buildPlanAllCommands call buildCtx twice once with
models.PlanCommand and once with models.PolicyCheckCommand

* Adding new project_command_builder that supports policy_check

* Refactoring PolicyCheck specific logic into a PolicyCheckProjectCommandBuilder

* Moving events.CommandContext to models.CommandContext this will allow me
to remove buildCtx method and move ProjectCommandContext creation into
models package

* Policy Owners might be different types, for that reason we are
refactoring Owners into its own struct with specific keys defining
different owner types

Co-authored-by: Nish Krishnan <nishk@lyft.com>
Co-authored-by: Nish Krishnan <nishkrishnan@users.noreply.github.com>
2021-02-10 18:13:44 -08:00
Gerald Barker
1137a82c60 Add the ability to disable Atlantis locking a repo (#1340)
* Add the ability to disable Atlantis locking a repo

* Fix incorrect logic when creating locking Client

Co-authored-by: kbaldyga <kbaldyga@gmail.com>

* Add tests for noOpLocker to improve coverage

Co-authored-by: Gerald Barker <geraldbarker@mail.com>
Co-authored-by: kbaldyga <kbaldyga@gmail.com>
2021-01-14 10:20:27 -05:00