From 8165219fbbbf94c7727f9336551e55499c95da28 Mon Sep 17 00:00:00 2001 From: Kristian Date: Sun, 4 Oct 2026 19:28:58 +0200 Subject: [PATCH] Keep a changelog, and have CI check that a pull request adds to it --- .github/workflows/ci.yml | 11 +++++++++++ CHANGELOG.md | 9 +++++++++ 2 files changed, 20 insertions(+) create mode 100644 CHANGELOG.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6fcc01..a720098 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + # The whole history, so the changelog step can compare with the base branch. + fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version: 24 @@ -18,3 +21,11 @@ jobs: - run: npm ci - run: npm run build - run: npm test + - name: Changelog entry + if: github.event_name == 'pull_request' + run: | + if git diff --quiet "origin/${{ github.base_ref }}...HEAD" -- CHANGELOG.md; then + echo "CHANGELOG.md was not changed by this pull request." + echo "Every pull request adds a line under Unreleased in CHANGELOG.md that says what it changes." + exit 1 + fi diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d929b82 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# Changelog + +What changed in the API, newest first. Every pull request adds a line under Unreleased that says +what it changes for someone who uses the API. CI checks that it did. + +## Unreleased + +- `GET /tasks/count` says how many tasks there are, and how many are done. +- CI checks that a pull request adds a line here.