Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ jobs:
- 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."
number="${{ github.event.pull_request.number }}"
added=$(git diff "origin/${{ github.base_ref }}...HEAD" -- CHANGELOG.md | grep -E '^\+[^+]' || true)
if ! echo "$added" | grep -qE "\(#${number}\)[[:space:]]*$"; then
echo "CHANGELOG.md has no new line that ends with this pull request's number, (#${number})."
echo "Every pull request adds a line under Unreleased in CHANGELOG.md that says what it changes"
echo "and ends with its own number, for example: - \`GET /tasks\` lists the tasks. (#${number})"
exit 1
fi
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ 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.
- CI checks that a pull request adds a line here that ends with its number. (#4)
Loading