From a1d8d1f0ff36cbc9584644e3237671be7d8883aa Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Sat, 4 Jun 2022 17:24:07 +0200 Subject: [PATCH] Order latest commits by id instead of by updated_at, as it could screw up the ordering for getting the latest pipeline Signed-off-by: Louis Vallat --- src/gitlab_controller.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gitlab_controller.rs b/src/gitlab_controller.rs index 79fb188..2be3375 100644 --- a/src/gitlab_controller.rs +++ b/src/gitlab_controller.rs @@ -100,14 +100,14 @@ pub fn get_latest_pipelines(client: &Gitlab, project: &Project) -> Option = endpoint.query(client).unwrap_or(vec![]); if pipelines.is_empty() { warn!("No pipeline found for project {:?}.", project); return None; } else { let pipeline = pipelines.first().unwrap().to_owned(); - debug!("Found pipeline {:?} as latest pipeline for project {:?}.", + debug!("Found {:?} as latest pipeline for project {:?}.", pipeline, project); return Some(pipeline); }