make list-merged-prs a module and add template example (#636)

to help writing the release notes, i think being able to list all the
PRs between the last two releases and format them directly to a raw
table is really nice.
this PR
- `export`s the `main` command from `list-merged-prs`
- adds an example to the `template.md` file of the release notes

the example:
```nushell
use ./make_release/release-note/list-merged-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 -c {url: pr}
    | to md --pretty
```
will dump all the PRs in a `table<author: string, title: string, pr:
string>` in `md` format:
- `author` is a mardown link to the GitHub page of each author
- `title` is the title of the PRs
- `pr` is a markdown link to the GitHub page of each PR

this pipeline will omit the contributions from @app/dependabot.
This commit is contained in:
Antoine Stevan 2023-11-11 15:36:38 +01:00 committed by GitHub
parent 93c8ea20d7
commit 7d843e5c7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -9,7 +9,7 @@ def md-link [
}
# list all merged PRs since last release
def main [
export def main [
repo: string # the name of the repo, e.g. `nushell/nushell`
date?: datetime # the date of the last release (default to 4 weeks ago, excluded)
--label: string # the label to filter the PRs by, e.g. `good-first-issue`

View File

@ -44,6 +44,24 @@ As part of this release, we also publish a set of optional plugins you can insta
### Deprecated commands
### Removed commands
<!-- NOTE: to start investigating the contributions of last release, i like to list them all in a raw table.
to achieve this, one can use the [`list-merged-prs` script from `nu_scripts`](https://github.com/nushell/nu_scripts/blob/main/make_release/release-note/list-merged-prs)
as follows:
```nushell
use ./make_release/release-note/list-merged-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 -c {url: pr}
| to md --pretty
```
-->
# Breaking changes
<!-- TODO:
paste the output of