Skip to content

Commit

Permalink
Add release drafter (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcquade authored Dec 10, 2020
1 parent 8f0b2ae commit d0ce49a
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- 'quick-fix'
- title: '🧰 Maintenance'
label:
- 'chore'
- 'maintenance'
- 'maintain'
- 'cleanup'
- title: '📝 Documentation'
label:
- 'documentation'
- 'docs'

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
## Changes
$CHANGES
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches: [ main, master ]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* Inline Explanation of findings (#115)
* Vue Router is implemented so you can have routes to reports like http://localhost:8080/#/inline-policies (#116)
* Better formatting for Privilege Escalation findings (#114)
* Exclusions config is in its own tab in the UI (#107)

## 0.2.3 (2020-10-12)
* `scan` command now has a `--minimize` option, which you can use to reduce your report size. The example report size was reduced from 3.9MB (ouch!) to 212KB. (Fixes #125)
Expand Down
21 changes: 21 additions & 0 deletions docs/contributing/release-drafter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Release Drafter

1. Every time a PR is merged, the draft release note is updated
to add a entry for this change
2. We have a github release-drafter action which automatically
does this after a PR is merged.
3. It also increments the release version if this is the first PR for a new release.
Note: This will only update the draft release note. We still have to bump
the version as per [versioning document](https://github.com/salesforce/cloudsplaining/blob/master/docs/contributing/versioning.md)
4. When we are ready to publish the release, we use the drafted
release note to do so.
5. Release drafter categorizes the changes in the release into `Features`, `BugFixes`, `Maintenance`,
`Documentation` categories as per the labels added to the PR


Adding labels to the PR:

- Contributors can add appropriate label
to the PR (`feature`, `bugfix`, `documentation`, `maintenance` etc.)
- If PR contributor does not have the permission,
Maintainers should add the label.
4 changes: 2 additions & 2 deletions docs/contributing/versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ We try to follow [Semantic Versioning](https://semver.org/) as much as possible.

## Version bumps.

Just edit the cloudsplaining/bin/version.py file and update the __version__ variable:
Just edit the `cloudsplaining/bin/version.py` file and update the __version__ variable:

```python
__version__ = '0.0.1' # EDIT THIS
```

The setup.py file will automatically pick up the new version from that file for the package info. The @click.version_option decorator will also pick that up for the command line.
The setup.py file will automatically pick up the new version from that file for the package info. The `@click.version_option` decorator will also pick that up for the command line.
5 changes: 3 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ nav:
- "<b>Contributing</b>":
- Contributing: 'contributing/contributing.md'
- Documentation: 'contributing/documentation.md'
- Python: 'contributing/python.md'
- JavaScript: 'contributing/javascript.md'
- Testing: 'contributing/testing.md'
- Python: 'contributing/python.md'
- Release Drafter: 'contributing/release-drafter.md'
- Report Generation: 'contributing/report.md'
- Testing: 'contributing/testing.md'
- Versioning: 'contributing/versioning.md'

- "<b>Appendices</b>":
Expand Down

0 comments on commit d0ce49a

Please sign in to comment.