Skip to main content

A Python package that parses a specific PR template given a list of PRs and generates release notes form them.

Project description

# Usage
Modify the repository_name on line 189 to be one of the commented options (could be any LIMS repository though) and 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
```

You will also need to set your github access token:
`export GITHUB_API_TOKEN = <token>`

Then run the script:
`python cli.py`

Optionally redirect to a file:
`python cli.py > release_notes.txt`

# How this Works
You can look at `cli.py` for an example of how to use this script. The name is a bit misleading as it isn't yet a cli app at all (yet).

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.

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
```

- test suite
- 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:
- 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

release_notes_generator-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

release_notes_generator-1.0.0-py2-none-any.whl (4.8 kB view details)

Uploaded Python 2

File details

Details for the file release_notes_generator-1.0.0.tar.gz.

File metadata

File hashes

Hashes for release_notes_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2cac9a7ce3de2db901c052b4e4e4a9f0512e701f02dfd7fef84d1a0a316c01ec
MD5 daa612ff3e0ef89ee3916397ba25fe86
BLAKE2b-256 be756f32899db47b95caedad4c79dff65e1a335b359dae60c5508c69d55ca439

See more details on using hashes here.

File details

Details for the file release_notes_generator-1.0.0-py2-none-any.whl.

File metadata

File hashes

Hashes for release_notes_generator-1.0.0-py2-none-any.whl
Algorithm Hash digest
SHA256 bb43d239421ba20dfdcf752859d4ed1467ad4dbbbc507dd4b6e24bd2d45fce15
MD5 b68dc9cf90afc277371b64a115a7bf7b
BLAKE2b-256 09a836399424379acf9d63c4ef4fc73ed50a1c55c5df869ae8c730673161c662

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page