From a699fd28d687f1558c970724e4b92067a6304667 Mon Sep 17 00:00:00 2001 From: Rudy Matela Date: Wed, 17 Aug 2022 13:55:40 +0200 Subject: [PATCH] refactor isUnfailingIntegrated https://github.com/channable/hoff/pull/137#discussion_r947572784 --- src/Project.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Project.hs b/src/Project.hs index a2a894bf..3be8c182 100644 --- a/src/Project.hs +++ b/src/Project.hs @@ -463,11 +463,12 @@ isIntegrated (Integrated _ _) = True isIntegrated _ = False isUnfailingIntegrated :: IntegrationStatus -> Bool -isUnfailingIntegrated (Integrated _ BuildPending) = True -isUnfailingIntegrated (Integrated _ (BuildStarted _)) = True -isUnfailingIntegrated (Integrated _ BuildSucceeded) = True -isUnfailingIntegrated (Integrated _ (BuildFailed _)) = False -isUnfailingIntegrated _ = False +isUnfailingIntegrated (Integrated _ buildStatus) = case buildStatus of + BuildPending -> True + (BuildStarted _) -> True + BuildSucceeded -> True + (BuildFailed _) -> False +isUnfailingIntegrated _ = False isIntegratedOrSpeculativelyConflicted :: PullRequest -> Bool isIntegratedOrSpeculativelyConflicted pr =