Skip to content
Merged
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
18 changes: 1 addition & 17 deletions .github/workflows/check_pr_release_notes.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2025 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:
Expand All @@ -28,7 +12,7 @@ jobs:
steps:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: '3.13'
python-version: '3.14'

- name: Check presence of release notes in PR description
uses: AbsaOSS/release-notes-presence-check@8e586b26a5e27f899ee8590a5d988fd4780a3dbf
Expand Down
79 changes: 36 additions & 43 deletions .github/workflows/release_draft.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2025 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:
Expand All @@ -22,7 +6,9 @@ on:
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]+".'
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

jobs:
Expand All @@ -36,9 +22,9 @@ jobs:

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

- name: Check Format of Received Tag
- name: Check format of received target tag
id: check-version-tag
uses: AbsaOSS/version-tag-check@4145e48bf3f77a5afff2ec9afdd8afb6b53bce34
env:
Expand All @@ -47,7 +33,7 @@ jobs:
github-repository: ${{ github.repository }}
version-tag: ${{ github.event.inputs.tag-name }}

- name: Check Format of Received From Tag
- 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
Expand All @@ -60,55 +46,62 @@ jobs:

- name: Generate Release Notes
id: generate_release_notes
uses: AbsaOSS/generate-release-notes@B90223510d1704301a36a36f0d86a72a0e72f0cf
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": "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}'
Comment on lines +53 to +67
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.


- name: Create and Push Tag
- 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 tag = process.env.TAG_NAME;
const ref = `refs/tags/${tag}`;
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.

owner: context.repo.owner,
repo: context.repo.repo,
tag: tag,
message: tagMessage,
object: sha,
type: 'commit',
tagger: {
name: context.actor,
email: `${context.actor}@users.noreply.github.com`,
date: new Date().toISOString()
}
});

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

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

- name: Create Draft Release
- name: Create draft release
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down