Skip to content

Commit d03740d

Browse files
authored
Adaption of newest Release Notes Generator to the project. (#447)
* Adaption of newest Release Notes Generator to the project. * Update for chapters. * Updating generate-release-notes workflow to the latest version.
1 parent c89ca70 commit d03740d

3 files changed

Lines changed: 56 additions & 36 deletions

File tree

‎.github/pull_request_template.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- What problem does it solve or what feature does it add? -->
2+
## Overview
3+
4+
<!-- Summarize the key changes for release notes. -->
5+
## Release Notes
6+
- TBD: 1st item of release notes
7+
- TBD: 2nd item of release notes
8+
9+
<!-- Add attached issue that this PR solves. -->
10+
## Related
11+
Closes #issue_number

.github/workflows/release-notes-presence-check.yml renamed to .github/workflows/check_pr_release_notes.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,25 @@
1414
# limitations under the License.
1515
#
1616

17-
name: Check PR Release Notes Presence Check
17+
name: Check PR Release Notes
1818

1919
on:
2020
pull_request:
2121
types: [opened, synchronize, reopened, edited, labeled, unlabeled]
2222
branches: [ master ]
2323

24-
env:
25-
SKIP_LABEL: 'no RN'
26-
RLS_NOTES_TAG_REGEX: 'Release Notes:'
24+
concurrency:
25+
group: release-notes-check-${{ github.ref }}
26+
cancel-in-progress: true
2727

2828
jobs:
29-
release-notes-presence-check:
30-
name: Release Notes Presence Check
29+
check-release-notes:
3130
runs-on: ubuntu-latest
3231

3332
steps:
3433
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
3534
with:
36-
python-version: '3.11'
35+
python-version: '3.14'
3736

3837
- name: Check presence of release notes in PR description
3938
uses: AbsaOSS/release-notes-presence-check@8e586b26a5e27f899ee8590a5d988fd4780a3dbf
@@ -42,4 +41,6 @@ jobs:
4241
with:
4342
github-repository: ${{ github.repository }}
4443
pr-number: ${{ github.event.number }}
45-
skip-labels: "no RN"
44+
title: "## [Rr]elease [Nn]otes"
45+
skip-labels: 'no RN'
46+
skip-placeholders: 'TBD'

‎.github/workflows/release_draft.yml‎

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,24 @@
1414
# limitations under the License.
1515
#
1616

17-
name: Release - create draft release
17+
name: Draft Release
1818
on:
1919
workflow_dispatch:
2020
inputs:
2121
tag-name:
2222
description: 'Name of git tag to be created, and then draft release created. Syntax: "v[0-9]+.[0-9]+.[0-9]+".'
2323
required: true
2424
from-tag-name:
25-
description: 'Name of the git tag from which to detect changes from. Default value: latest tag. Syntax: "v[0-9]+.[0-9]+.[0-9]+".'
25+
description: >-
26+
Name of the git tag from which to detect changes from.
27+
Default value: latest tag. Syntax: "v[0-9]+.[0-9]+.[0-9]+".
2628
required: false
2729

30+
permissions:
31+
contents: write
32+
issues: read
33+
pull-requests: read
34+
2835
jobs:
2936
release-draft:
3037
runs-on: ubuntu-latest
@@ -39,7 +46,7 @@ jobs:
3946
with:
4047
python-version: '3.14'
4148

42-
- name: Check format of received tag
49+
- name: Check format of received target tag
4350
id: check-version-tag
4451
uses: AbsaOSS/version-tag-check@4145e48bf3f77a5afff2ec9afdd8afb6b53bce34
4552
env:
@@ -59,44 +66,46 @@ jobs:
5966
version-tag: ${{ github.event.inputs.from-tag-name }}
6067
should-exist: true
6168

62-
- name: Generate release notes
69+
- name: Generate Release Notes
6370
id: generate_release_notes
64-
uses: AbsaOSS/generate-release-notes@da535383f54a6532adb84e88d3b6e5c7236132df
71+
uses: AbsaOSS/generate-release-notes@b4d6e3fafcff2dedc32ec751975fa3d0b3efad67
6572
env:
6673
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6774
with:
75+
release-notes-title: "## [Rr]elease [Nn]otes"
6876
tag-name: ${{ github.event.inputs.tag-name }}
77+
from-tag-name: ${{ github.event.inputs.from-tag-name }}
6978
chapters: |
70-
- {"title": "Entries to skip 🚫", "label": "duplicate"}
71-
- {"title": "Entries to skip 🚫", "label": "invalid"}
72-
- {"title": "Entries to skip 🚫", "label": "wontfix"}
73-
- {"title": "Entries to skip 🚫", "label": "no RN"}
74-
- {"title": "Breaking Changes 💥", "label": "breaking-change"}
75-
- {"title": "Security updates 👮", "label": "security"}
76-
- {"title": "New Features 🎉", "label": "enhancement"}
77-
- {"title": "New Features 🎉", "label": "feature"}
78-
- {"title": "Bugfixes 🛠", "label": "bug"}
79-
- {"title": "Epics 📖", "label": "Epic"}
80-
- {"title": "Infrastructure ⚙️", "label": "infrastructure"}
81-
- {"title": "Silent-live 🤫", "label": "silent-live"}
82-
- {"title": "Documentation 📜", "label": "documentation"}
83-
duplicity-scope: 'service'
84-
duplicity-icon: '🔁'
79+
- { title: Breaking Changes 💥, label: breaking change, order: 10 }
80+
- { title: Epics 🚀, label: epic, order: 20 }
81+
- { title: New Features 🎉, label: enhancement, order: 30 }
82+
- { title: Bugfixes 🛠, label: bug, order: 40 }
83+
- { title: Infrastructure ⚙️, label: infrastructure, order: 50 }
84+
- { title: Spikes 💡, label: spike, order: 60 }
85+
- { title: Agent 🤖, label: Agent, order: 70 }
86+
- { title: DB 🗄️, label: DB, order: 75 }
87+
- { title: Model 🧩, label: Model, order: 80 }
88+
- { title: Server 🖥️, label: Server, order: 85 }
89+
- { title: Reader 📖, label: Reader, order: 90 }
90+
- { title: Entries to skip 🚫, label: duplicate, hidden: true, order: 99 }
91+
- { title: Entries to skip 🚫, label: no RN, hidden: true, order: 99 }
92+
- { title: Silent-live 🤫, catch-open-hierarchy: true, hidden: false }
8593
warnings: true
86-
# skip-release-notes-labels: "no RN,duplicate,invalid,wontfix" I would rather see the chapter, review and remove it manually
8794
print-empty-chapters: false
88-
row-format-issue: '_{title}_ {developers} in {number}'
89-
row-format-pr: '_{title}_ {developers} in {number}'
90-
row-format-link-pr: true
95+
row-format-issue: '{type}: {number} _{title}_ by {developers} in {pull-requests}'
96+
row-format-pr: '{number} _{title}_ by {developers}'
9197
hierarchy: true
98+
row-format-hierarchy-issue: '{type}: {number} _{title}_ by {developers} {progress}'
9299

93-
- name: Create and Push Tag
100+
- name: Create and push tag
94101
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3
102+
env:
103+
TAG_NAME: ${{ github.event.inputs.tag-name }}
95104
with:
96105
script: |
97-
const tag = core.getInput('tag-name')
106+
const tag = process.env.TAG_NAME;
98107
const ref = `refs/tags/${tag}`;
99-
const sha = context.sha; // The SHA of the commit to tag
108+
const sha = context.sha;
100109
101110
await github.rest.git.createRef({
102111
owner: context.repo.owner,
@@ -107,7 +116,6 @@ jobs:
107116
108117
console.log(`Tag created: ${tag}`);
109118
github-token: ${{ secrets.GITHUB_TOKEN }}
110-
tag-name: ${{ github.event.inputs.tag-name }}
111119

112120
- name: Create draft release
113121
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda

0 commit comments

Comments
 (0)