2023-10-31 23:12:16 +01:00
|
|
|
name: Needs Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [labeled, unlabeled]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
name: Check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Check for needs-docs label
|
2023-11-24 09:27:56 +01:00
|
|
|
uses: actions/github-script@v7.0.1
|
2023-10-31 23:12:16 +01:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
issue_number: context.issue.number
|
|
|
|
});
|
|
|
|
const needsDocs = labels.find(label => label.name === 'needs-docs');
|
|
|
|
if (needsDocs) {
|
|
|
|
core.setFailed('Pull request needs docs');
|
|
|
|
}
|