Skip to content

[ENHANCEMENT] [MER-3360] Duplicate activity within activity bank #1093

[ENHANCEMENT] [MER-3360] Duplicate activity within activity bank

[ENHANCEMENT] [MER-3360] Duplicate activity within activity bank #1093

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'.");
}