Skip to content

[BUG FIX] [MER-3507] Require instructor login when accessing course section information as account admin #1222

[BUG FIX] [MER-3507] Require instructor login when accessing course section information as account admin

[BUG FIX] [MER-3507] Require instructor login when accessing course section information as account admin #1222

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