From 67b391d33a60fd953ff465397fc0c6100e47ca89 Mon Sep 17 00:00:00 2001
From: Julien Malka <julien@malka.sh>
Date: Fri, 10 Mar 2023 21:29:17 +0100
Subject: [PATCH] feat: hide update steps

---
 modules/buildbot/buildbot_nix.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/buildbot/buildbot_nix.py b/modules/buildbot/buildbot_nix.py
index 68d3c1c..574bc83 100644
--- a/modules/buildbot/buildbot_nix.py
+++ b/modules/buildbot/buildbot_nix.py
@@ -20,9 +20,7 @@ from buildbot.process.results import FAILURE
 from buildbot.steps.master import SetProperty
 
 def failure(step):
-   if step.getProperty("GitFailed"):
-      return True
-   return False
+   return step.getProperty("GitFailed")
 
 class BuildTrigger(Trigger):
     """
@@ -246,7 +244,8 @@ def nix_update_flake_config(
             haltOnFailure=True,
             mode="full",
             branch="main",
-            doStepIf=failure
+            doStepIf=failure,
+            hideStepIf=lambda x: not(failure(x))
         )
     )
     factory.addStep(steps.ShellCommand(
@@ -258,7 +257,8 @@ def nix_update_flake_config(
                 "update_flake_lock"
             ],
             haltOnFailure=True,
-            doStepIf=failure
+            doStepIf=failure,
+            hideStepIf=lambda x: not(failure(x))
         )
 
     )