Skip to content

Commit

Permalink
Update comments IRT fallback
Browse files Browse the repository at this point in the history
Signed-off-by: Alec Hinh <[email protected]>
  • Loading branch information
ahinh43 committed Aug 16, 2023
1 parent f42ca32 commit 7f10ed5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/vcs/gitlab/mr_status_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,8 @@ func (p *RunStatusUpdater) getLatestPipelineID(rmd runstream.RunMetadata) *int {
return pipelineID
}
}
// If we can't find a merge request CI/CD pipeline for the commit
// Return the last pipeline ID in the pipelines array as the ID as a fallback.
// If there are no pipelines, TFC will send the external status update to nil which will create
// a pipeline that subsequent function calls will use.
// Fallback behavior if Gitlab doesn't find any merge request pipelines
// Returns last pipeline ID in the pipelines list
if pipelineID == nil {
log.Debug().Msg("No merge request pipeline ID found for the commit. Using latest pipeline ID as fallback...")
pipelineID = gogitlab.Int(pipelines[len(pipelines)-1].GetID())
Expand Down

0 comments on commit 7f10ed5

Please sign in to comment.