Skip to content

Commit 51e863a

Browse files
Update Changelog & add changelog auto-updater (#43)
* Github Actions: Add Changelog Updater * Update CHANGELOG.md to reflect recent changes
1 parent 2c39400 commit 51e863a

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Update Changelog on PR Merge
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
update-changelog:
10+
name: Update Changelog
11+
runs-on: ubuntu-latest
12+
if: github.event.pull_request.merged == true
13+
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
with:
21+
ref: ${{ github.event.pull_request.base.ref }}
22+
fetch-depth: 0
23+
24+
- name: Determine changelog section to update
25+
id: sections
26+
run: |
27+
section=""
28+
labels=$(echo '${{ toJSON(github.event.pull_request.labels.*.name) }}' | jq -r '.[]')
29+
for label in $labels; do
30+
lower_label=$(echo "$label" | tr '[:upper:]' '[:lower:]')
31+
case "$lower_label" in
32+
enhancement|feature) section="Added"; break;;
33+
bug|bugfix|fix|patch) section="Fixed"; break;;
34+
change) section="Changed"; break;;
35+
optimization|improvement|performance|refactor) section="Optimized"; break;;
36+
deprecation|deprecated) section="Deprecated"; break;;
37+
revert) section="Reverted"; break;;
38+
removal) section="Removed"; break;;
39+
security) section="Security"; break;;
40+
esac
41+
done
42+
43+
if [ -z "$section" ]; then
44+
echo "No matching label found for changelog entry, skipping changelog update."
45+
exit 0
46+
else
47+
echo "section=$section" >> $GITHUB_OUTPUT
48+
fi
49+
50+
- name: Add entry to CHANGELOG.md
51+
if: steps.sections.outputs.section != ''
52+
uses: claudiodekker/changelog-updater@master
53+
with:
54+
section: "${{ steps.sections.outputs.section }}"
55+
entry-text: "${{ github.event.pull_request.title }}"
56+
entry-link: "${{ github.event.pull_request.html_url }}"
57+
58+
- name: Commit updated CHANGELOG
59+
if: steps.sections.outputs.section != ''
60+
uses: stefanzweifel/git-auto-commit-action@v4
61+
with:
62+
branch: ${{ github.event.pull_request.base.ref }}
63+
commit_message: "Update CHANGELOG.md w/ PR #${{ github.event.pull_request.number }}"
64+
file_pattern: CHANGELOG.md

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/claudiodekker/laravel-auth/compare/v0.2.0...HEAD)
99

10+
### Added
11+
12+
- Account Security indicator ([#26](https://github.com/claudiodekker/laravel-auth/pull/26))
13+
- Core: Add support for pruning "claimed" users that never finish sign-up ([#27](https://github.com/claudiodekker/laravel-auth/pull/27))
14+
- Add docblock-level `@see`-references ([#29](https://github.com/claudiodekker/laravel-auth/pull/29))
15+
- Core: Skip the recovery code challenge when no codes exist ([#30](https://github.com/claudiodekker/laravel-auth/pull/30))
16+
1017
### Fixed
1118

1219
- Core: Fixed timing-related test regression ([#24](https://github.com/claudiodekker/laravel-auth/pull/24))
20+
- Bladebones: Recovery Code must be exactly 10 characters ([#28](https://github.com/claudiodekker/laravel-auth/pull/28))
21+
- Core: Public Key Challenge - Update signature count ([#31](https://github.com/claudiodekker/laravel-auth/pull/31))
22+
23+
### Changed
24+
25+
- Improve Rate Limiting ([#32](https://github.com/claudiodekker/laravel-auth/pull/32))
26+
- Added Larastan & improved violations ([#36](https://github.com/claudiodekker/laravel-auth/pull/36))
27+
28+
### Optimized
29+
30+
- Improved dev-dependencies ([#39](https://github.com/claudiodekker/laravel-auth/pull/39))
31+
- Remove ext-json requirement ([#41](https://github.com/claudiodekker/laravel-auth/pull/41))
32+
33+
### Removed
34+
35+
- Revert model DB connection customization ([#38](https://github.com/claudiodekker/laravel-auth/pull/38))
1336

1437
## [v0.2.0](https://github.com/claudiodekker/laravel-auth/compare/v0.1.2...v0.2.0) - 2023-04-03
1538

0 commit comments

Comments
 (0)