A Python package that parses a specific PR template given a list of PRs and generates release notes form them.
Project description
# Setup
`pip install release-notes-generator`
This will provide a self-documenting command line tool under the name:
`release_notes`
You can ask for help as you would expect: `release_notes --help`
You will need to set your github access token to use it:
`export GITHUB_API_TOKEN = <token>`
# Usage
You can fetch release notes like:
`release_notes getfor auto_pipeline`
By default this will look for an existing release and try to parse out the pr numbers from it's description. Alternatively, you can use a file:
`release_notes getfor auto_pipeline --source pr_numbers.txt`
Either way will output to the console release notes of the following form:
```
h2. SOME TITLE
CHANGE_TYPE: UI
DESCRIPTION: Some descriptions
JIRA TICKET: LIMS-123
PULL REQUEST: 123
RISK: LOW
RISK DESCRIPTION: Some description
```
Optionally redirect to a file:
`release_notes getfor auto_pipeline > release_notes.txt`
# How this Works
You can look at `cli.py` for an example of how to use this script.
Essentially, `cli.py` runs the following where the token variable is looking for `GITHUB_API_TOKEN` to be set.
```python
ReleaseNoteGenerator(token, repository_name=repository_name).release_notes()
ReleaseNotesFormatter.output(notes)
```
`ReleaseNoteGenerator` parses the PR numbers from the latest release, if no release exists it will return nothing. It then passes the PR numbers to the pr fetcher which grabs the descriptions. A good entry point it to look at `ReleaseNoteGenerator.release_notes`
# Future Work
This is a quick and dirty initial implementation and we should expand this for easy reuse.
[Complete] Iteration 1: Packaging and Interface Features
- command line interaction to run with a repository_name arg
```
# print output to the screen
release_notes auto_pipeline --print
```
- packaging for easy pip install and use across LIMS projects (ie. use in individual release scripts)
- document API
Iteration 2: Granularity and Robustness Features
- expose the PRFetcher so that we are not coupled to fetching the initial list purely from
- add ability to diff the latest release and previous release and auto generate pr numbers (is this in the ARMS release script?)
- auto generate tag and release adding the PRs to the release notes
Other Features:
- tests
- auto ignore markdown comments
- filter out heading fields in the description and only parse the one line description
- include full pull request links
`pip install release-notes-generator`
This will provide a self-documenting command line tool under the name:
`release_notes`
You can ask for help as you would expect: `release_notes --help`
You will need to set your github access token to use it:
`export GITHUB_API_TOKEN = <token>`
# Usage
You can fetch release notes like:
`release_notes getfor auto_pipeline`
By default this will look for an existing release and try to parse out the pr numbers from it's description. Alternatively, you can use a file:
`release_notes getfor auto_pipeline --source pr_numbers.txt`
Either way will output to the console release notes of the following form:
```
h2. SOME TITLE
CHANGE_TYPE: UI
DESCRIPTION: Some descriptions
JIRA TICKET: LIMS-123
PULL REQUEST: 123
RISK: LOW
RISK DESCRIPTION: Some description
```
Optionally redirect to a file:
`release_notes getfor auto_pipeline > release_notes.txt`
# How this Works
You can look at `cli.py` for an example of how to use this script.
Essentially, `cli.py` runs the following where the token variable is looking for `GITHUB_API_TOKEN` to be set.
```python
ReleaseNoteGenerator(token, repository_name=repository_name).release_notes()
ReleaseNotesFormatter.output(notes)
```
`ReleaseNoteGenerator` parses the PR numbers from the latest release, if no release exists it will return nothing. It then passes the PR numbers to the pr fetcher which grabs the descriptions. A good entry point it to look at `ReleaseNoteGenerator.release_notes`
# Future Work
This is a quick and dirty initial implementation and we should expand this for easy reuse.
[Complete] Iteration 1: Packaging and Interface Features
- command line interaction to run with a repository_name arg
```
# print output to the screen
release_notes auto_pipeline --print
```
- packaging for easy pip install and use across LIMS projects (ie. use in individual release scripts)
- document API
Iteration 2: Granularity and Robustness Features
- expose the PRFetcher so that we are not coupled to fetching the initial list purely from
- add ability to diff the latest release and previous release and auto generate pr numbers (is this in the ARMS release script?)
- auto generate tag and release adding the PRs to the release notes
Other Features:
- tests
- auto ignore markdown comments
- filter out heading fields in the description and only parse the one line description
- include full pull request links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file release_notes_generator-1.1.4.tar.gz.
File metadata
- Download URL: release_notes_generator-1.1.4.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.10.0 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ad19fd444f1eb02b56a4748cc37762e9bf07f90c2d5f8d6018d28654cb29a6c
|
|
| MD5 |
6a3053a599b97951ad382aabcbb2ff06
|
|
| BLAKE2b-256 |
71623533e2c94745c4d13439ce7bea42420dab5dd2aa8df52784144f3c35bbb3
|
File details
Details for the file release_notes_generator-1.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: release_notes_generator-1.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.10.0 setuptools/28.8.0 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/2.7.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9820c92fdc960fc3b50b558c33ebad60ef3396705cbf740d083e7dcb5e77d6c
|
|
| MD5 |
7ffae817d7651d56cba1c0f9caf5dea5
|
|
| BLAKE2b-256 |
fb401549b14c55ad4e23da60cc484c97c36ecc02139218e1d4a3ca1086c80504
|