2023-09-16 19:41:53 +02:00
|
|
|
---
|
|
|
|
name: Changelog Category Check
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
- unlabeled
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
changelog-category-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-14 12:53:10 +01:00
|
|
|
- uses: actions/github-script@v7
|
2023-09-16 19:41:53 +02:00
|
|
|
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 "";
|
|
|
|
|
2023-10-04 15:00:22 +02:00
|
|
|
- uses: pajlads/changelog-checker@v1.0.1
|
2023-09-16 19:41:53 +02:00
|
|
|
if: steps.label-checker.outputs.result != 'skip'
|