Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- What problem does it solve or what feature does it add? -->
## Overview

<!-- Summarize the key changes for release notes. -->
## Release Notes
- TBD: 1st item of release notes
- TBD: 2nd item of release notes

<!-- Add attached issue that this PR solves. -->
## Related
Closes #issue_number
46 changes: 46 additions & 0 deletions .github/workflows/check_pr_release_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#
# Copyright 2022 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Check PR Release Notes

on:
pull_request:
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
branches: [ master ]

concurrency:
group: release-notes-check-${{ github.ref }}
cancel-in-progress: true

jobs:
check-release-notes:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: '3.14'

- name: Check presence of release notes in PR description
uses: AbsaOSS/release-notes-presence-check@8e586b26a5e27f899ee8590a5d988fd4780a3dbf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github-repository: ${{ github.repository }}
pr-number: ${{ github.event.number }}
title: "## [Rr]elease [Nn]otes"
skip-labels: 'no RN'
skip-placeholders: 'TBD'
124 changes: 124 additions & 0 deletions .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
#
# Copyright 2022 ABSA Group Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Draft Release
on:
workflow_dispatch:
inputs:
tag-name:
description: 'Name of git tag to be created, and then draft release created. Syntax: "v[0-9]+.[0-9]+.[0-9]+".'
required: true
from-tag-name:
description: >-
Name of the git tag from which to detect changes from.
Default value: latest tag. Syntax: "v[0-9]+.[0-9]+.[0-9]+".
required: false

permissions:
contents: write
issues: read
pull-requests: read

jobs:
release-draft:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
persist-credentials: false

- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: '3.14'

- name: Check format of received target tag
id: check-version-tag
uses: AbsaOSS/version-tag-check@4145e48bf3f77a5afff2ec9afdd8afb6b53bce34
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github-repository: ${{ github.repository }}
version-tag: ${{ github.event.inputs.tag-name }}

- name: Check format of received from tag
if: ${{ github.event.inputs.from-tag-name }}
id: check-version-from-tag
uses: AbsaOSS/version-tag-check@4145e48bf3f77a5afff2ec9afdd8afb6b53bce34
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
github-repository: ${{ github.repository }}
version-tag: ${{ github.event.inputs.from-tag-name }}
should-exist: true

- name: Generate Release Notes
id: generate_release_notes
uses: AbsaOSS/generate-release-notes@da535383f54a6532adb84e88d3b6e5c7236132df
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
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: 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 }
Comment on lines +77 to +89

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

🧩 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
done

Repository: 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.

Suggested change
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.

warnings: true
print-empty-chapters: false
row-format-issue: '{type}: {number} _{title}_ by {developers} in {pull-requests}'
row-format-pr: '{number} _{title}_ by {developers}'

- name: Create and push tag
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
env:
TAG_NAME: ${{ github.event.inputs.tag-name }}
with:
script: |
const tag = process.env.TAG_NAME;
const ref = `refs/tags/${tag}`;
const sha = context.sha;

await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: ref,
sha: sha
});

console.log(`Tag created: ${tag}`);
github-token: ${{ secrets.GITHUB_TOKEN }}

- 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
Loading