Skip to content

Native LDAP Phase 2: login wiring and auth_type routing #4215

Native LDAP Phase 2: login wiring and auth_type routing

Native LDAP Phase 2: login wiring and auth_type routing #4215

name: Verify DONE checkboxes
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions:
contents: read
pull-requests: read
jobs:
check-done-checkboxes:
runs-on: ubuntu-latest
steps:
- name: Verify all DONE checkboxes are checked in a PR description
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ github.token }}
script: |
// We can't get this via context.payload.pull_request.body
// as some pull_request status do not return the body
// and in such cases the test runs but does not fail
const prNumber = context.payload.pull_request.number;
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber
});
const description = pr.body ?? "";
console.log(description)
// ATM we are not checking if the number of
// DONE checkboxes matches what the original template has
const regex = /^\s*-\s*\[\s*\]\s*\**\s*done\s*\**\s*$/im;
if (regex.test(description)) {
core.setFailed('There is at least one unchecked DONE checkbox!');
}