Skip to content

Commit

Permalink
Add the Changelog Category Check workflow (#4821)
Browse files Browse the repository at this point in the history
This ensures the changelog entry added, if any, is under the Unreleased category

This action can be skipped with the `skip-changelog-check` label
  • Loading branch information
pajlada authored Sep 16, 2023
1 parent 8fe3af3 commit 83328e7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/changelog-category-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Changelog Category Check

on:
pull_request:
types:
- labeled
- unlabeled
- opened
- synchronize
- reopened

jobs:
changelog-category-check:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
id: label-checker
with:
result-encoding: "string"
script: |
const response = await github.rest.issues.listLabelsOnIssue({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo
});
if (new Set(response.data.map(label => label.name)).has("skip-changelog-checker")) {
return "skip";
}
return "";
- uses: pajlads/changelog-checker@v1.0.0
if: steps.label-checker.outputs.result != 'skip'

0 comments on commit 83328e7

Please sign in to comment.