From 08d221447c6c4bc47d3638b015e305e4a7cb6824 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 21 Dec 2024 17:51:48 +0100 Subject: [PATCH] Cleanup and make output easier to copy --- .github/bin/pick.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/bin/pick.php b/.github/bin/pick.php index ab64b2dd..34ad6a24 100644 --- a/.github/bin/pick.php +++ b/.github/bin/pick.php @@ -6,7 +6,7 @@ // Check if we have the correct number of arguments if ($argc !== 3 && $argc !== 4) { echo "\033[31mError: Invalid number of arguments\033[0m\n"; - echo "\033[33mUsage:\033[0m php bin/pick.php \n"; + echo "\033[33mUsage:\033[0m php bin/pick.php [--pretend]\n"; echo "\033[33mExample:\033[0m php bin/pick.php abc123 feature-branch\n"; exit(1); } @@ -27,9 +27,8 @@ $prNumber = $matches[1]; $title = trim($matches[2]); - $echo = "\n\033[33mSuggested PR format:\033[0m\n"; - $echo .= "\033[33mTitle:\033[0m $title\n"; - $echo .= "\033[33mDescription:\033[0m Merges pull request https://github.com/hydephp/develop/pull/$prNumber\n"; + $printWhenDone = "\n\033[33mSuggested PR format: (Line 1: title, Line 2: description)\033[0m\n"; + $printWhenDone .= "$title\nMerges pull request https://github.com/hydephp/develop/pull/$prNumber\n"; } } @@ -51,6 +50,6 @@ echo "\033[32mSuccessfully created branch '$branch' and cherry-picked commit '$hash'\033[0m\n"; -if (isset($echo)) { - echo $echo; +if (isset($printWhenDone)) { + echo $printWhenDone; }