Skip to content

Commit

Permalink
WebInterface: DRY code
Browse files Browse the repository at this point in the history
  • Loading branch information
rudymatela committed Jul 29, 2022
1 parent 9efc6d3 commit 82ecce5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/WebInterface.hs
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ viewPullRequest info pullRequestId pullRequest = do
Integrated sha buildStatus -> do
span " | "
case buildStatus of
(BuildStarted ciUrl) -> do
a ! href (toValue ciUrl) $ "🟡"
span " "
(BuildFailed (Just ciUrl)) -> do
a ! href (toValue ciUrl) $ ""
span " "
_ -> pure ()
(BuildStarted ciUrl) -> ciLink ciUrl "🟡"
(BuildFailed (Just ciUrl)) -> ciLink ciUrl ""
_ -> pure ()
a ! href (toValue $ commitUrl info sha) $ toHtml $ prettySha sha
_ -> pure ()
where
ciLink url text = do
a ! href (toValue url) $ text
span " "

viewPullRequestWithApproval :: ProjectInfo -> PullRequestId -> PullRequest -> Html
viewPullRequestWithApproval info prId pullRequest = do
Expand Down

0 comments on commit 82ecce5

Please sign in to comment.