From 899e4d4d99b30ba2868fdff4217340798c732d60 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Sun, 13 Oct 2024 23:38:40 +0800 Subject: [PATCH] Prettify the output of nu/milestone.nu (#17) --- nu/milestone.nu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nu/milestone.nu b/nu/milestone.nu index f1d6e30..fbb49a8 100644 --- a/nu/milestone.nu +++ b/nu/milestone.nu @@ -27,7 +27,7 @@ export def 'milestone-update' [ if ($gh_token | is-not-empty) { $env.GH_TOKEN = $gh_token } let selected = if ($milestone | is-empty) { guess-milestone $repo $pr } else { $milestone } if $force { gh pr edit $pr --repo $repo --remove-milestone } - print $'Setting milestone to ($selected) for PR ($pr) in repository ($repo)...' + print $'Setting milestone to (ansi p)($selected)(ansi reset) for PR ($pr) in repository ($repo)...' # FIXME: GraphQL: Resource not accessible by integration (updatePullRequest) gh pr edit $pr --repo $repo --milestone $selected } @@ -42,7 +42,7 @@ def guess-milestone [repo: string, pr: string] { exit $ECODE.CONDITION_NOT_SATISFIED } print 'Open milestones:'; hr-line - $milestones | print + $milestones | table -w 120 | print let milestones = $milestones | upsert due_on {|it| if ($it.due_on | is-empty) { (date now) - 1day } else { $it.due_on | into datetime