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: prevent commit status update in incorrect MR #2636

Merged
merged 2 commits into from Nov 4, 2022

Conversation

michelmzs
Copy link
Contributor

@michelmzs michelmzs commented Nov 2, 2022

Summary

Prevent Atlantis from updating the commit status on an incorrect Merge Request by passing the Ref (HeadBranch) in the CommitStatusOptions.

Tests

Tested on gitlab.com (v15.x) and Self-hosted (v14.x)

Closes #2484

@michelmzs michelmzs changed the title fix: prevent commit status in incorrect MR fix: prevent commit status update in incorrect MR Nov 2, 2022
@michelmzs michelmzs marked this pull request as ready for review November 2, 2022 15:54
@michelmzs michelmzs requested a review from a team as a code owner November 2, 2022 15:54
@jamengual jamengual added waiting-on-review Waiting for a review from a maintainer bug Something isn't working labels Nov 4, 2022
@jamengual
Copy link
Contributor

@michelmzs Thanks for the contribution

@jamengual jamengual merged commit 479f2b7 into runatlantis:master Nov 4, 2022
@frimik
Copy link

frimik commented Nov 30, 2022

Since going from v0.20.1 to v0.21.x the existing pipeline and the external atlantis pipeline no longer correlate and we get two pipelines linked to the commit instead of one with all stages combined.

Atlantis now always create its own unique pipeline id. I can't find anything except this change which is related. Filed #2743

frimik added a commit to cloud-destroyer/atlantis that referenced this pull request Nov 30, 2022
krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
* fix: prevent commit status in incorrect MR
  - closes runatlantis#2484

* chore: update test 'TestGitlabClient_UpdateStatus'
@nitrocode nitrocode added this to the 0.21.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working waiting-on-review Waiting for a review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitlab_client: Apply doesn't work on a branch cut from another until after making a new commit
4 participants