-
-
Couldn't load subscription status.
- Fork 1.7k
maintainers: Add script for release notes todo list #13807
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
| # debug: | ||
| # set -x | ||
|
|
||
| START_REF="${1}" | ||
| END_REF="${2:-upstream/master}" | ||
|
|
||
| # Get the merge base | ||
| MERGE_BASE=$(git merge-base "$START_REF" "$END_REF") | ||
| unset START_REF | ||
|
|
||
| # Get date range | ||
| START_DATE=$(git show -s --format=%cI "$MERGE_BASE") | ||
| END_DATE=$(git show -s --format=%cI "$END_REF") | ||
|
|
||
| echo "Checking PRs merged between $START_DATE and $END_DATE" >&2 | ||
|
|
||
| # Get all commits between merge base and HEAD | ||
| COMMITS=$(git rev-list "$MERGE_BASE..$END_REF") | ||
|
|
||
| # Convert to set for fast lookup | ||
| declare -A commit_set | ||
| for commit in $COMMITS; do | ||
| commit_set["$commit"]=1 | ||
| done | ||
|
|
||
| # Get the current changelog | ||
| LOG_DONE="$(changelog-d doc/manual/rl-next)" | ||
| is_done(){ | ||
| local nr="$1" | ||
| echo "$LOG_DONE" | grep -E "^- .*/pull/$nr)" | ||
| } | ||
|
|
||
| # Query merged PRs in date range | ||
| gh pr list \ | ||
| --repo NixOS/nix \ | ||
| --state merged \ | ||
| --limit 1000 \ | ||
| --json number,title,author,mergeCommit \ | ||
| --search "merged:$START_DATE..$END_DATE" | \ | ||
| jq -r '.[] | [.number, .mergeCommit.oid, .title, .author.login] | @tsv' | \ | ||
| while IFS=$'\t' read -r pr_num merge_commit _title author; do | ||
| # Check if this PR's merge commit is in our branch | ||
| if [[ -n "${commit_set[$merge_commit]:-}" ]]; then | ||
| # Full detail, not suitable for comment due to mass ping and duplicate title | ||
| # echo "- #$pr_num $_title (@$author)" | ||
| echo "- #$pr_num ($author)" | ||
| if is_done "$pr_num" | ||
| then | ||
| echo " - [x] has note" | ||
| else | ||
| echo " - [ ] has note" | ||
| fi | ||
| echo " - [ ] skip" | ||
| fi | ||
| done | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there was a paginate flag to not have set an arbitrary limit.