Skip to content

Commit 2be4f83

Browse files
committed
chore(release): add CHANGELOG.md, setup scriv to maintain it
1 parent 5565085 commit 2be4f83

File tree

6 files changed

+50
-0
lines changed

6 files changed

+50
-0
lines changed

.github/workflows/changelog-check.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This workflow only accepts PRs if they either contain a changelog fragment,
2+
# or have been applied the `skip-changelog` label.
3+
name: Changelog check
4+
5+
on:
6+
pull_request:
7+
types:
8+
# On by default if you specify no types.
9+
- 'opened'
10+
- 'reopened'
11+
- 'synchronize'
12+
# For `skip-changelog` only.
13+
- 'labeled'
14+
- 'unlabeled'
15+
16+
jobs:
17+
check-changelog:
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: 'Check for changelog fragment'
21+
uses: brettcannon/[email protected]
22+
with:
23+
file-pattern: |
24+
changelog.d/*.md
25+
CHANGELOG.md
26+
skip-label: 'skip-changelog'
27+
failure-message: 'Missing a changelog fragment in ${file-pattern}. Please add one using `scriv create` or apply the `${skip-label}` label to the pull request'

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
<a id='changelog-1.5.0'></a>
4+
5+
## 1.5.0 - 2022-11-28
6+
7+
### Added
8+
9+
- `Client` can now run IaC scans (gitguardian/ggshield#405).

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,9 @@ Line length in the one enforced by Black: 88 characters.
4545
- The first sentence starts with a capital letter and ends with a point. This sentence is separated from the others by a blank line
4646
- Docstrings must have :params: if the function has 2 or more arguments.
4747
- All docstrings must state the return object and raised exception with :return: and :raise:
48+
49+
### Changelog
50+
51+
We use [scriv](https://github.com/nedbat/scriv) to manage our changelog. It is automatically installed by `pipenv install --dev`.
52+
53+
All user visible changes must be documented in a changelog fragment. You can create one with `scriv create`. If your pull request only contains non-visible changes (such as refactors or fixes for regressions introduced _after_ the latest release), then apply the `skip-changelog` label to the pull request.

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ pytest = "*"
1717
vcrpy = "*"
1818
mypy = "==0.961"
1919
types-requests = "*"
20+
scriv = { version = "*", extras = ["toml"] }

changelog.d/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory holds changelog entries managed by scriv.

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,9 @@ warn_unused_ignores = true
2626
[[tool.mypy.overrides]]
2727
module = ["tests.*", "examples.*"]
2828
ignore_errors = true
29+
30+
[tool.scriv]
31+
version = "literal: pygitguardian/__init__.py: __version__"
32+
format = "md"
33+
md_header_level = "2"
34+
insert_marker = "# Changelog"

0 commit comments

Comments
 (0)