Skip to content

Commit

Permalink
Prettify nu/milestone.nu
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Oct 13, 2024
1 parent d2b130c commit caa3d04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nu/milestone.nu
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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
Expand Down

0 comments on commit caa3d04

Please sign in to comment.