diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..5abc73af8 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ + + + + +- [ ] Added a change log entry in `changelog.d//`. +- [ ] Added self to copyright blurb of touched files. +- [ ] Added self to `AUTHORS.rst`. +- [ ] Wrote tests. +- [ ] (Situational) Documented my changes in `docs/man/`. +- [x] I agree to license my contribution under the licenses indicated in the + changed files. diff --git a/CHANGELOG.md b/CHANGELOG.md index 44ae72761..bcbcd2ff6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,21 +23,7 @@ The versions follow [semantic versioning](https://semver.org) for the `reuse` CLI command and its behaviour. There are no guarantees of stability for the `reuse` Python library. - + ## Unreleased - YYYY-MM-DD diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be86b31b0..6da99c5ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,9 +48,25 @@ feature that may not be accepted. When making a pull request, don't hesitate to add yourself to the AUTHORS.rst file and the copyright headers of the files you touch. -Every pull request should add an entry in `CHANGELOG.md`. Some exceptions apply, -such as changes which are too tiny to be significant, certain refactorings, or -fixes to pull requests which were already merged, but not yet released. +### Change log + +Every pull request should add a change log entry. Change log entries go into +`changelog.d//.md`, where `` is the appropriate +category for the change set, and where `` is a short or random name for +your change set. + +The contents of the file should typically look like this: + +```markdown +- Added a new feature. (#pr_number) +``` + +At release time, the contents of the `changelog.d/` directory are compiled into +`CHANGELOG.md` using `protokolo compile`. + +Some PRs are excepted from adding change log entries, such as changes which are +too tiny to be significant, certain refactorings, or fixes to pull requests +which were already merged, but not yet released. ## Translation diff --git a/REUSE.toml b/REUSE.toml index 989ff511a..71c5e87c7 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -50,7 +50,12 @@ SPDX-FileCopyrightText = "2017 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "${version} - ${date}" +level = 2 diff --git a/changelog.d/added/.protokolo.toml b/changelog.d/added/.protokolo.toml new file mode 100644 index 000000000..bd8924220 --- /dev/null +++ b/changelog.d/added/.protokolo.toml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "Added" +order = 1 diff --git a/changelog.d/changed/.protokolo.toml b/changelog.d/changed/.protokolo.toml new file mode 100644 index 000000000..9d91d23ac --- /dev/null +++ b/changelog.d/changed/.protokolo.toml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "Changed" +order = 2 diff --git a/changelog.d/deprecated/.protokolo.toml b/changelog.d/deprecated/.protokolo.toml new file mode 100644 index 000000000..5264d6682 --- /dev/null +++ b/changelog.d/deprecated/.protokolo.toml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "Deprecated" +order = 3 diff --git a/changelog.d/fixed/.protokolo.toml b/changelog.d/fixed/.protokolo.toml new file mode 100644 index 000000000..48f9fed3b --- /dev/null +++ b/changelog.d/fixed/.protokolo.toml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "Fixed" +order = 5 diff --git a/changelog.d/removed/.protokolo.toml b/changelog.d/removed/.protokolo.toml new file mode 100644 index 000000000..21a87a44a --- /dev/null +++ b/changelog.d/removed/.protokolo.toml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "Removed" +order = 4 diff --git a/changelog.d/security/.protokolo.toml b/changelog.d/security/.protokolo.toml new file mode 100644 index 000000000..df2c43a69 --- /dev/null +++ b/changelog.d/security/.protokolo.toml @@ -0,0 +1,7 @@ +# SPDX-FileCopyrightText: 2024 Free Software Foundation Europe e.V. +# +# SPDX-License-Identifier: CC0-1.0 + +[protokolo.section] +title = "Security" +order = 6 diff --git a/poetry.lock b/poetry.lock index bf5669158..78a095927 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1074,6 +1074,22 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" +[[package]] +name = "protokolo" +version = "2.1.4" +description = "Protokolo is a change log generator." +category = "dev" +optional = false +python-versions = "<4.0,>=3.11" +files = [ + {file = "protokolo-2.1.4-cp311-cp311-manylinux_2_36_x86_64.whl", hash = "sha256:b10ff72199e5ced3fd662a5b870b673bf37a5c990dd4eacf054bdf3ea5f2e359"}, + {file = "protokolo-2.1.4.tar.gz", hash = "sha256:451addc697e43a2aac4db612acf747ffe839686e5ea71018a5bc1ea5adeddc08"}, +] + +[package.dependencies] +attrs = ">=22.1.0" +click = ">=8.0" + [[package]] name = "pygments" version = "2.18.0" @@ -1804,4 +1820,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "14a038a5fa48006c3394fee5efc29aef8a6b335d8c78c97d94e5e9e0b77bd44a" +content-hash = "057ae26f33e216758289466ff694ada751ccb92f81e593872d81a5f6f0312724" diff --git a/pyproject.toml b/pyproject.toml index 78afee2fd..5a8c49248 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,6 +80,7 @@ bumpver = ">=2023.1129" pylint = ">=2.12.2" mypy = ">=1.0" GitPython = ">=3.0" +protokolo = { version = ">=2.1.0", python = "^3.11" } [tool.poetry.group.lsp] optional = true @@ -122,6 +123,11 @@ push = false '__version__ = "{pep440_version}"$', ] +[tool.protokolo] +changelog = "CHANGELOG.md" +markup = "markdown" +directory = "changelog.d" + [tool.black] line-length = 80