Skip to content

INC-5131: APIController: /api/apply pretend PRs have been approved#87

Merged
bencord0 merged 1 commit into
mainfrom
inc-5131-fake-pr-approvals
Apr 11, 2025
Merged

INC-5131: APIController: /api/apply pretend PRs have been approved#87
bencord0 merged 1 commit into
mainfrom
inc-5131-fake-pr-approvals

Conversation

@bencord0
Copy link
Copy Markdown

When a request to apply run is given from the /api/, we don't have enough context regarding if the PR has actually been approved or not.

To work around this, we fake it, and pretend the PR is okay. --
Note, this is not the same code path that is used when the atlantis apply comment is posted on a Github PR.

This only applies to runs that are triggered, bypassing the normal GH comment process. This code can be disabled by unsetting ATLANTIS_API_SECRET to disable these APIs.

When a request to apply run is given from the /api/, we don't have
enough context regarding if the PR has actually been approved or not.

To work around this, we fake it, and pretend the PR is okay.
--
Note, this is _not_ the same code path that is used when the `atlantis apply`
comment is posted on a Github PR.

This only applies to runs that are triggered, bypassing the normal GH comment
process. This code can be disabled by unsetting ATLANTIS_API_SECRET to
disable these APIs.
@bencord0 bencord0 merged commit 470e759 into main Apr 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants