Skip to content

Commit

Permalink
added action to ensure changelog is changed (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bullrich authored Jan 22, 2024
1 parent de65073 commit 97cae37
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/dismiss-reviews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Review-Trigger

on:
pull_request_target:

jobs:
dismiss-reviews:
runs-on: ubuntu-latest
steps:
- name: Dismiss Approvals
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api repos/${{ github.repository }}/pulls/${{ github.event.number }}/reviews \
--jq '.[] | select(.state == "APPROVED") | .id' \
| xargs -I '{}' gh api --method=PUT -f message="Dismissed due to PR edit." \
repos/${{ github.repository }}/pulls/${{ github.event.number }}/reviews/'{}'/dismissals
20 changes: 20 additions & 0 deletions .github/workflows/modify-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Modify Changelog

on:
pull_request_target:

jobs:

test:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ github.token }}
steps:
- name: Get Changed Files
id: changed
uses: foodee/pr-includes-file-change@master
with:
paths: ^CHANGELOG.md
- name: Fail
if: steps.changed.outputs.matched != 'true' && !contains(github.event.pull_request.body, '[x] Does not require a CHANGELOG entry')
run: echo "::error::CHANGELOG.md has not been modified. Either modify the file or check the checkbox in the body" && exit 1
3 changes: 2 additions & 1 deletion .github/workflows/up-to-date.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
- name: Update all the PRs
uses: paritytech/up-to-date-action@action
uses: paritytech/up-to-date-action@main
with:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
REQUIRE_AUTO_MERGE: false
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the first change

0 comments on commit 97cae37

Please sign in to comment.