Skip to content

Commit

Permalink
fix milestone create output
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Oct 26, 2024
1 parent 6b7bbe6 commit a7adaf0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions nu/milestone.nu
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export def guess-milestone-for-issue [
}

# Create milestone for a repository by title, due_on, and description.
export def create-milestone [
export def --env create-milestone [
repo: string, # Github repository name
title: string, # Milestone title
--due-on(-d): string, # Milestone due date, format: yyyy/mm/dd
Expand All @@ -181,8 +181,7 @@ export def create-milestone [
let result = gh api -X POST $'/repos/($repo)/milestones' -F $'title=($title)' ...$dueOnArg ...$descArg
let milestone = $result | from json
print $'Milestone (ansi p)($milestone.title)(ansi reset) with NO. (ansi p)($milestone.number)(ansi reset) was created successfully.'
print 'Set output for milestone create Github Action:'
echo $'milestone-number=($milestone.number)' | save --append $env.GITHUB_OUTPUT
echo $'milestone-number=($milestone.number)' o>> $env.GITHUB_OUTPUT
}

# Close milestone for a repository by title or number.
Expand Down

0 comments on commit a7adaf0

Please sign in to comment.