mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-31 14:17:45 +00:00
Fix error when listing PRs by milestone (#885)
This commit is contained in:
parent
526c9525ea
commit
b1cd222c2a
1 changed files with 7 additions and 7 deletions
|
@ -21,13 +21,13 @@ export def main [
|
|||
mut query_parts = []
|
||||
|
||||
let date = if $date == null and $milestone == null {
|
||||
(date now) - 4wk
|
||||
(date now) - 4wk
|
||||
} else {
|
||||
$date
|
||||
}
|
||||
| format date "%Y-%m-%d"
|
||||
|
||||
if $date != null {
|
||||
let date = $date | format date "%Y-%m-%d"
|
||||
let since = (date now | format date %F | into datetime) - ($date | into datetime)
|
||||
log info $"listing PRs in ($repo) since ($date) \(($since) ago\)"
|
||||
$query_parts ++= [ $"merged:>($date)" ]
|
||||
|
@ -58,11 +58,11 @@ export def main [
|
|||
|
||||
if $table {
|
||||
return (
|
||||
$prs
|
||||
| update author {md-link $"@($in)" $"https://github.com/($in)"}
|
||||
| insert PR {|pr| md-link $"#($pr.number)" $pr.url}
|
||||
| select author title PR
|
||||
| to md
|
||||
$prs
|
||||
| update author {md-link $"@($in)" $"https://github.com/($in)"}
|
||||
| insert PR {|pr| md-link $"#($pr.number)" $pr.url}
|
||||
| select author title PR
|
||||
| to md
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue