Skip to content

Commit

Permalink
fix: Fix milestone binding for closes issues when No close PR found (#78
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hustcer authored Oct 25, 2024
1 parent e532e78 commit 789b76f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nu/query.nu
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ def query-issue-status [issueNO: int, payload: string, token: string] {

$events = $result.timeline.edges.node | filter {|it| $it.stateReason? | is-not-empty }

$closer = $events | filter {|it| $it.closer?.number? | is-not-empty }
let $closers = $events | filter {|it| $it.closer?.number? | is-not-empty }
| select closer | flatten
| select number milestone?.title? author.login repository.nameWithOwner mergeCommit.abbreviatedOid title
| rename -c $rename
| last

$tries += 1
$closer = if ($closers | is-empty) { {} } else { $closers | last }
$milestone = $closer.milestone? | default '-'
}

Expand Down

0 comments on commit 789b76f

Please sign in to comment.