mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-09 19:45:29 -04:00
24 lines
587 B
YAML
24 lines
587 B
YAML
name: Validate PR Body
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [ main, develop, canary ]
|
|
types: [opened, synchronize, edited]
|
|
|
|
jobs:
|
|
check_pr:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Check PR Body
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
const checkBody = (bodyText) => {
|
|
if (/["`]/.test(bodyText)) {
|
|
core.setFailed('PR body must not contain double-quotes or backticks.');
|
|
}
|
|
};
|
|
|
|
const body = context.payload.pull_request?.body || '';
|
|
checkBody(body);
|