From 3374a3981538c0615ebfe36fc55a408f18d2bd17 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Fri, 10 Jul 2026 15:33:14 -0400 Subject: update jira-* scripts a little --- .local/bin/jira-CR.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to '.local/bin/jira-CR.php') diff --git a/.local/bin/jira-CR.php b/.local/bin/jira-CR.php index ca87d55..6e665ea 100755 --- a/.local/bin/jira-CR.php +++ b/.local/bin/jira-CR.php @@ -64,8 +64,13 @@ function get_gh(string $repo, bool $cache = false): array { return json_decode(shell_exec("cat /tmp/prs_$repo.json"), true) ?? []; } +if (!empty($argv[1]) && $argv[1] != '--cached') { + echo "invalid argument\n"; + return 1; +} + $use_cache = false; -if ($argv[1] == "--cached") { +if (($argv[1] ?? 0) == "--cached") { $use_cache = true; } $prs_jsons = []; @@ -73,6 +78,7 @@ $prs_jsons[] = get_gh("OnBDC2", $use_cache); //$prs_jsons[] = get_gh("maple-ai"); $prs_jsons[] = get_gh("maple", $use_cache); +$padlen = 50; print(str_pad("\r", $padlen)); print("\r"); @@ -230,6 +236,7 @@ foreach ($has_no_pr as $ticket) { // Also show tickets which are past CR but no longer has two reviews $madeTitle = false; [$tickets, $ticketLabels] = get_jira(['Pending Demo', 'Ready To Test', 'Testing']); +echo "\n"; foreach ($prs_json as $pr) { [$terminal, $html] = process_pr($pr, $tickets, $ticketLabels, true); if (!empty($terminal) && !empty($html)) { @@ -244,6 +251,7 @@ foreach ($prs_json as $pr) { } } [$tickets, $ticketLabels] = get_jira(['Pending Sign Off', 'Signed Off']); +echo "\n"; foreach ($prs_json as $pr) { [$terminal, $html] = process_pr($pr, $tickets, $ticketLabels, true); if (!empty($terminal) && !empty($html)) { -- cgit 1.4.1