Skip to content

Commit

Permalink
Make change log entries mandatory with every PR (#988)
Browse files Browse the repository at this point in the history
* Try: Mandatory changlog entry

* Fix typo

* Add skip label annotation

* Add changelog update

* Check that readme.txt is updated, too

* Add readme update

---------

Co-authored-by: Matthias Pfefferle <[email protected]>
  • Loading branch information
obenland and pfefferle authored Nov 21, 2024
1 parent 353cc06 commit 12883a5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Changelog Updated"
on:
pull_request:
# The specific activity types are listed here to include "labeled" and "unlabeled"
# (which are not included by default for the "pull_request" trigger).
# This is needed to allow skipping enforcement of the changelog in PRs with specific labels,
# as defined in the (optional) "skipLabels" property.
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]

jobs:
# Enforces the update of a changelog file on every pull request.
changelog:
runs-on: ubuntu-latest
steps:
# CHANGELOG.md
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: 'Skip Changelog'
versionPattern: '## \\[((v|V)?\\d*\\.\\d*\\.\\d*-?\\w*|unreleased|Unreleased|UNRELEASED|Dev)\\]'

# readme.txt
- uses: dangoslen/changelog-enforcer@v3
with:
changeLogPath: 'readme.txt'
skipLabels: 'Skip Changelog'
versionPattern: '^=\\s*((v|V)?\\d+\\.\\d+\\.\\d+|Dev)\\s*='
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Unit tests for the `ActivityPub\Transformer\Post` class

### Added

* GitHub action to enforce Changelog updates.

### Improved

* Reuse constants once they're defined
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ For reasons of data protection, it is not possible to see the followers of other

= Dev =

* Added: GitHub action to enforce Changelog updates.
* Improved: Outsource Constants to a separate file

= 4.2.1 =
Expand Down

0 comments on commit 12883a5

Please sign in to comment.