about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2023-12-03 12:48:06 +0100
committerNaïm Favier <n@monade.li>2023-12-03 13:06:38 +0100
commit5f1da6e04566d45c8f8d05d938e619c93e53a4c3 (patch)
tree2ce6aa206fd6f6eba3efc38f985bfdabb44c29b8
parent4ed2fdd34b4cccbf71f8089b6d4c5c043e16f89b (diff)
scripts/haskell/hydra-report: use inline emoji
GitHub broke the rendering of colon emoji codes inside square brackets;
let's just use emoji.
-rwxr-xr-xmaintainers/scripts/haskell/hydra-report.hs36
1 files changed, 18 insertions, 18 deletions
diff --git a/maintainers/scripts/haskell/hydra-report.hs b/maintainers/scripts/haskell/hydra-report.hs
index 2ce3ecb2ae70a..8b4f798cc5434 100755
--- a/maintainers/scripts/haskell/hydra-report.hs
+++ b/maintainers/scripts/haskell/hydra-report.hs
@@ -382,22 +382,22 @@ data BuildState
 
 icon :: BuildState -> Text
 icon = \case
-   Failed -> ":x:"
-   DependencyFailed -> ":heavy_exclamation_mark:"
-   OutputLimitExceeded -> ":warning:"
+   Failed -> "❌"
+   DependencyFailed -> "❗"
+   OutputLimitExceeded -> "⚠️"
    Unknown x -> "unknown code " <> showT x
-   TimedOut -> ":hourglass::no_entry_sign:"
-   Canceled -> ":no_entry_sign:"
-   Unfinished -> ":hourglass_flowing_sand:"
-   HydraFailure -> ":construction:"
-   Success -> ":heavy_check_mark:"
+   TimedOut -> "⌛🚫"
+   Canceled -> "🚫"
+   Unfinished -> "⏳"
+   HydraFailure -> "🚧"
+   Success -> "✅"
 
 platformIcon :: Platform -> Text
 platformIcon (Platform x) = case x of
-   "x86_64-linux" -> ":penguin:"
-   "aarch64-linux" -> ":iphone:"
-   "x86_64-darwin" -> ":apple:"
-   "aarch64-darwin" -> ":green_apple:"
+   "x86_64-linux" -> "🐧"
+   "aarch64-linux" -> "📱"
+   "x86_64-darwin" -> "🍎"
+   "aarch64-darwin" -> "🍏"
    _ -> x
 
 platformIsOS :: OS -> Platform -> Bool
@@ -626,7 +626,7 @@ printBuildSummary eval@Eval{id} fetchTime summary topBrokenRdeps =
          <> optionalHideableList "#### Unmaintained packages with failed dependency" (unmaintainedList (failedDeps summary))
          <> optionalHideableList "#### Unmaintained packages with unknown error" (unmaintainedList (unknownErr summary))
          <> optionalHideableList "#### Top 50 broken packages, sorted by number of reverse dependencies" (brokenLine <$> topBrokenRdeps)
-         <> ["","*:arrow_heading_up:: The number of packages that depend (directly or indirectly) on this package (if any). If two numbers are shown the first (lower) number considers only packages which currently have enabled hydra jobs, i.e. are not marked broken. The second (higher) number considers all packages.*",""]
+         <> ["","*⤴️: The number of packages that depend (directly or indirectly) on this package (if any). If two numbers are shown the first (lower) number considers only packages which currently have enabled hydra jobs, i.e. are not marked broken. The second (higher) number considers all packages.*",""]
          <> footer
   where
    footer = ["*Report generated with [maintainers/scripts/haskell/hydra-report.hs](https://github.com/NixOS/nixpkgs/blob/haskell-updates/maintainers/scripts/haskell/hydra-report.hs)*"]
@@ -651,7 +651,7 @@ printBuildSummary eval@Eval{id} fetchTime summary topBrokenRdeps =
    brokenLine :: (PkgName, Int) -> Text
    brokenLine (PkgName name, rdeps) =
       "[" <> name <> "](https://packdeps.haskellers.com/reverse/" <> name <>
-      ") :arrow_heading_up: " <> Text.pack (show rdeps) <> "  "
+      ") ⤴️ " <> Text.pack (show rdeps) <> "  "
 
    numSummary = statusToNumSummary summary
 
@@ -733,7 +733,7 @@ printBuildSummary eval@Eval{id} fetchTime summary topBrokenRdeps =
          , Text.pack
             ( if summaryReverseDeps entry > 0
                then
-                  " :arrow_heading_up: " <> show (summaryUnbrokenReverseDeps entry) <>
+                  " ⤴️ " <> show (summaryUnbrokenReverseDeps entry) <>
                   " | " <> show (summaryReverseDeps entry)
                else ""
             )
@@ -750,9 +750,9 @@ printBuildSummary eval@Eval{id} fetchTime summary topBrokenRdeps =
          )
 
    tldr = case (errors, warnings) of
-            ([],[]) -> [":green_circle: **Ready to merge** (if there are no [evaluation errors](https://hydra.nixos.org/jobset/nixpkgs/haskell-updates))"]
-            ([],_) -> [":yellow_circle: **Potential issues** (and possibly [evaluation errors](https://hydra.nixos.org/jobset/nixpkgs/haskell-updates))"]
-            _ -> [":red_circle: **Branch not mergeable**"]
+            ([],[]) -> ["🟢 **Ready to merge** (if there are no [evaluation errors](https://hydra.nixos.org/jobset/nixpkgs/haskell-updates))"]
+            ([],_) -> ["🟡 **Potential issues** (and possibly [evaluation errors](https://hydra.nixos.org/jobset/nixpkgs/haskell-updates))"]
+            _ -> ["🔴 **Branch not mergeable**"]
    warnings =
       if' (Unfinished > maybe Success worstState maintainedJob) "`maintained` jobset failed." <>
       if' (Unfinished == maybe Success worstState mergeableJob) "`mergeable` jobset is not finished." <>