Skip to content

Commit 92d2f3f

Browse files
authored
RHIDP-6391 Release notes script to stop using the issue title (redhat-developer#980)
* RHIDP-6391 Release notes script to not use the issue title for the release notes section Signed-off-by: Fabrice Flore-Thébault <[email protected]> * Update modules/release-notes/README.adoc * Update modules/release-notes/README.adoc --------- Signed-off-by: Fabrice Flore-Thébault <[email protected]>
1 parent 7b4379c commit 92d2f3f

4 files changed

+52
-9
lines changed

modules/release-notes/README.adoc

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
= Single-sourcing release notes
2+
3+
== Single-sourcing general purpose release notes
4+
5+
The general purpose release notes content is single-sourced from link:https://issues.redhat.com/browse/RHIDP[the JIRA project].
6+
7+
.Prerequisites
8+
* In link:https://issues.redhat.com/secure/Dashboard.jspa?selectPageId=12364101#SIGwKWmOqDCVBoapBCJiDqhoiKInaroYEg9j2PldSYMUcQVVVdrFHVDUxs1uBtQolXVZgDTdZwjXSCNOA1u11Xeog9Xjb100DUNCh2jwi0TVgzWteeg2FC1TmbT1TUrftGiFHa2CjQtp2TX1DnIGgGCIgEKI+iQfrUlV2AvkJQA[the JIRA project]:
9+
** *Fix Version/s* is set.
10+
** *Release Notes Text* is set using following format: a level 0 title followed by descriptive content, such as:
11+
+
12+
.*Release Notes Text* sample
13+
----
14+
= Configurable PVC mounting for containers
15+
16+
Previously, the default Persistent Volume Claim (PVC) could only be mounted to the Backstage container. With this update, you can now configure which container(s) the PVC should be mounted to, providing greater flexibility in storage management.
17+
----
18+
** *Release Notes Type* is set to `Enhancement`, `Feature`, `Removed Functionality`, `Deprecated Functionality`, `Developer Preview`, `Technology Preview`, `Known Issue`, or `Bug Fix`.
19+
** *Release Notes Status* is set to `Done`.
20+
21+
* On the single-sourcing environment: Bash, Git, Python, and Pip are installed.
22+
23+
.Procedure
24+
. Verify the `product-version` and `product-bundle-version` attributes values in the `artifacts/attributes.adoc` file.
25+
26+
. Open a terminal and change directory to the Git repository root.
27+
28+
. Install required python modules.
29+
+
30+
----
31+
$ pip3 install --requirement requirements.txt
32+
----
33+
34+
. Single-source content from JIRA.
35+
+
36+
----
37+
$ python modules/release-notes/single-source-release-notes.py
38+
----
39+
40+
.Verification
41+
* Verify the changed content:
42+
+
43+
----
44+
$ git diff
45+
----
46+

modules/release-notes/single-source-release-notes-template.adoc.jinja

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
== {{ title }} in {{ fixversion }}
1111
{% endif %}
1212
[id="{{ issue.fields.customfield_12320850 | lower | replace(" ", "-") }}-{{ issue.key | lower }}"]
13-
=== {{ issue.fields.summary }}
14-
{% else -%}
13+
==
14+
{%- else -%}
1515
[id="{{ issue.fields.customfield_12320850 | lower | replace(" ", "-") }}-{{ issue.key | lower }}"]
16-
== {{ issue.fields.summary }}
17-
{% endif %}
16+
=
17+
{%- endif -%}
1818
{{ issue.fields.customfield_12317313 }}
1919
{% if template == "with-jira-link" or template == "with-z-stream-section" %}
2020

modules/release-notes/single-source-release-notes.jira2asciidoc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ sections:
6969
- id: fixed-issues
7070
title: Fixed issues
7171
description: |
72-
This section lists issues fixed in {product} {product-version}.
72+
This section lists issues fixed in {product} {product-version} that have a significant impact on users.
7373
query: >
7474
project = "Red Hat Internal Developer Platform"
7575
AND "Release Note Status" = "Done"

modules/release-notes/single-source-release-notes.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,8 @@
4747
items = lines.rsplit(':', 2)
4848
attributes[items[1]] = items[2].strip()
4949

50-
product_version_minor = attributes["product-version"]
50+
product_version_minor = attributes["product-version"] + ".0"
5151
product_version_patch = attributes["product-bundle-version"]
52-
# Until 1.4 at least, Jira has no z-stream 0. Use the y-stream instead.
53-
if re.search('.0$',product_version_patch):
54-
product_version_patch = product_version_minor
5552

5653
# Load the configuration file to get the sections and their Jira queries.
5754
with open(config_file) as file:

0 commit comments

Comments
 (0)