Skip to content

[BUG FIX] [MER-4123] Fix high progress low proficiency filter #1223

[BUG FIX] [MER-4123] Fix high progress low proficiency filter

[BUG FIX] [MER-4123] Fix high progress low proficiency filter #1223

name: "Validate Pull Request Title"
on:
pull_request:
branches:
- master
- 'hotfix-*'
- 'prerelease-*'
types: [opened, edited, reopened]
jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Validate PR Title
uses: actions/github-script@v7
with:
script: |
const titlePattern = /^(\[BUG FIX\]|\[ENHANCEMENT\]|\[FEATURE\]|\[CHORE\]|\[PERFORMANCE\]) (\[MER-\d{3}\]|\[MER-\d{4}\]|\[NG23-\d{2}\]|\[NG23-\d{3}\]|\[NG23-\d{4}\]) .+$/;
const title = context.payload.pull_request.title;
if (!titlePattern.test(title)) {
core.setFailed("Pull Request title does not match the required format '[CHANGE-TYPE] [TICKET-REFERENCE] Description'.");
}