Skip to content

Commit 73b3afe

Browse files
Merge pull request #334 from tpvasconcelos/release-notes
Cleanup release notes
2 parents 476c599 + afd98b1 commit 73b3afe

5 files changed

Lines changed: 102 additions & 2 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ repos:
7575
rev: v0.11.0.1
7676
hooks:
7777
- id: shellcheck
78+
# Exclude zsh scripts (unsupported by shellcheck)
79+
exclude: ^cicd_utils/find-unmentioned-prs\.sh$
7880

7981
# mdformat is not enabled by default, but can be run manually with:
8082
# pre-commit run mdformat --all-files --hook-stage manual

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ prune docs/api/public
3333

3434
# Misc
3535
recursive-include .github *.yml *.yaml
36-
recursive-include cicd_utils README.md *.py
36+
recursive-include cicd_utils README.md *.py *.sh
3737
recursive-include misc *.py *.ipynb *.txt *.png
3838
recursive-include requirements *.txt
3939
recursive-include tests *.py

cicd_utils/find-unmentioned-prs.sh

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#!/usr/bin/env zsh
2+
3+
# Script to find PRs not mentioned in the changelog
4+
#
5+
# Disclaimer: This script was auto-generated by Claude Code.
6+
#
7+
# Usage: ./cicd_utils/find-unmentioned-prs.sh
8+
#
9+
# Note: Take a look at the `all_prs=($(gh pr list ...))` line to see all the filters used to fetch PRs.
10+
#
11+
# Requirements:
12+
# * GitHub CLI (gh) must be installed and authenticated.
13+
# * jq must be installed for JSON parsing.
14+
# * The changelog file must exist at ./docs/reference/changelog.md
15+
# * The script assumes the main branch is named 'main'
16+
# * PRs are referenced in the changelog using the pattern {gh-pr}`PR-NUMBER`
17+
# * The script should be run from the root of the repository
18+
19+
set -e
20+
21+
CHANGELOG_FILE="./docs/reference/changelog.md"
22+
23+
# Check if changelog file exists
24+
if [[ ! -f "$CHANGELOG_FILE" ]]; then
25+
echo "Error: Changelog file not found at $CHANGELOG_FILE"
26+
exit 1
27+
fi
28+
29+
# Check if gh CLI is available
30+
if ! command -v gh &> /dev/null; then
31+
echo "Error: GitHub CLI (gh) is not installed"
32+
exit 1
33+
fi
34+
35+
echo "🔍 Finding PRs not mentioned in changelog..."
36+
echo
37+
38+
# Get all PR numbers from GitHub (both open and closed)
39+
echo "📥 Fetching all PRs from GitHub..."
40+
all_prs=($(gh pr list --state merged --base main --label 'skip news' --search 'merged:>2025-09-01' --limit 100 --json number --jq '.[].number'))
41+
if [[ ${#all_prs[@]} -eq 0 ]]; then
42+
echo "No PRs found in this repository."
43+
exit 0
44+
fi
45+
46+
echo "Found ${#all_prs[@]} total PRs"
47+
48+
# Extract PR numbers mentioned in changelog using the pattern {gh-pr}`PR-NUMBER`
49+
echo "📖 Parsing changelog for mentioned PRs..."
50+
mentioned_prs=($(grep -o '{gh-pr}`[0-9]\+`' "$CHANGELOG_FILE" | sed 's/{gh-pr}`\([0-9]\+\)`/\1/' | sort -n | uniq))
51+
52+
echo "Found ${#mentioned_prs[@]} PRs mentioned in changelog"
53+
echo
54+
55+
# Find PRs not mentioned in changelog
56+
unmentioned_prs=()
57+
58+
for pr in "${all_prs[@]}"; do
59+
if [[ ! " ${mentioned_prs[*]} " =~ " $pr " ]]; then
60+
unmentioned_prs+=($pr)
61+
fi
62+
done
63+
64+
# Display results
65+
if [[ ${#unmentioned_prs[@]} -eq 0 ]]; then
66+
echo "✅ All PRs are mentioned in the changelog!"
67+
else
68+
echo "📋 PRs not mentioned in changelog (${#unmentioned_prs[@]} total):"
69+
echo
70+
71+
for pr in "${unmentioned_prs[@]}"; do
72+
# Get PR title and URL for better readability
73+
pr_info=$(gh pr view "$pr" --json title,url --jq '{title: .title, url: .url}')
74+
pr_title=$(echo "$pr_info" | jq -r '.title')
75+
pr_url=$(echo "$pr_info" | jq -r '.url')
76+
77+
echo " #$pr: $pr_title"
78+
echo " $pr_url"
79+
echo
80+
done
81+
fi

docs/development/release_process.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
You need to have push-access to the project's repository to make releases. Therefore, the following release steps are intended to be used as a reference for maintainers or [collaborators](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/permission-levels-for-a-personal-account-repository#collaborator-access-for-a-repository-owned-by-a-personal-account) with push-access to the repository.
77
:::
88

9-
1. Review the **`## Unreleased changes`** section at the top of the {repo-file}`docs/reference/changelog.md` file and, if necessary, group and/or split entries into relevant subsections (e.g., _Features_, _Docs_, _Bugfixes_, _Security_, etc.). Take a look at previous release notes for guidance and try to keep the format consistent.
9+
1. Review the **`## Unreleased changes`** section at the top of the {repo-file}`docs/reference/changelog.md` file and, if necessary, group and/or split entries into relevant subsections (e.g., _Features_, _Docs_, _Bugfixes_, _Security_, etc.). Take a look at previous release notes for guidance and try to keep the format consistent. You can also use the `./cicd_utils/find-unmentioned-prs.sh` helper script to find merged PRs that were not mentioned in the changelog yet.
1010
2. [Review](https://github.com/tpvasconcelos/ridgeplot/compare) new usages of `.. versionadded::`, `.. versionchanged::`, and `.. deprecated::` directives that were added to the documentation since the last release. If necessary, update the version numbers in these directives to reflect the new release version.
1111
* You can determine the latest release version by running `git describe --tags --abbrev=0` on the `main` branch. Based on this, you can determine the next release version by incrementing the relevant _MAJOR_, _MINOR_, or _PATCH_ numbers.
1212
3. **IMPORTANT:** Remember to switch to the `main` branch and pull the latest changes before proceeding.

docs/reference/changelog.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@ Unreleased changes
1313

1414
- Deprecated the `show_yticklabels` argument in favor of the new more general and flexible `row_labels` argument ({gh-pr}`333`)
1515

16+
### CI/CD
17+
18+
- Add `./cicd_utils/find-unmentioned-prs.sh` helper script to find merged PRs that were not mentioned in the changelog yet ({gh-pr}`334`)
19+
- Bump actions/first-interaction from 1 to 3 ({gh-pr}`331`)
20+
- Bump actions/checkout from 4 to 5 ({gh-pr}`330`)
21+
- Bump actions/download-artifact from 4 to 5 ({gh-pr}`329`)
22+
- Bump sigstore/gh-action-sigstore-python from 3.0.0 to 3.0.1 ({gh-pr}`326`)
23+
- pre-commit autoupdate ({gh-pr}`324`)
24+
25+
### Dependencies
26+
27+
- Remove `importlib_metadata` usage from `conf.py` ({gh-pr}`332`)
28+
1629
---
1730

1831
0.3.2
@@ -23,6 +36,10 @@ Unreleased changes
2336
- Fix regression tests for Plotly 6.0+ by updating the JSON test artifacts ({gh-pr}`313`)
2437
- Add an `OFFLINE`-mode option to the Makefile and make `uv` compulsory for local development ({gh-pr}`322`)
2538

39+
### Documentation
40+
41+
- Bump the Plotly JS version used in Sphinx from 2.35.2 to 3.0.0 ({gh-pr}`317`)
42+
2643
---
2744

2845
0.3.1

0 commit comments

Comments
 (0)