mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-31 06:07:44 +00:00
Add script to generate lists of PRs (#753)
This wraps existing code from @amtoine to auto-generate the PRs for Full Changelog and Breaking Changes sections.
This commit is contained in:
parent
14e77c7ec8
commit
a17186f25f
1 changed files with 36 additions and 0 deletions
36
make_release/prs.nu
Normal file
36
make_release/prs.nu
Normal file
|
@ -0,0 +1,36 @@
|
|||
use ./release-note/list-merged-prs
|
||||
|
||||
const LAST_RELEASE = 0.89.0
|
||||
|
||||
let matching_releases = ^gh api /repos/nushell/nushell/releases
|
||||
| from json
|
||||
| where tag_name == $LAST_RELEASE
|
||||
|
||||
match ($matching_releases | length) {
|
||||
0 => {
|
||||
error make --unspanned { msg: "no matching releases... did you set the last release?" }
|
||||
},
|
||||
1 => {},
|
||||
_ => {
|
||||
error make --unspanned { msg: $"too many matching releases... is ($LAST_RELEASE) correct?" }
|
||||
},
|
||||
}
|
||||
|
||||
let last_release_date = $matching_releases | into record | get published_at | into datetime
|
||||
print $last_release_date
|
||||
|
||||
let prs = list-merged-prs nushell/nushell $last_release_date
|
||||
| where author != "app/dependabot"
|
||||
| sort-by mergedAt
|
||||
| update url {|it| $"[#($it.number)]\(($it.url)\)" }
|
||||
| update author { $"[@($in)]\(https://github.com/($in)\)" }
|
||||
| select author title url
|
||||
| rename --column {url: pr}
|
||||
|
||||
print "ALL PRS:"
|
||||
print ($prs | to md --pretty)
|
||||
|
||||
print "BREAKING CHANGES:"
|
||||
mut breaking_prs = list-merged-prs nushell/nushell $last_release_date --label breaking-change --pretty --no-author
|
||||
$breaking_prs ++= (list-merged-prs nushell/nushell $last_release_date --label 'pr:breaking-change' --pretty --no-author)
|
||||
print ($breaking_prs | to md --pretty)
|
Loading…
Add table
Add a link
Reference in a new issue