printBuild :: T.Text -> Int -> Build -> IO ()
printBuild u i b = do
  c <- utcToLocalZonedTime $ created_at  (b :: Build)
  f <- finished_time (finished_at b)
  putStrLn (unlines (lines (show b)
                   ++ [ "    Url:             " ++ bUrl
                      , "    Created At:      " ++ show c
                      , "    Finished At:     " ++ f]))
  where
    bUrl = T.unpack (T.replace
                     (T.pack("/merge_requests/" ++ show i)) (T.pack "") u)
           ++ "/builds/"
           ++ show (id (b :: Build))

    finished_time fa = case fa of
                         Just fa -> do
                           lf <- utcToLocalZonedTime fa
                           return (show $ lf)
                         Nothing -> return "Pending"
printBuild :: T.Text -> Int -> Build -> IO ()
printBuild u i b = do
  c <- utcToLocalZonedTime $ created_at  (b :: Build)
  f <- finished_time (finished_at b)
  putStrLn (unlines (lines (show b)
                   ++ [ "    Url:             " ++ bUrl
                      , "    Created At:      " ++ show c
                      , "    Finished At:     " ++ f]))
  where
    bUrl = T.unpack (T.replace
                     (T.pack("/merge_requests/" ++ show i)) (T.pack "") u)
           ++ "/builds/"
           ++ show (id (b :: Build))

    finished_time fa = case fa of
                         Just fa -> do
                           lf <- utcToLocalZonedTime fa
                           return (show $ lf)
                         Nothing -> return "Pending"
printBuild u i b = do
  c <- utcToLocalZonedTime $ created_at  (b :: Build)
  f <- finished_time (finished_at b)
  putStrLn (unlines (lines (show b)
                   ++ [ "    Url:             " ++ bUrl
                      , "    Created At:      " ++ show c
                      , "    Finished At:     " ++ f]))
  where
    bUrl = T.unpack (T.replace
                     (T.pack("/merge_requests/" ++ show i)) (T.pack "") u)
           ++ "/builds/"
           ++ show (id (b :: Build))

    finished_time fa = case fa of
                         Just fa -> do
                           lf <- utcToLocalZonedTime fa
                           return (show $ lf)
                         Nothing -> return "Pending"