Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix milestone binding for closes issues when No close PR found #78

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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