* 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>
* 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>
* 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
* 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
* 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
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>
* 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>
* 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
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.
* 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>