diff options
| author | Zach DeCook <zach.decook@bettercarpeople.com> | 2026-07-10 15:33:14 -0400 |
|---|---|---|
| committer | Zach DeCook <zach.decook@bettercarpeople.com> | 2026-07-10 15:33:14 -0400 |
| commit | 3374a3981538c0615ebfe36fc55a408f18d2bd17 (patch) | |
| tree | 63c58432ed9c7d4808e85ba897a4ed1d4dc7f0f2 /.local/bin/jira-CR.php | |
| parent | 0b980ed433dbc7262a6cf5d13689f1c67f3c98c4 (diff) | |
| download | dotfiles-3374a3981538c0615ebfe36fc55a408f18d2bd17.tar.gz | |
update jira-* scripts a little
Diffstat (limited to '.local/bin/jira-CR.php')
| -rwxr-xr-x | .local/bin/jira-CR.php | 10 |
1 files changed, 9 insertions, 1 deletions
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)) { |
