Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: When GitHub/GitLab Auto-Merge Is Used with Atlantis Pre Workflow Hooks, the PR will be Merged Prematurely #3880

Merged
merged 2 commits into from
Nov 4, 2023

Conversation

X-Guardian
Copy link
Contributor

what

When a pre-workflow hook is launched for plan and apply commands, set the relevant plan/apply commit status to pending at the start of the hook. This prevents a VCS auto-merge feature from prematurely merging the PR when the pre-workflow hook finishes.

Also, if fail-on-pre-workflow-hook-error is set, update the relevant plan/apply commit status to 'failed' at the end of the hook.

Also fix the current 'unable to update pre workflow hook status' message text.

why

tests

Tested locally

@X-Guardian X-Guardian requested a review from a team as a code owner October 20, 2023 13:54
@github-actions github-actions bot added the go Pull requests that update Go code label Oct 20, 2023
@jamengual jamengual added the waiting-on-review Waiting for a review from a maintainer label Oct 20, 2023
@GenPage GenPage merged commit 1b45fb1 into runatlantis:main Nov 4, 2023
13 checks passed
@GenPage
Copy link
Member

GenPage commented Nov 4, 2023

/cherry-pick release-0.26

gcp-cherry-pick-bot bot pushed a commit that referenced this pull request Nov 4, 2023
… Hooks, the PR will be Merged Prematurely (#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
GenPage pushed a commit that referenced this pull request Nov 6, 2023
… Hooks, the PR will be Merged Prematurely (#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
GenPage pushed a commit that referenced this pull request Nov 10, 2023
… Hooks, the PR will be Merged Prematurely (#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
GenPage pushed a commit that referenced this pull request Nov 11, 2023
… Hooks, the PR will be Merged Prematurely (#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
GenPage pushed a commit that referenced this pull request Nov 14, 2023
… Hooks, the PR will be Merged Prematurely (#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
… Hooks, the PR will be Merged Prematurely (runatlantis#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
… Hooks, the PR will be Merged Prematurely (runatlantis#3880)

* Fix Premature Auto-Merge

* Add CommitStatusUpdater to commandRunner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code waiting-on-review Waiting for a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When GitHub/GitLab Auto-Merge Is Used with Atlantis Pre Workflow Hooks, the PR will be Merged Prematurely
3 participants