From 5756e4582648794e9603fbd8e84df25221fb7ff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 18 Jul 2026 15:44:02 +0200 Subject: Tag and commit support in job id parts --- src/Command/JobId.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Command/JobId.hs') diff --git a/src/Command/JobId.hs b/src/Command/JobId.hs index 173f543..3a119fa 100644 --- a/src/Command/JobId.hs +++ b/src/Command/JobId.hs @@ -60,14 +60,19 @@ cmdJobId (JobIdCommand JobIdOptions {..} ref) = do outputMessage out "" forM_ ids $ \case JobIdName name -> outputMessage out $ textJobName name <> " (job name)" - JobIdCommit mbrepo cid -> outputMessage out $ T.concat + JobIdRepo mbrepo (JobIdCommit cid) -> outputMessage out $ T.concat [ textCommitId cid, " (commit" , maybe "" (\name -> " from ‘" <> textRepoName name <> "’ repo") mbrepo , ")" ] - JobIdTree mbrepo subtree cid -> outputMessage out $ T.concat + JobIdRepo mbrepo (JobIdTree subtree cid) -> outputMessage out $ T.concat [ textTreeId cid, " (tree" , maybe "" (\name -> " from ‘" <> textRepoName name <> "’ repo") mbrepo , if not (null subtree) then ", subtree ‘" <> T.pack subtree <> "’" else "" , ")" ] + JobIdRepo mbrepo (JobIdTag cid tid) -> outputMessage out $ T.concat + [ textCommitId cid, "^", textTagId tid, " (commit following tag" + , maybe "" (\name -> " from ‘" <> textRepoName name <> "’ repo") mbrepo + , ")" + ] -- cgit v1.2.3