From 090a02fd9be0520890c888f61e53fd2ca505e560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 31 Oct 2026 20:32:59 +0100 Subject: Watching of remote branches and other refs --- src/Expression.hs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/Expression.hs') diff --git a/src/Expression.hs b/src/Expression.hs index bf35f2a..43f859e 100644 --- a/src/Expression.hs +++ b/src/Expression.hs @@ -132,10 +132,14 @@ evaluateDeclaredRevision repo = \case ts -> return $ StaticRef $ tagObject $ foldl1' sel ts WatchedRef (TextRef ref) -> do - watched <- watchBranch repo ref - output <- getOutput - outputEvent output $ TestMessage $ "watch-branch-started " <> ref - return $ WatchedRef $ BranchRef watched + watchBranch repo ref >>= \case + Right watched -> do + output <- getOutput + outputEvent output $ TestMessage $ "watch-branch-started " <> ref + return $ WatchedRef $ BranchRef watched + Left commit -> do + return $ StaticRef commit + WatchedRef (TagRef wtPattern wtUpdate) -> do wtChan <- watchTags repo value <- filter (Glob.match wtPattern . T.unpack . tagTag) <$> listTags repo >>= \case -- cgit v1.2.3