Adam Kafka
f5d92c60b5
fix: Prevent panics when logging HTTP response status in github and gitlab client ( #4082 )
...
Fix potential nil pointers. See https://github.com/runatlantis/atlantis/issues/4081 for context.
2023-12-22 11:36:04 -05:00
renovate[bot]
d93f85a0c3
fix(deps): update module github.com/google/go-github/v54 to v57 in go.mod (main) ( #4032 )
...
* fix(deps): update module github.com/google/go-github/v54 to v57 in go.mod
* fix(deps): go-github v57 in server/events/vcs/testdata/fixtures.go
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
2023-12-12 00:21:42 +00: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
Simon Heather
edc9bd9262
feat: Improve GitHub and GitLab Debug Logging ( #3876 )
...
* Improve GitHub and GitLab Debug Logging
* Fix formatting
* Fix g.client.Repositories.Get debug message
* Update gitlab_client_test with logger
---------
Co-authored-by: PePe Amengual <jose.amengual@gmail.com >
2023-10-20 08:49:57 -07: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
Luke Massa
70c9f17007
Revert "fix(deps): update module github.com/google/go-github/v54 to v55 in go.mod ( #3743 )" ( #3748 )
...
This reverts commit 3a2a244272 .
2023-09-06 21:15:56 -07:00
renovate[bot]
3a2a244272
fix(deps): update module github.com/google/go-github/v54 to v55 in go.mod ( #3743 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 21:12:07 +00:00
renovate[bot]
55e24fbbf5
fix(deps): update module github.com/google/go-github/v53 to v54 in go.mod ( #3676 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-17 00:41:13 +00:00
Artur Rodrigues
049c146b2c
fix(github): prevent null pointer dereferencing when using AllowMergeableBypassApply with no required checks on branch protection ( #3672 )
...
* Implement test for allow mergeable bypass apply with no branch protection checks
* Report true combined status if no branch protection required status checks
* Remove warning on feature flag utilization
2023-08-15 10:11:37 -07:00
Torben Tretau
62271955de
fix(github): Mergeable requirement for fork PRs ( #3620 )
...
While using a PR from a fork and the "Github allow mergeable bypass apply" flag, the mergeable checks were run with the wrong owner in the request, leading to 404. By choosing the owner from the head repo data it should work both, for fork PRs and in-repo PRs.
Co-authored-by: Dylan Page <dylan.page@autodesk.com >
2023-08-01 02:25:31 +00:00
Simon Heather
86607d8aeb
feat: Add GitLab Reaction Emojis on MR Comments ( #3456 )
...
* Add GitLab Reaction Emoji
* Update docs
* update docs
* Update event_parser_test
2023-06-12 22:27:42 -05:00
renovate[bot]
1d91dfb083
fix(deps): update module github.com/google/go-github/v52 to v53 in go.mod ( #3495 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-07 03:41:38 +00:00
renovate[bot]
cc2d0c16e3
fix(deps): update module github.com/google/go-github/v51 to v52 in go.mod ( #3346 )
...
* fix(deps): update module github.com/google/go-github/v51 to v52 in go.mod
* Update fixtures.go
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
2023-04-30 03:07:33 +00:00
Marcus Ramberg
f8b293ada0
feat: Github reaction emojis on PR comments ( #2706 )
...
* 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
2023-04-25 17:22:51 -04:00
Dylan Page
34ad9e901d
fix: revert branch protection feature causing breaking change
...
Reverts "fix(github): branch protection not supported (#3276 )"
Reverts "fix: allow Require Linear History when selecting merge method (#3211 )"
Closes #3320
2023-04-11 16:48:39 -04:00
renovate[bot]
763f017169
fix(deps): update module github.com/google/go-github/v50 to v51 in go.mod ( #3316 )
...
* fix(deps): update module github.com/google/go-github/v50 to v51 in go.mod
* Update fixtures.go
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
2023-04-11 00:36:40 -05:00
Tymofii Polekhin
ebc06c19c6
fix(github): branch protection not supported ( #3276 )
...
* fix: github branch protection not supported
* fix: typo protectionAvailable
2023-03-30 11:32:59 -05:00
Tymofii Polekhin
7a33828227
fix: allow Require Linear History when selecting merge method ( #3211 )
...
* fix: account for Require Linear History when selecting merge method
* fix logic and add tests
* add nolint hints for w.Write
---------
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
2023-03-18 17:43:11 -05:00
Ken Kaizu
acc8ef6abc
fix(deps): update module github.com/google/go-github/v49 to v50 ( #3074 )
2023-01-30 22:25:56 -06:00
renovate[bot]
fbdd0c729a
fix(deps): update module github.com/google/go-github/v48 to v49 ( #2928 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-05 00:22:37 -05:00
nitrocode
b94575ac88
Use go-github v48 ( #2839 )
2022-12-20 10:38:21 -06:00
Ken Kaizu
08e9c5a17e
feat: customize atlantis.yaml file name in server side config ( #2798 )
...
* feat: customize atlantis.yaml file name in server side config
* Update server/events/vcs/bitbucketcloud/client.go
* Update server/events/vcs/bitbucketserver/client.go
* Update server/events/vcs/not_configured_vcs_client.go
* Update server/events/vcs/azuredevops_client.go
* docs: repo_config_file multiple atlantis servers usecase example
* docs: multiple atlantis server usage which show how to call one atlantis server
* Update runatlantis.io/docs/server-side-repo-config.md
* Apply suggestions from code review
* Update runatlantis.io/docs/server-side-repo-config.md
Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com >
2022-12-18 23:02:38 -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
nitrocode
629e688b0c
Allow --gh-team-allowlist to work with team names and slugs ( #2719 )
...
* Add team slugs
* Expand test to include both names and slugs
* docs: add version document of flag before/after
* docs: this will be merged for next release
2022-11-25 12:47:49 -06:00
Stas Ostrovskyi
b8297bb1f8
fix: Set mergeable correctly when branch protection doesn't require reviewers ( #2470 )
...
* Allow no required reviewers
* Fix comment in tests
Co-authored-by: Stas Ostrovskyi <stasostrovskyi@users.noreply.github.com >
2022-09-08 13:54:50 -07:00
Yurii Soldak
9f31e49be8
Use single github v4 client ( #2480 )
2022-09-08 06:04:35 -07:00
Yurii Soldak
a4a49bf46f
Use proper http client for github v4 api ( #2479 )
...
* Use proper http client for github v4 api
* Remove extra print lines
Co-authored-by: Ray Terrill <rayterrill@users.noreply.github.com >
2022-09-07 16:51:23 -07:00
Ray Terrill
89d33a0737
Make required atlantis/apply status check work with mergeable ( #2436 )
...
* Make required apply work with mergeable
* Fix lint hint
* Migrate mergeable approval check to graphql, update tests
* Adding support for check suites
* Adding feature flag protection for new functionality
* Fix linting falsepos
* Adjusted logic to handle required check runs, added doc
2022-08-18 09:46:50 -07:00
Rémi Lapeyre
b409cb8470
Add the /plan and /apply endpoints ( #997 )
...
* Add the /plan and /apply endpoints
* Resolve conflicts
* Fix wrong merge
* Add missing methods for mocks
* Fix linting error
* Fix linting error
* Move api plan/apply into APIController
* Extract commond code into helper functions
* Implement GetCloneURL for GitHub
Co-authored-by: Li Lin <li.lin@hashicorp.com >
2022-07-27 11:36:49 -07:00
Li Lin
e153cea2bf
Revert "[fix] Ignore commit checks for atlantis apply on Github ( #2311 )" ( #2388 )
...
* Revert "[fix] Ignore commit checks for atlantis apply on Github (#2311 )"
This reverts commit a3db712920 .
2022-07-13 17:11:03 -07:00
Michel Z. Santello
df0d58d29b
fix: vcs-status-name hardcoded in PullIsMergeable function ( #2312 )
...
* feat: add userConfig.VCSStatusName to applyCommandRunner context
* fix: use vcsstatusname from context
* chore: normalize tests
* chore: update interface mock
2022-06-16 09:26:20 -07:00
Chico Venancio
a3db712920
[fix] Ignore commit checks for atlantis apply on Github ( #2311 )
...
* [fix] Ignore commit checks for atlantis apply on Github
* Fix typo
* Fmt
* lint
2022-06-13 09:40:05 -07:00
PePe Amengual
7199ea4a7e
fix: reverting change to command status logic ( #2173 )
2022-03-31 11:51:49 -04:00
Raymond Chen
4e4568501d
fix: fix unmarshall error in graphql call ( #2128 )
...
* Fix unmarshall error in GraphQL call #2090
* Add unit tests for GetTeamNamesForUser
* Fix lint error
2022-03-09 14:37:58 -08:00
Andre Ziviani
1a7cc360a9
feat: add a pending status for apply when running plan command ( #2053 )
...
* add a pending status for apply when running plan command
* fix status updater logic, we should only update the status after we check if the PR is mergeable like the doc next to it says
* do not dismiss the PR if the only our "atlantis/apply" status is pending/failing
* fix logic and tests
* linting
2022-03-04 14:49:54 -05:00
Raymond Chen
136b23ac11
fix: get user teams with GitHub GraphQL API ( #2045 )
2022-02-04 19:47:30 -05:00
Sarvar Muminov
7a927c050b
Moving config files to core/config ( #2036 )
...
* Moving config files to core/config
* fix package names
* fix package dependencies
* linting fixes
* more linting fixes
* ran golangci-lint run --fix
2022-02-03 11:06:04 -08:00
Iain Lane
e3f0dd5553
Retry /files/ requests to github ( #2002 )
...
Similar to #1131 , we see this for /files/ too, resulting in a plan
error.
Closes #1905
2022-01-25 09:49:11 -05:00
Nish Krishnan
64612019f4
Revert "feat: filter out atlantis/apply from mergeability clause (#18… ( #1968 )
...
* Revert "feat: filter out atlantis/apply from mergeability clause (#1856 )"
This reverts commit d01796b9d9 .
* Add missing import.
2022-01-01 15:11:39 -05:00
Paul Erickson
bc368465a0
feat: add GitHub team allowlist configuration option ( #1694 )
...
* Add GitHub team allowlist configuration option
Co-authored-by: PePe (Jose) Amengual <jamengual@sonatype.com >
Co-authored-by: Troy Neeriemer <tneeriemer@sonatype.com >
Co-authored-by: Ted Roby <troby+github@sonatype.com >
Co-authored-by: Paul Erickson <perickson@sonatype.com >
* Check team allowlist in command runner, rather than event controller
* Remove unneeded trimming
* Test wildcard groups and commands
* Improve error logging
Co-authored-by: PePe (Jose) Amengual <jamengual@sonatype.com >
Co-authored-by: Troy Neeriemer <tneeriemer@sonatype.com >
Co-authored-by: Ted Roby <troby+github@sonatype.com >
2021-12-21 16:08:43 -08:00
Nish Krishnan
d01796b9d9
feat: filter out atlantis/apply from mergeability clause ( #1856 )
...
Filter out atlantis apply status during mergeability check.
2021-10-19 13:51:22 -07:00
Nicholas (Nick) Meyer
875e2adc40
Improve github pull request call retries ( #1810 )
...
* Improve github pull request call retries
Retry with fixed 1 second backoff up to 3 retries was added by #1131 to
address #1019 , but the issue continued to show up (#1453 ).
Increase max attempts to 5 and use exponential backoff for a maximum
total retry time of (2^n - n - 1) seconds, which is roughly 30 seconds
for current max attempts n = 5.
Also move the sleep to the top of the loop so that we never sleep
without sending the request again on the last iteration.
* Fix style with gofmt -s
2021-10-04 09:59:53 -07:00
Aayush Gupta
bb2c239dd9
Updating client interface and adding ApprovalStatus model ( #1827 )
2021-09-22 12:41:05 -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
Nish Krishnan
79309ed39c
[ORCA-559] Fix hide previous command logic ( #37 ) ( #1549 )
2021-05-03 12:47:23 -07:00
Istvan Tapaszto
632460b20b
Delete source branch on merge ( #1357 )
...
Co-authored-by: Tapaszto, Istvan <istvan.tapaszto@msciintegration.onmicrosoft.com >
2021-04-22 09:54:18 -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
Gábor Lipták
832afeaec1
Correct typo ( #1424 )
2021-02-23 17:04:35 -05:00
Nish Krishnan
1513ee6421
Add support for fetching gh app user. ( #30 ) ( #1334 )
...
* Add support for fetching gh app user. (#30 )
* Upgrade pegomock.
* go mod vendor.
2021-01-05 15:21:31 -08:00
Luke Kysow
cbe0b18c0e
Refactor --skip-clone-no-changes work.
2020-08-18 15:48:33 -07:00