File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import Perf.Types.Prim
1111
1212mkYesodData " App" [parseRoutes |
1313 / HomeR GET
14+ /branches BranchesR GET
1415 /branch/#Text BranchR GET
1516 /branch/#Text/#Hash BranchCommitR GET
1617 /commit/#Hash CommitR GET
@@ -25,7 +26,8 @@ instance YesodBreadcrumbs App where
2526 breadcrumb r =
2627 case r of
2728 HomeR -> return (" Home" ,Nothing )
28- BranchR name -> return (name, Just HomeR )
29+ BranchesR -> return (" Branches" ,Just HomeR )
30+ BranchR name -> return (name, Just BranchesR )
2931 CommitR hash -> return (coerce hash, Just HomeR )
3032 CompareCommitsR hash0 hash1 ->
3133 let short x = T. take 8 $ coerce x
Original file line number Diff line number Diff line change @@ -31,8 +31,11 @@ import RIO qualified
3131import Data.Foldable
3232import Yesod hiding (toHtml , Html )
3333
34- getHomeR :: Handler (Html () )
35- getHomeR = do
34+ getHomeR :: Handler ()
35+ getHomeR = redirect $ BranchR " master"
36+
37+ getBranchesR :: Handler (Html () )
38+ getBranchesR = do
3639 master <- db $ selectList @ DB. Branch [DB. BranchName ==. " master" ] []
3740 branches <- fmap (List. filter (not . T. isPrefixOf " gh-readonly-queue/" . (. entityVal. branchName))) $
3841 db $ selectList @ DB. Branch [DB. BranchName !=. " master" ] [Desc DB. BranchCreatedAt ]
You can’t perform that action at this time.
0 commit comments