runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.83k stars 1.06k forks source link

fix: link latest commit to the correct pipeline #4865

Open rgs1 opened 3 months ago

rgs1 commented 3 months ago

PR #4785 was a partial fix, as it might link a commit to the wrong pipeline when GitLab is slow to update the HeadPipeline.

This patch ensures the latest commit is always linked to the correct pipeline by querying the pipeline associated with the commit's ref, instead of relying on HeadPipeline.

Tested in our environment and it looks good so far.

Signed-off-by: Raul Gutierrez Segales rsegales@nvidia.com