* 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>
We should use `(*regexp.Regexp).MatchString` instead of
`(*regexp.Regexp).Match([]byte(...))` when matching string to avoid
unnecessary `[]byte` conversions and reduce allocations.
Example benchmark:
func BenchmarkMatch(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := branchRegex.Match([]byte("main")); !match {
b.Fail()
}
}
}
func BenchmarkMatchString(b *testing.B) {
for i := 0; i < b.N; i++ {
if match := branchRegex.MatchString("main"); !match {
b.Fail()
}
}
}
goos: linux
goarch: amd64
pkg: github.com/runatlantis/atlantis/server/core/config
cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics
BenchmarkMatch-16 8269699 141.4 ns/op 4 B/op 1 allocs/op
BenchmarkMatchString-16 14298446 95.81 ns/op 0 B/op 0 allocs/op
PASS
ok github.com/runatlantis/atlantis/server/core/config 2.784s
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
* feat: use Atlantis user by default and get rid of gosu
* chore: set `DOCKER_CONTENT_TRUST=1`
* chore: fix chmod and chown
* feat: add a healthcheck to the debian and alpine images
* feat: removing setuid and setgid permissions prevents container privilege escalation and improve comments
* chore: remove setgid/setuid as we chown an entire directory
* chore: keep deps comment generic
* chore: grammar
* chore: remove redundant comment
* chore: rm DOCKER_CONTENT_TRUST
* chore: set uid and gid and remove passwd entry
* chore: revert gid and uid set as it's conflicting
---------
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
* fix(renovate): This fixes renovate to also autoMerge fixes to our release branches so we don't have to cherry-pick them.
* fix(renovate): run config validator on release branches too
* refactor(ci): builds upon work in tests to reduce complexity in requiring workflows
* fix: tweaks and missing outputs
* fix: make sure the new workflows actually run
* fix: consistency with non-required testing image
* add misspell check
* lint: fix misspell issues
```
server/events/vcs/instrumented_client.go:46:26: `soley` is a misspelling of `solely` (misspell)
// methods and implement soley any github specific interfaces.
^
server/events/project_command_context_builder.go:49:5: `Conciously` is a misspelling of `Consciously` (misspell)
// Conciously making this global since it gets flushed periodically anyways
^
server/controllers/events/gitlab_request_parser_validator.go:87:32: `noteable` is a misspelling of `notable` (misspell)
NoteableType string `json:"noteable_type"`
^
server/controllers/events/gitlab_request_parser_validator_test.go:351:6: `noteable` is a misspelling of `notable` (misspell)
"noteable_type": "MergeRequest",
^
server/controllers/events/gitlab_request_parser_validator_test.go:359:6: `noteable` is a misspelling of `notable` (misspell)
"noteable_id": 7,
^
server/controllers/events/gitlab_request_parser_validator_test.go:467:6: `noteable` is a misspelling of `notable` (misspell)
"noteable_type": "Commit",
^
server/controllers/events/gitlab_request_parser_validator_test.go:475:6: `noteable` is a misspelling of `notable` (misspell)
"noteable_id": null,
^
server/events/event_parser_test.go:1012:23: `seperate` is a misspelling of `separate` (misspell)
// If sha changes in seperate PR,
^
```
Signed-off-by: Rui Chen <rui@chenrui.dev>
* add locale setting
Signed-off-by: Rui Chen <rui@chenrui.dev>
* Revert "lint: fix misspell issues"
This reverts commit 7cc56afa8e.
* lint: fix some misspell issues
Signed-off-by: Rui Chen <rui@chenrui.dev>
---------
Signed-off-by: Rui Chen <rui@chenrui.dev>
Co-authored-by: PePe Amengual <jose.amengual@gmail.com>