-
Notifications
You must be signed in to change notification settings - Fork 35
MTV - automation of Release Notes #864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andydub97
wants to merge
3
commits into
kubev2v:main
Choose a base branch
from
andydub97:release-notes-automation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| # Quick Start Guide - Release Notes Generator | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Python 3.6+ | ||
| - Git | ||
| - CSV files exported from JIRA | ||
|
|
||
| ## Step-by-Step Usage | ||
|
|
||
| ### 1. Export JIRA Tickets | ||
|
|
||
| Export your JIRA tickets to CSV format with these columns: | ||
|
|
||
| **Resolved Issues CSV:** | ||
| - `Issue Key` (e.g., MTV-3915) | ||
| - `Summary` | ||
| - `Description` | ||
|
|
||
| **Known Issues CSV:** | ||
| - `Issue Key` (e.g., MTV-3116) | ||
| - `Summary` | ||
| - `Description` | ||
| - `Workaround` (optional) | ||
|
|
||
| ### 2. Run the Script | ||
|
|
||
| ```bash | ||
| python3 scripts/generate_release_notes.py | ||
| ``` | ||
|
|
||
| ### 3. Follow the Prompts | ||
|
|
||
| 1. **Select base branch**: Choose the branch to create the release notes branch from | ||
| 2. **Enter MTV version**: e.g., `2.11.1` | ||
| 3. **Provide resolved issues CSV path**: Full path to your CSV file | ||
| 4. **Provide known issues CSV path**: Full path to your CSV file | ||
|
|
||
| ### 4. Review Generated Files | ||
|
|
||
| The script creates: | ||
| - New git branch: `MTV-RN-2.11.1` | ||
| - `documentation/modules/rn-2-11.adoc` | ||
| - `documentation/modules/rn-2-11-0-resolved-issues.adoc` | ||
| - `documentation/modules/known-issues-2-11.adoc` | ||
| - Updated `documentation/doc-Release_notes/master.adoc` | ||
|
|
||
| ### 5. Commit and Push | ||
|
|
||
| ```bash | ||
| git add . | ||
| git commit -m "Add release notes for MTV 2.11.1" | ||
| git push origin MTV-RN-2.11.1 | ||
| ``` | ||
|
|
||
| ## Example CSV Format | ||
|
|
||
| See `sample_resolved_issues.csv` and `sample_known_issues.csv` for examples. | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| - **Branch already exists**: The script will ask if you want to use the existing branch | ||
| - **Version already in master.adoc**: The script will warn you and ask to continue | ||
| - **CSV parsing errors**: Check that your CSV has the required columns (Issue Key, Summary, Description) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,122 @@ | ||
| # Release Notes Generator | ||
|
|
||
| This script automates the generation of release notes from JIRA ticket exports. It creates a new git branch and generates all necessary release notes files. | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| python3 scripts/generate_release_notes.py | ||
| ``` | ||
|
|
||
| The script will prompt you for: | ||
| 1. **Base branch selection**: Choose from available git branches or enter a custom branch name (the new branch will be created from this) | ||
| 2. **MTV version**: Enter the version number (e.g., `2.11.1`) | ||
| 3. **Resolved issues CSV**: Path to CSV file containing resolved JIRA tickets | ||
| 4. **Known issues CSV**: Path to CSV file containing known issues JIRA tickets | ||
|
|
||
| ## What the Script Does | ||
|
|
||
| 1. **Creates a new git branch**: `MTV-RN-<version>` (e.g., `MTV-RN-2.11.0`) | ||
| 2. **Generates release notes files**: | ||
| - `rn-{major-version}.adoc` - Main release notes header (e.g., `rn-2-11.adoc`) | ||
| - `rn-{version}-resolved-issues.adoc` - Resolved issues (e.g., `rn-2-11-0-resolved-issues.adoc`) | ||
| - `known-issues-{major-version}.adoc` - Known issues (e.g., `known-issues-2-11.adoc`) | ||
| 3. **Updates master.adoc**: Automatically updates `documentation/doc-Release_notes/master.adoc` to include the new modules | ||
|
|
||
| ## JIRA CSV Export Format | ||
|
|
||
| ### Recommended Format | ||
|
|
||
| When exporting from JIRA, include the following columns: | ||
|
|
||
| **For Resolved Issues:** | ||
| - `Issue Key` (e.g., MTV-3915) | ||
| - `Summary` or `Title` | ||
| - `Description` | ||
|
|
||
| **For Known Issues:** | ||
| - `Issue Key` (e.g., MTV-3116) | ||
| - `Summary` or `Title` | ||
| - `Description` | ||
| - `Workaround` (optional but recommended) | ||
|
|
||
| ### CSV Column Names | ||
|
|
||
| The script automatically detects common column name variations: | ||
| - **Issue Key**: `Issue Key`, `Key`, `Issue`, `Ticket`, `JIRA Key` | ||
| - **Summary**: `Summary`, `Title`, `Subject`, `Name` | ||
| - **Description**: `Description`, `Details`, `Body` | ||
| - **Workaround**: `Workaround`, `Work Around`, `Resolution`, `Solution` | ||
|
|
||
| ### Example CSV Structure | ||
|
|
||
| ```csv | ||
| Issue Key,Summary,Description,Workaround | ||
| MTV-3915,Target cluster namespaces now visible,Before this update, during cross-cluster live migration...,"" | ||
| MTV-3116,Forklift console plugin fails to load,When MTV 2.9.1 is deployed on an IPv6-only...,Deploy MTV on dual-stack or IPv4 clusters | ||
| ``` | ||
|
|
||
| ## Output | ||
|
|
||
| The script: | ||
| - Creates a new git branch: `MTV-RN-<version>` | ||
| - Generates AsciiDoc files in `documentation/modules/`: | ||
| - `rn-{major-version}.adoc` (e.g., `rn-2-11.adoc`) | ||
| - `rn-{version}-resolved-issues.adoc` (e.g., `rn-2-11-0-resolved-issues.adoc`) | ||
| - `known-issues-{major-version}.adoc` (e.g., `known-issues-2-11.adoc`) | ||
| - Updates `documentation/doc-Release_notes/master.adoc` automatically | ||
|
|
||
| ## Next Steps | ||
|
|
||
| After running the script: | ||
|
|
||
| 1. **Review the generated files** in `documentation/modules/` | ||
| 2. **Add any additional content** if needed (e.g., new features section) | ||
| 3. **Commit your changes**: | ||
| ```bash | ||
| git add . | ||
| git commit -m "Add release notes for MTV {version}" | ||
| ``` | ||
| 4. **Push the branch**: | ||
| ```bash | ||
| git push origin MTV-RN-{version} | ||
| ``` | ||
| 5. **Create a pull request** with the new release notes branch | ||
|
|
||
| ## Exporting from JIRA | ||
|
|
||
| ### Steps to Export CSV from JIRA: | ||
|
|
||
| 1. Navigate to your JIRA project (e.g., MTV) | ||
| 2. Use the search/filter to find issues: | ||
| - For resolved issues: Filter by `Status = Resolved` or `Status = Closed` | ||
| - For known issues: Filter by `Labels = Known Issue` or similar | ||
| 3. Click **Export** → **Export CSV (Current fields)** | ||
| 4. Ensure the export includes: | ||
| - Issue Key | ||
| - Summary | ||
| - Description | ||
| - (For known issues) Workaround field if available | ||
|
|
||
| ### Alternative: Using JIRA Query Language (JQL) | ||
|
|
||
| You can also export using JQL queries: | ||
| - Resolved issues: `project = MTV AND status = Resolved AND fixVersion = "2.11.1"` | ||
| - Known issues: `project = MTV AND labels = "known-issue" AND fixVersion = "2.11.1"` | ||
|
|
||
| ## Troubleshooting | ||
|
|
||
| **Issue**: Script can't find issue keys | ||
| - **Solution**: Ensure your CSV has a column named `Issue Key`, `Key`, or `Issue` | ||
|
|
||
| **Issue**: Descriptions are empty | ||
| - **Solution**: Check that your CSV export includes the `Description` column | ||
|
|
||
| **Issue**: Workarounds not appearing | ||
| - **Solution**: Add a `Workaround` column to your known issues CSV, or manually edit the generated file | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Python 3.6+ | ||
| - Git (for branch detection) | ||
| - CSV files exported from JIRA | ||
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anarnold97 I'm not sure if a wildcard like "2.11.*" is an option here in your script, but I know it works in Jira queries. It's just that if a known issue is in a release, it won't have that release as a fix version because the fix is targeted for a later release, e.g. an issue is a known issue in 2.11.1. The fix is targeted for 2.11.3. The Jira won't have 2.11.1 as the fix version. It might have 2.11.3 as the fix version or something like or 2.11.z if the fix version isn't determined yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing to be aware of capturing is known issues that are updated to bug fixes, e.g. an issue might be a known issue for three releases in a row and then be updated to bug fix when it's finally resolved. There's no need to create a separate Jira for the bug fix, just update the release note type and description from known issue to bug fix in the original Jira.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test Jira filter for 2.11: https://issues.redhat.com/issues/?filter=12490270
with test Jira query:
project = "Migration Toolkit for Virtualization" AND "Release Note Type" not in (---, "Release Note Not Required", "CVE - Common Vulnerabilities and Exposures") AND fixVersion = 2.11.1 OR ("Release Note Type" = "Known issue" AND fixVersion ~ "2.11.*")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test 2 Jira filter with AND labels = release-note-req added (optional)
https://issues.redhat.com/issues/?filter=12490271
with test Jira query:
project = "Migration Toolkit for Virtualization" AND labels = release-note-req AND "Release Note Type" not in (---, "Release Note Not Required", "CVE - Common Vulnerabilities and Exposures") AND fixVersion = 2.11.1 OR ("Release Note Type" = "Known issue" AND fixVersion ~ "2.11.*")