Skip to content

chore(repo): limit pr validation runs to checkout only from master #440

chore(repo): limit pr validation runs to checkout only from master

chore(repo): limit pr validation runs to checkout only from master #440

name: PR Title Validation
on:
pull_request:
types: [opened, edited, synchronize, reopened]
permissions: read-all
jobs:
validate-pr-title:
name: Validate PR Title
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Ensure's validate-pr-title.js is the copy from master
ref: master
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Validate PR title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
PR_BODY: ${{ github.event.pull_request.body }}
run: node ./scripts/validate-pr-title.js