Skip to content

BIGTOP-4224: Add pr title checker on workflows #12

BIGTOP-4224: Add pr title checker on workflows

BIGTOP-4224: Add pr title checker on workflows #12

Workflow file for this run

name: "Pull Request"
on:
pull_request:
types: [opened, edited, reopened, synchronize]
jobs:
check-pr-title:
name: "Check PR Title"
runs-on: ubuntu-latest
steps:
- name: Check PR title regex
uses: actions/github-script@v7
with:
script: |
const prTitle = context.payload.pull_request.title;
const regex = /^BIGTOP-\d{1,9}:.*$/;
if (!regex.test(prTitle)) {
core.setFailed(`PR title does not match the required pattern "BIGTOP-<digits>:": ${prTitle}`);
}