Automatically generate release notes when creating new release#8567
Automatically generate release notes when creating new release#8567sssd-bot wants to merge 4 commits intoSSSD:masterfrom
Conversation
Add a bash script to extract and list resolved GitHub issues from git commit history. The script searches for "Resolves:" references in commit messages between two git refs and outputs a formatted list of closed issues. Features: - Accepts --from <ref> (required) and --to <ref> (defaults to HEAD) - Supports multiple output formats via --format: plain, rst, md - Uses gh CLI to fetch issue details (number, title, state) - Filters to only include closed issues - Outputs formatted list with issue number, URL, and title 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Generate release notes from commit messages: ./scripts/generate-release-notes.py --from FROM --to TO --version VERSION --format md|rst Co-Authored-By: Claude <noreply@anthropic.com>
This scripts prepares a release notes for sssd.io.
The release workflow is extended to automatically generate release notes and open a draft pull request against sssd.io.
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive set of scripts to automate the SSSD release notes generation process, including tools for extracting fixed issues from git logs, parsing commit tags, and submitting documentation pull requests. The review feedback highlights several functional bugs, such as incorrect script references, undefined variables, and shell syntax errors. It also identifies a logic error in argument validation and a security concern regarding the handling of GitHub tokens in temporary files.
| GROUP_END | ||
|
|
||
| GROUP_START "Generate release notes" | ||
| ./scripts/full-release-notes.sh --from "$prev_version" --to HEAD --version "$version" > "/tmp/sssd-$version.rst" |
There was a problem hiding this comment.
The script name is incorrect. It should be generate-full-release-notes.sh to match the file added in this pull request.
| ./scripts/full-release-notes.sh --from "$prev_version" --to HEAD --version "$version" > "/tmp/sssd-$version.rst" | |
| ./scripts/generate-full-release-notes.sh --from "$prev_version" --to HEAD --version "$version" > "/tmp/sssd-$version.rst" |
| esac | ||
| done | ||
|
|
||
| notes=`$scriptdir/release-notes.py --from $FROM --to $TO --version $VERSION --format $FORMAT` |
There was a problem hiding this comment.
The script name is incorrect. It should be generate-release-notes.py to match the file added in this pull request.
| notes=`$scriptdir/release-notes.py --from $FROM --to $TO --version $VERSION --format $FORMAT` | |
| notes=`$scriptdir/generate-release-notes.py --from $FROM --to $TO --version $VERSION --format $FORMAT` |
| echo "" | ||
| echo ".. code-block:: release-notes-shortlog" | ||
| echo "" | ||
| echo " $ git shortlog --pretty=format:"%h %s" -w0,4 $FROM..$TO" |
There was a problem hiding this comment.
The double quotes inside the echo string are not escaped, which will cause a syntax error or unexpected output formatting in the generated release notes.
| echo " $ git shortlog --pretty=format:"%h %s" -w0,4 $FROM..$TO" | |
| echo " $ git shortlog --pretty=format:\"%h %s\" -w0,4 $FROM..$TO" |
| RN_BRANCH_NAME="$OWNER-$REPOSITORY-relnotes-$VERSION" | ||
|
|
||
| echo "GitHub Repository: $OWNER/$REPOSITORY" | ||
| echo "Target Branch: $TARGET_BRANCH" |
| if [ "$#" -ne 2 ] && [ "$#" -ne 5 ]; then | ||
| echo "Usage: $0 <branch> <version> <prev-version> [<github-repo> <git-remote>]" >&2 |
There was a problem hiding this comment.
The argument count check is inconsistent with the usage message. Since $prev_version is now required for release notes generation, the script should require at least 3 arguments to avoid passing an empty reference to the generation scripts.
| if [ "$#" -ne 2 ] && [ "$#" -ne 5 ]; then | |
| echo "Usage: $0 <branch> <version> <prev-version> [<github-repo> <git-remote>]" >&2 | |
| if [ "$#" -ne 3 ] && [ "$#" -ne 5 ]; then | |
| echo "Usage: $0 <branch> <version> <prev-version> [<github-repo> <git-remote>]" >&2 |
| echo $FORK_TOKEN > .token | ||
| gh auth login --with-token < .token | ||
| rm -f .token |
There was a problem hiding this comment.
This will generate release notes and open a draft pull request against sssd.io
This will make the release process automated, after the workflow is run: