Skip to content

Adapting the release notes workflow to the project.#158

Merged
tmikula-dev merged 1 commit into
masterfrom
feature/156-adapting-the-release-notes-workflow
May 22, 2026
Merged

Adapting the release notes workflow to the project.#158
tmikula-dev merged 1 commit into
masterfrom
feature/156-adapting-the-release-notes-workflow

Conversation

@tmikula-dev
Copy link
Copy Markdown
Collaborator

@tmikula-dev tmikula-dev commented May 22, 2026

Overview

This pull request updates the GitHub Actions workflows for release note checks and automated release drafting. The main changes include updating Python versions, improving tag creation, updating the release notes generation action and its configuration, and making minor improvements to workflow step naming and documentation.

Release Notes

  • Adapting Release Notes workflow solution to this project

Related

Closes #156

Summary by CodeRabbit

  • Chores
    • Updated Python version to 3.14 in continuous integration workflows
    • Refined release notes generation configuration
    • Improved tag creation process in release workflow

Review Change Stack

@tmikula-dev tmikula-dev self-assigned this May 22, 2026
@tmikula-dev tmikula-dev added the enhancement New feature or request label May 22, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Walkthrough

Two GitHub release automation workflows are updated: Python runtime upgraded to 3.14, license headers removed, release notes action configuration revised with new chapters and row formats, tag creation switched to annotated tags via API, and step naming standardized.

Changes

Release Automation Workflows

Layer / File(s) Summary
Python Runtime and License Headers
.github/workflows/check_pr_release_notes.yml, .github/workflows/release_draft.yml
Python version upgraded from 3.13 to 3.14 in both workflows. Apache license header comments removed from release_draft.yml file header.
Release Notes Generation Configuration
.github/workflows/release_draft.yml
AbsaOSS/generate-release-notes action version updated. Chapter structure revised with new labels, ordering changes, and a hidden "No entry" chapter added. Template strings for row-format-issue and row-format-pr modified.
Tag Creation Logic Enhancement
.github/workflows/release_draft.yml
GitHub Script step refactored to create annotated tag via github.rest.git.createTag API and then create ref using the resulting tag SHA, replacing direct ref creation pointing at context.sha.
Workflow Inputs and Step Naming
.github/workflows/release_draft.yml
Workflow input description for from-tag-name reformatted as multiline YAML string. Step name casing standardized across "Check tag format" and "Create Draft Release" steps.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

  • Addresses objectives from #156 (Implement Generate Release Notes Workflow) by updating the workflows with current recommended generator configuration, adjusting chapter titles/labels, and refining tag creation logic.

Possibly related PRs

  • AbsaOSS/EventGate#100: Modifies the same release automation workflows with updates to actions/setup-python version and release notes/tag generation steps.

Suggested reviewers

  • lsulak
  • petr-pokorny-absa
  • oto-macenauer-absa

Poem

🐰 Our workflows leap to version three-fourteen,
With annotated tags so clean,
Release notes dance in chapters bright,
Headers removed, the code feels light!
hops through the CI pipeline

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is vague and generic, referring to 'adapting the release notes workflow' without clearly specifying what was changed. Use a more specific title that details key changes, e.g., 'Update release workflows: Python 3.14, improve tag creation, and update release notes configuration'.
Linked Issues check ❓ Inconclusive Changes partially meet issue #156 requirements: workflows are updated and Python versions improved, but PR template addition is missing and action SHA pinning is not verified. Verify action SHA pinning is applied, add .github/pull_request_template.md as required by issue #156, and ensure all referenced labels exist.
Out of Scope Changes check ❓ Inconclusive Removing license headers from workflows appears to be an incidental cleanup not directly required by issue #156's scope for implementing release notes workflows. Clarify whether removing Apache license headers is intentional and scope-aligned, or if it should be reverted to focus on issue #156 objectives.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description includes all required sections (Overview, Release Notes, Related) and provides sufficient context about the changes being made.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/156-adapting-the-release-notes-workflow

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release_draft.yml (1)

69-113: ⚡ Quick win

Declare the token scopes explicitly for the write path.

These steps need contents: write, but the job currently inherits whatever the repository default GITHUB_TOKEN permissions happen to be. That makes release drafting settings-dependent and can fail outright when the default is read-only.

Suggested change
 jobs:
   release-draft:
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
+      pull-requests: read
+      issues: read
     steps:
🤖 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 69 - 113, Add explicit
GITHUB_TOKEN permissions for the steps that create tags and draft the release by
setting the job or workflow permissions to include contents: write so the Create
and push tag step (which calls github.rest.git.createTag and
github.rest.git.createRef) and the Create draft release step
(softprops/action-gh-release) have write access; update the workflow top-level
or job-level permissions to include "contents: write" rather than relying on
repository defaults.
🤖 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 53-67: The release notes workflow (release-notes-title/chapters in
release_draft.yml) doesn't exclude PRs labeled "no RN", causing them to show up;
mirror the behavior from check_pr_release_notes.yml by adding a hidden chapter
entry for the "no RN" label (e.g., add an item like { title: No RN 🚫, label: no
RN, hidden: true, order: 99 } or include "no RN" in the existing hidden chapter)
so PRs with label "no RN" are omitted from generated notes; update the chapters
list accordingly to reference the exact label string used by
check_pr_release_notes.yml.

---

Nitpick comments:
In @.github/workflows/release_draft.yml:
- Around line 69-113: Add explicit GITHUB_TOKEN permissions for the steps that
create tags and draft the release by setting the job or workflow permissions to
include contents: write so the Create and push tag step (which calls
github.rest.git.createTag and github.rest.git.createRef) and the Create draft
release step (softprops/action-gh-release) have write access; update the
workflow top-level or job-level permissions to include "contents: write" rather
than relying on repository defaults.
🪄 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: a348e78b-141b-4607-b946-0cd44757243d

📥 Commits

Reviewing files that changed from the base of the PR and between a0b6f6f and 4cd1a27.

📒 Files selected for processing (2)
  • .github/workflows/check_pr_release_notes.yml
  • .github/workflows/release_draft.yml

Comment on lines +53 to +67
release-notes-title: "## [Rr]elease [Nn]otes"
tag-name: ${{ github.event.inputs.tag-name }}
from-tag-name: ${{ github.event.inputs.from-tag-name }}
chapters: |
- {"title": "Entries to skip 🚫", "label": "duplicate"}
- {"title": "Entries to skip 🚫", "label": "invalid"}
- {"title": "Entries to skip 🚫", "label": "wontfix"}
- {"title": "Entries to skip 🚫", "label": "no RN"}
- {"title": "Breaking Changes 💥", "label": "breaking change"}
- {"title": "Security updates 👮", "label": "security"}
- {"title": "New Features 🎉", "label": "enhancement"}
- {"title": "Bugfixes 🛠", "label": "bug"}
- {"title": "Epics 📖", "label": "epic"}
- {"title": "Infrastructure ⚙️", "label": "infrastructure"}
- {"title": "Silent-live 🤫", "label": "silent live"}
- {"title": "Documentation 📜", "label": "documentation"}
duplicity-scope: 'none'
- { title: Breaking Changes 💥, label: breaking change, order: 10 }
- { title: New Features 🎉, label: enhancement, order: 20 }
- { title: Bugfixes 🛠, label: bug, order: 30 }
- { title: Infrastructure ⚙️, label: infrastructure, order: 40 }
- { title: Refactoring 🚀, label: refactoring, order: 50 }
- { title: Documentation 📜, label: documentation, order: 60 }
- { title: No entry 🚫, label: duplicate, hidden: true, order: 99 }
warnings: true
skip-release-notes-labels: "no RN,duplicate,invalid,wontfix"
print-empty-chapters: false
row-format-issue: '_{title}_ {developers} in {number}'
row-format-pr: '_{title}_ {developers} in {number}'
row-format-link-pr: true
hierarchy: true
row-format-issue: '{type}: {number} _{title}_ by {developers} in {pull-requests}'
row-format-pr: '{number} _{title}_ by {developers}'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== List workflows ==="
ls -la .github/workflows || true

echo
echo "=== release_draft.yml (lines 40-90) ==="
nl -ba .github/workflows/release_draft.yml | sed -n '40,90p'

echo
echo "=== check_pr_release_notes.yml (find skip-labels + relevant section) ==="
# If file name differs, locate it
if [ -f .github/workflows/check_pr_release_notes.yml ]; then
  nl -ba .github/workflows/check_pr_release_notes.yml | sed -n '1,200p'
else
  echo "File not found: .github/workflows/check_pr_release_notes.yml"
  echo "Searching for 'check_pr_release_notes' and 'skip-labels'..."
  rg -n "check_pr_release_notes|skip-labels" .github/workflows -S || true
fi

echo
echo "=== Search for 'skip-labels' in workflows ==="
rg -n "skip-labels" .github/workflows -S || true

echo
echo "=== Search for 'duplicate' label usage in release note workflows ==="
rg -n "duplicate" .github/workflows -S || true

echo
echo "=== Search for release-notes generator config (chapters/hidden) ==="
rg -n "release-notes-title|chapters:|print-empty-chapters|row-format-issue|row-format-pr|hidden:" .github/workflows -S || true

Repository: AbsaOSS/EventGate

Length of output: 576


🏁 Script executed:

#!/bin/bash
set -euo pipefail

show_with_numbers() {
  local file="$1"
  local start="$2"
  local end="$3"
  awk -v s="$start" -v e="$end" '{if(NR>=s && NR<=e) printf "%4d\t%s\n", NR, $0}' "$file"
}

echo "=== release_draft.yml (around chapters/hidden config) ==="
show_with_numbers .github/workflows/release_draft.yml 1 200 | sed -n '1,160p'
echo
echo "=== release_draft.yml (requested lines 40-120) ==="
show_with_numbers .github/workflows/release_draft.yml 40 120
echo
echo "=== check_pr_release_notes.yml (whole file, small) ==="
show_with_numbers .github/workflows/check_pr_release_notes.yml 1 250
echo
echo "=== Search for key strings ==="
rg -n "skip-labels|hidden:|duplicate|no RN|release-notes-title|chapters:" .github/workflows -S || true

Repository: AbsaOSS/EventGate

Length of output: 9948


Align the release-notes exclusion label across workflows.

check_pr_release_notes.yml skips PRs with skip-labels: 'no RN', but release_draft.yml only hides label: duplicate (hidden: true) and has no corresponding hidden chapter for no RN. As a result, PRs labeled no RN may still appear in generated release notes under other (visible) chapter labels.

🤖 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 53 - 67, The release notes
workflow (release-notes-title/chapters in release_draft.yml) doesn't exclude PRs
labeled "no RN", causing them to show up; mirror the behavior from
check_pr_release_notes.yml by adding a hidden chapter entry for the "no RN"
label (e.g., add an item like { title: No RN 🚫, label: no RN, hidden: true,
order: 99 } or include "no RN" in the existing hidden chapter) so PRs with label
"no RN" are omitted from generated notes; update the chapters list accordingly
to reference the exact label string used by check_pr_release_notes.yml.

Copy link
Copy Markdown
Collaborator

@oto-macenauer-absa oto-macenauer-absa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

const sha = context.sha; // The SHA of the commit to tag
const tagMessage = `${tag} released by GitHub Action`;

const tagObject = await github.rest.git.createTag({
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the tag exists?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: The tag already exists in the repository.

@tmikula-dev tmikula-dev merged commit fcd4d6a into master May 22, 2026
12 checks passed
@tmikula-dev tmikula-dev deleted the feature/156-adapting-the-release-notes-workflow branch May 22, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Generate Release Notes Workflow

2 participants