ci: add basic checks for CHANGELOG.md

Perform some basic checks for CHANGELOG.md.

In particular, check for
 - missing periods;
 - extra spaces at EOL;
 - non-ASCII characters.

Fix the issues found.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-06-02 10:52:12 -07:00
parent 5d74e0f027
commit 91fa032da4
3 changed files with 19 additions and 8 deletions
+4 -1
View File
@@ -157,7 +157,6 @@ jobs:
pattern: '^.{0,72}(\n.*)*$' pattern: '^.{0,72}(\n.*)*$'
error: 'Subject too long (max 72)' error: 'Subject too long (max 72)'
cfmt: cfmt:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
@@ -182,6 +181,10 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
- name: check CHANGELOG.md
run: make verify-changelog
# We have to run this under Docker as Ubuntu (host) does not support all # We have to run this under Docker as Ubuntu (host) does not support all
# the architectures we want to compile test against, and Dockerfile uses # the architectures we want to compile test against, and Dockerfile uses
# Debian (which does). # Debian (which does).
+6 -6
View File
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.1.2] - 2022-05-06 ## [1.1.2] - 2022-05-06
> I should think Im going to be a perpetual student. > I should think I'm going to be a perpetual student.
### Security ### Security
* A bug was found in runc where runc exec --cap executed processes with * A bug was found in runc where runc exec --cap executed processes with
@@ -80,7 +80,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
binary etc.) and failures of the command being executed. (#3073) binary etc.) and failures of the command being executed. (#3073)
* runc run: new `--keep` option to skip removal exited containers artefacts. * runc run: new `--keep` option to skip removal exited containers artefacts.
This might be useful to check the state (e.g. of cgroup controllers) after This might be useful to check the state (e.g. of cgroup controllers) after
the container hasexited. (#2817, #2825) the container has exited. (#2817, #2825)
* seccomp: add support for `SCMP_ACT_KILL_PROCESS` and `SCMP_ACT_KILL_THREAD` * seccomp: add support for `SCMP_ACT_KILL_PROCESS` and `SCMP_ACT_KILL_THREAD`
(the latter is just an alias for `SCMP_ACT_KILL`). (#3204) (the latter is just an alias for `SCMP_ACT_KILL`). (#3204)
* seccomp: add support for `SCMP_ACT_NOTIFY` (seccomp actions). This allows * seccomp: add support for `SCMP_ACT_NOTIFY` (seccomp actions). This allows
@@ -169,13 +169,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
* Fixed inability to start a container with read-write bind mount of a * Fixed inability to start a container with read-write bind mount of a
read-only fuse host mount. (#3283, #3292) read-only fuse host mount. (#3283, #3292)
* Fixed inability to start when read-only /dev in set in spec (#3276, #3277) * Fixed inability to start when read-only /dev in set in spec. (#3276, #3277)
* Fixed not removing sub-cgroups upon container delete, when rootless cgroup v2 * Fixed not removing sub-cgroups upon container delete, when rootless cgroup v2
is used with older systemd. (#3226, #3297) is used with older systemd. (#3226, #3297)
* Fixed returning error from GetStats when hugetlb is unsupported (which causes * Fixed returning error from GetStats when hugetlb is unsupported (which causes
excessive logging for Kubernetes). (#3233, #3295) excessive logging for Kubernetes). (#3233, #3295)
* Improved an error message when dbus-user-session is not installed and * Improved an error message when dbus-user-session is not installed and
rootless + cgroup2 + systemd are used (#3212) rootless + cgroup2 + systemd are used. (#3212)
[GHSA-v95c-p5hm-xq8f]: https://github.com/opencontainers/runc/security/advisories/GHSA-v95c-p5hm-xq8f [GHSA-v95c-p5hm-xq8f]: https://github.com/opencontainers/runc/security/advisories/GHSA-v95c-p5hm-xq8f
@@ -255,7 +255,7 @@ implementation (libcontainer) is *not* covered by this policy.
code, optimize the method for checking whether a cgroup is frozen. (#2955) code, optimize the method for checking whether a cgroup is frozen. (#2955)
* cgroups/systemd: fixed "retry on dbus disconnect" logic introduced in rc94 * cgroups/systemd: fixed "retry on dbus disconnect" logic introduced in rc94
* cgroups/systemd: fixed returning "unit already exists" error from a systemd * cgroups/systemd: fixed returning "unit already exists" error from a systemd
cgroup manager (regression in rc94) (#2997, #2996) cgroup manager (regression in rc94). (#2997, #2996)
### Added ### Added
* cgroupv2: support SkipDevices with systemd driver. (#2958, #3019) * cgroupv2: support SkipDevices with systemd driver. (#2958, #3019)
@@ -264,7 +264,7 @@ implementation (libcontainer) is *not* covered by this policy.
(#3022) (#3022)
### Changed ### Changed
* cgroup/systemd: return, not ignore, stop unit error from Destroy (#2946) * cgroup/systemd: return, not ignore, stop unit error from Destroy. (#2946)
* Fix all golangci-lint failures. (#2781, #2962) * Fix all golangci-lint failures. (#2781, #2962)
* Make `runc --version` output sane even when built with `go get` or * Make `runc --version` output sane even when built with `go get` or
otherwise outside of our build scripts. (#2962) otherwise outside of our build scripts. (#2962)
+9 -1
View File
@@ -145,6 +145,14 @@ vendor:
$(GO) mod vendor $(GO) mod vendor
$(GO) mod verify $(GO) mod verify
verify-changelog:
# No non-ASCII characters.
! LC_ALL=C grep -n -P '[\x80-\xFF]' CHANGELOG.md
# No space at EOL.
! grep -n '\s$$' CHANGELOG.md
# Period before issue/PR references.
! grep -n '[0-9a-zA-Z][^.] (#[1-9][0-9, #]*)$$' CHANGELOG.md
verify-dependencies: vendor verify-dependencies: vendor
@test -z "$$(git status --porcelain -- go.mod go.sum vendor/)" \ @test -z "$$(git status --porcelain -- go.mod go.sum vendor/)" \
|| (echo -e "git status:\n $$(git status -- go.mod go.sum vendor/)\nerror: vendor/, go.mod and/or go.sum not up to date. Run \"make vendor\" to update"; exit 1) \ || (echo -e "git status:\n $$(git status -- go.mod go.sum vendor/)\nerror: vendor/, go.mod and/or go.sum not up to date. Run \"make vendor\" to update"; exit 1) \
@@ -155,4 +163,4 @@ verify-dependencies: vendor
test localtest unittest localunittest integration localintegration \ test localtest unittest localunittest integration localintegration \
rootlessintegration localrootlessintegration shell install install-bash \ rootlessintegration localrootlessintegration shell install install-bash \
install-man clean cfmt shfmt shellcheck \ install-man clean cfmt shfmt shellcheck \
vendor verify-dependencies vendor verify-changelog verify-dependencies