diff options
| author | Roman Smrž <roman.smrz@seznam.cz> | 2026-10-31 20:32:59 +0100 |
|---|---|---|
| committer | Roman Smrž <roman.smrz@seznam.cz> | 2026-11-03 21:48:54 +0100 |
| commit | 090a02fd9be0520890c888f61e53fd2ca505e560 (patch) | |
| tree | 148465e274d675f3a082e835baf03af2dd5f29cf /src/Expression.hs | |
| parent | 5f497fe9e20cc414113f46b5b97a88e4cb77aef9 (diff) | |
Watching of remote branches and other refs
Diffstat (limited to 'src/Expression.hs')
| -rw-r--r-- | src/Expression.hs | 12 |
1 files changed, 8 insertions, 4 deletions
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 |