summaryrefslogtreecommitdiff
path: root/Biz/Devalloc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Devalloc.hs')
-rw-r--r--Biz/Devalloc.hs18
1 files changed, 5 insertions, 13 deletions
diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs
index 32fa7f9..b920241 100644
--- a/Biz/Devalloc.hs
+++ b/Biz/Devalloc.hs
@@ -73,7 +73,6 @@ import qualified Clay.Font
import qualified Clay.Render as Clay
import qualified Control.Concurrent.Async as Async
import qualified Control.Exception as Exception
-import Control.Monad ((>=>))
import Crypto.JOSE.JWK (JWK)
import Data.Acid (makeAcidic)
import qualified Data.Acid as Acid
@@ -81,7 +80,7 @@ import qualified Data.Acid.Advanced as Acid
import qualified Data.Acid.Local as Acid
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Lazy as LBS
-import Data.Data (Data, Typeable)
+import Data.Data (Data)
import Data.IxSet (Indexable (..), IxSet, ixFun, ixSet, (&&&), (@=))
import qualified Data.IxSet as IxSet
import qualified Data.List as List
@@ -1018,7 +1017,7 @@ guardAdmin = \case
requiredScopes :: Set Text
requiredScopes = Set.fromList ["repo"]
-guardScope :: Text -> Handler ()
+guardScope :: Text -> Servant.Handler ()
guardScope =
Text.split (== ',')
.> Set.fromList
@@ -1052,7 +1051,7 @@ htmlApp cooks kp cfg jwk oAuthArgs =
Just code -> do
OAuthResponse {..} <- githubOauth oAuthArgs code |> liftIO
guardScope scope
- let warn :: Text -> Handler a
+ let warn :: Text -> Servant.Handler a
warn msg =
Log.warn [msg]
>> Log.br
@@ -1094,7 +1093,7 @@ htmlApp cooks kp cfg jwk oAuthArgs =
(GitHub.currentUserReposR GitHub.RepoPublicityAll GitHub.FetchAll)
|> liftIO
+> \case
- Left err -> throwError err502 {errBody = show err}
+ Left err -> throwError err502 {errBody = str <| (show err :: String)}
Right repos -> pure <. App.Html <| SelectRepo user repos,
getAnalyses =
guardAuth
@@ -1642,14 +1641,7 @@ analyze keep askedBy activeAuthors url bareRepo repoPrivate = do
]
/> String.lines
authors <- traverse (authorsFor bareRepo) tree :: IO [[(Text, Text, Text)]]
- let authorMap =
- zipWith
- ( \path authors_ ->
- (path, authors_)
- )
- tree
- authors ::
- [(FilePath, [(Text, Text, Text)])]
+ let authorMap = zip tree authors :: [(FilePath, [(Text, Text, Text)])]
stalenessMap <- traverse (lastTouched bareRepo) tree
let blackholes =
[ Text.pack path