A Haskell Daemon that Monitors Pull Requests
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
616 B

{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import PullWatch.PullWatch
import PullWatch.Types
import PullWatch.Environment (getPAT, getRepoConfig)
import qualified Data.Default as Default (def)
doMonitor :: RepoArgs -> IO ()
doMonitor (RepoArgs owner repo) = do
-- Set up authentication token from environment
pat <- getPAT
let ?pat = pat
repoConfig <- getRepoConfig
case repoConfig of
Nothing -> monitorPRs Default.def [Repo owner repo]
(Just repos) -> monitorPRs Default.def $ [Repo owner repo] ++ repos
return ()
main = parseRepoArgs doMonitor