Skip to content

Commit

Permalink
chore: adjust move to next milestone (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
JashBook authored Oct 8, 2023
1 parent 3d71092 commit b4b16d9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/utils/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,10 @@ move_pr_to_next_milestone() {
break
fi
pr_milestone_number=$( echo "$pr_list" | jq ".[$i].milestone.number" --raw-output )
if [[ "$pr_milestone_number" == "null" || -z "$pr_milestone_number" || $pr_milestone_number -lt $next_milestone_number ]]; then
if [[ "$pr_milestone_number" == "null" || -z "$pr_milestone_number" ]]; then
continue
fi
if [[ $pr_milestone_number -lt $next_milestone_number ]]; then
echo "$(tput -T xterm setaf 3)set pr $pr_number milestone:$next_milestone_title$(tput -T xterm sgr0)"
gh pr edit $pr_number --repo $GITHUB_REPO --milestone "$next_milestone_title"
fi
Expand All @@ -763,7 +766,10 @@ move_issue_to_next_milestone() {
break
fi
issue_milestone_number=$( echo "$issue_list" | jq ".[$i].milestone.number" --raw-output )
if [[ "$issue_milestone_number" == "null" || -z "$issue_milestone_number" || $issue_milestone_number -lt $next_milestone_number ]]; then
if [[ "$issue_milestone_number" == "null" || -z "$issue_milestone_number" ]]; then
continue
fi
if [[ $issue_milestone_number -lt $next_milestone_number ]]; then
echo "$(tput -T xterm setaf 3)set issue $issue_number milestone:$next_milestone_title$(tput -T xterm sgr0)"
gh issue edit $issue_number --repo $GITHUB_REPO --milestone "$next_milestone_title"
fi
Expand Down

0 comments on commit b4b16d9

Please sign in to comment.