-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
578 additions
and
546 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,15 @@ | ||
name: Check Changelog | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
name: CHANGELOG check | ||
|
||
types: [assigned, opened, synchronize, reopened, labeled, unlabeled] | ||
branches: | ||
- main | ||
jobs: | ||
changelog_check: | ||
runs-on: ubuntu-latest | ||
check-changelog: | ||
name: Check Changelog Action | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Check if changelog was updated | ||
uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
src: | ||
- 'CHANGELOG.md' | ||
- name: Find Comment | ||
uses: peter-evans/find-comment@v2 | ||
id: fc | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: github-actions[bot] | ||
body-includes: CHANGELOG | ||
- if: steps.changes.outputs.src == 'false' && steps.fc.outputs.comment-id == '' | ||
name: Create comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Please summarize your changes in [CHANGELOG.md](CHANGELOG.md). | ||
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details. | ||
reactions: rocket | ||
edit-mode: replace | ||
- if: steps.changes.outputs.src == 'false' && steps.fc.outputs.comment-id != '' | ||
name: Update comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
body: | | ||
Please summarize your changes in [CHANGELOG.md](CHANGELOG.md). | ||
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details. | ||
reactions: rocket | ||
edit-mode: replace | ||
- if: steps.changes.outputs.src == 'true' && steps.fc.outputs.comment-id == '' | ||
name: Create comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
with: | ||
issue-number: ${{ github.event.pull_request.number }} | ||
body: | | ||
Thank you for updating [CHANGELOG.md](CHANGELOG.md)! Always feel free to edit it. | ||
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details. | ||
reactions: hooray | ||
edit-mode: replace | ||
- if: steps.changes.outputs.src == 'true' && steps.fc.outputs.comment-id != '' | ||
name: Update comment | ||
uses: peter-evans/create-or-update-comment@v2 | ||
- uses: tarides/changelog-check-action@v2 | ||
with: | ||
comment-id: ${{ steps.fc.outputs.comment-id }} | ||
body: | | ||
Thank you for updating [CHANGELOG.md](CHANGELOG.md)! Always feel free to edit it. | ||
See [Keep A Changelog](https://keepachangelog.com/en/1.0.0/) for more details. | ||
reactions: hooray | ||
edit-mode: replace | ||
- if: steps.changes.outputs.src == 'false' | ||
run: echo "Please summarize your changes in [CHANGELOG.md](CHANGELOG.md)." && exit 1 | ||
- if: steps.changes.outputs.src == 'true' | ||
run: exit 0 | ||
changelog: CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.