FEAT: Implementing the Release Notes Generator to the project#164
FEAT: Implementing the Release Notes Generator to the project#164tmikula-dev wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR adds a PR template with a "Release Notes" section, a GitHub Actions workflow that checks PR descriptions for release notes on PR events to master, and a manual "Draft Release" workflow that validates tags, generates release notes, creates a git tag, and publishes a draft release. ChangesRelease Notes and Draft Release Workflows
sequenceDiagram
participant Developer
participant GH_Actions as GitHub Actions
participant GH_API as GitHub API
Developer->>GH_Actions: Trigger workflow_dispatch with tag-name
GH_Actions->>GH_Actions: Validate tag format and from-tag-name
GH_Actions->>GH_Actions: Generate release notes with chapters
GH_Actions->>GH_API: Create git tag via github-script
GH_Actions->>GH_API: Create draft release with generated notes
GH_API-->>Developer: Draft release published
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
JaCoCo
|
JaCoCo
|
JaCoCo
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/pull_request_template.md (1)
1-12: ⚡ Quick winDocument the "no RN" label skip option.
The template should inform contributors that they can use the
no RNlabel to skip the release notes check and exclude the PR from generated notes. Consider adding a comment like:<!-- Summarize the key changes for release notes. --> <!-- To skip this check and exclude from release notes, apply the "no RN" label --> ## Release NotesThis aligns with the PR objective to document the label's use and helps contributors understand the skip mechanism configured in both the check and draft workflows.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/pull_request_template.md around lines 1 - 12, Add an inline HTML comment above the "## Release Notes" header in the PR template that tells contributors they can apply the "no RN" label to skip the release-notes check and exclude the PR from generated notes (mention the exact label text: "no RN"); update the existing release notes block to include that comment so CI/checks and the draft workflow users immediately see the skip mechanism..github/workflows/release_draft.yml (1)
115-124: ⚖️ Poor tradeoffConsider using built-in
gh releasecommand.The static analysis tool suggests that
softprops/action-gh-releasefunctionality is already available via the runner's built-inghCLI. Using the built-in command reduces third-party action dependencies.♻️ Optional refactor using gh CLI
- - name: Create draft release - uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - name: ${{ github.event.inputs.tag-name }} - body: ${{ steps.generate_release_notes.outputs.release-notes }} - tag_name: ${{ github.event.inputs.tag-name }} - draft: true - prerelease: false + - name: Create draft release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG_NAME: ${{ github.event.inputs.tag-name }} + RELEASE_NOTES: ${{ steps.generate_release_notes.outputs.release-notes }} + run: | + gh release create "$TAG_NAME" \ + --title "$TAG_NAME" \ + --notes "$RELEASE_NOTES" \ + --draft \ + --repo ${{ github.repository }}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release_draft.yml around lines 115 - 124, The workflow step "Create draft release" currently uses the third-party action softprops/action-gh-release; replace it with a run step that invokes the built-in gh CLI (gh release create) so you remove the external dependency. Update the step named "Create draft release" to run a shell command using gh release create with --title (or name), the tag from github.event.inputs.tag-name, --notes from steps.generate_release_notes.outputs.release-notes, --draft and --prerelease as appropriate, and ensure the GITHUB_TOKEN is provided to the gh CLI via environment (GITHUB_TOKEN) or gh auth setup before the command.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/release_draft.yml:
- Around line 77-89: The release-drafter chapters currently assign the same
label "documentation" to both the "Refactoring" and "Documentation️" chapters
causing documentation PRs to show in both sections; update the "Refactoring"
chapter's label (the entry with title "Refactoring") to a unique label used for
refactoring PRs in this repo (e.g., "refactor" or the actual refactoring label
name), ensuring it no longer uses label: documentation so PRs are categorized
into a single correct chapter.
---
Nitpick comments:
In @.github/pull_request_template.md:
- Around line 1-12: Add an inline HTML comment above the "## Release Notes"
header in the PR template that tells contributors they can apply the "no RN"
label to skip the release-notes check and exclude the PR from generated notes
(mention the exact label text: "no RN"); update the existing release notes block
to include that comment so CI/checks and the draft workflow users immediately
see the skip mechanism.
In @.github/workflows/release_draft.yml:
- Around line 115-124: The workflow step "Create draft release" currently uses
the third-party action softprops/action-gh-release; replace it with a run step
that invokes the built-in gh CLI (gh release create) so you remove the external
dependency. Update the step named "Create draft release" to run a shell command
using gh release create with --title (or name), the tag from
github.event.inputs.tag-name, --notes from
steps.generate_release_notes.outputs.release-notes, --draft and --prerelease as
appropriate, and ensure the GITHUB_TOKEN is provided to the gh CLI via
environment (GITHUB_TOKEN) or gh auth setup before the command.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: de40f288-6604-43ab-aa14-84b62ce6f4ec
📒 Files selected for processing (4)
.github/CODEOWNERS.github/pull_request_template.md.github/workflows/check_pr_release_notes.yml.github/workflows/release_draft.yml
| chapters: | | ||
| - { title: Breaking Changes 💥, label: breaking change, order: 10 } | ||
| - { title: Epics 🚀, label: epic, order: 20 } | ||
| - { title: New Features 🎉, label: enhancement, order: 30 } | ||
| - { title: Bugfixes 🛠, label: bug, order: 40 } | ||
| - { title: Infrastructure ⚙️, label: infrastructure, order: 50 } | ||
| - { title: Refactoring, label: documentation, order: 60 } | ||
| - { title: Documentation️, label: documentation, order: 70 } | ||
| - { title: Core, label: Core, order: 75 } | ||
| - { title: Slick, label: Slick, order: 80 } | ||
| - { title: Ultet, label: Ultet, order: 85 } | ||
| - { title: Entries to skip 🚫, label: duplicate, hidden: true, order: 99 } | ||
| - { title: Entries to skip 🚫, label: no RN, hidden: true, order: 99 } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify all chapter labels exist in the repository
# Extract labels from the workflow file and check repository labels
echo "Checking repository labels..."
# Expected labels from chapters config
expected_labels=("breaking change" "epic" "enhancement" "bug" "infrastructure" "documentation" "Core" "Slick" "Ultet" "duplicate" "no RN")
# Get repository labels
gh label list --repo ${{ github.repository }} --limit 100 --json name --jq '.[].name' > /tmp/repo_labels.txt
# Check each expected label
for label in "${expected_labels[@]}"; do
if grep -Fxq "$label" /tmp/repo_labels.txt; then
echo "✓ Label exists: $label"
else
echo "✗ Missing label: $label"
fi
doneRepository: AbsaOSS/fa-db
Length of output: 1048
Fix duplicate documentation label in release-drafter chapters so PRs don’t appear in multiple sections.
In .github/workflows/release_draft.yml, both the Refactoring and Documentation️ chapters use label: documentation, so any PR labeled documentation can be included in both chapters.
🔧 Proposed fix (use a distinct refactoring label)
- { title: Bugfixes 🛠, label: bug, order: 40 }
- { title: Infrastructure ⚙️, label: infrastructure, order: 50 }
- - { title: Refactoring, label: documentation, order: 60 }
+ - { title: Refactoring, label: refactoring, order: 60 }
- { title: Documentation️, label: documentation, order: 70 }Make sure the replacement label matches the label name actually used for refactoring PRs in the repo.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| chapters: | | |
| - { title: Breaking Changes 💥, label: breaking change, order: 10 } | |
| - { title: Epics 🚀, label: epic, order: 20 } | |
| - { title: New Features 🎉, label: enhancement, order: 30 } | |
| - { title: Bugfixes 🛠, label: bug, order: 40 } | |
| - { title: Infrastructure ⚙️, label: infrastructure, order: 50 } | |
| - { title: Refactoring, label: documentation, order: 60 } | |
| - { title: Documentation️, label: documentation, order: 70 } | |
| - { title: Core, label: Core, order: 75 } | |
| - { title: Slick, label: Slick, order: 80 } | |
| - { title: Ultet, label: Ultet, order: 85 } | |
| - { title: Entries to skip 🚫, label: duplicate, hidden: true, order: 99 } | |
| - { title: Entries to skip 🚫, label: no RN, hidden: true, order: 99 } | |
| chapters: | | |
| - { title: Breaking Changes 💥, label: breaking change, order: 10 } | |
| - { title: Epics 🚀, label: epic, order: 20 } | |
| - { title: New Features 🎉, label: enhancement, order: 30 } | |
| - { title: Bugfixes 🛠, label: bug, order: 40 } | |
| - { title: Infrastructure ⚙️, label: infrastructure, order: 50 } | |
| - { title: Refactoring, label: refactoring, order: 60 } | |
| - { title: Documentation️, label: documentation, order: 70 } | |
| - { title: Core, label: Core, order: 75 } | |
| - { title: Slick, label: Slick, order: 80 } | |
| - { title: Ultet, label: Ultet, order: 85 } | |
| - { title: Entries to skip 🚫, label: duplicate, hidden: true, order: 99 } | |
| - { title: Entries to skip 🚫, label: no RN, hidden: true, order: 99 } |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release_draft.yml around lines 77 - 89, The
release-drafter chapters currently assign the same label "documentation" to both
the "Refactoring" and "Documentation️" chapters causing documentation PRs to
show in both sections; update the "Refactoring" chapter's label (the entry with
title "Refactoring") to a unique label used for refactoring PRs in this repo
(e.g., "refactor" or the actual refactoring label name), ensuring it no longer
uses label: documentation so PRs are categorized into a single correct chapter.
Overview
This pull request introduces improvements to the release management process by adding structured templates and automating checks for release notes in pull requests. It also adds a workflow to automate the drafting of releases, including release notes generation and tagging.
Release Notes
Related
Closes #158
Summary by CodeRabbit