From 25f3a521983ca25ddefba4602e80b16afab24e23 Mon Sep 17 00:00:00 2001 From: Cal Nightingale Date: Tue, 21 Apr 2026 15:55:37 -0400 Subject: [PATCH] ci: accept Conventional Commit titles with Linear ID in scope Allow titles like 'feat(ENG-123): add feature' so repos using release-please can keep Linear issue association without breaking the existing check. Existing 'ENG-123: ...' and 'NO-ISSUE:' formats remain valid. --- .github/workflows/pr-title-check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 5dae45a..0cf34d9 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -21,9 +21,13 @@ jobs: echo "Bot PR — skipping check." elif echo "$PR_TITLE" | grep -qPi '^[A-Z]+[-\s]\d+\b'; then echo "PR title starts with a Linear issue ID." + elif echo "$PR_TITLE" | grep -qP '^[a-z]+(\([^)]*[A-Z]+[-\s]\d+[^)]*\))!?:'; then + echo "PR title is a Conventional Commit with a Linear issue ID in scope." elif echo "$PR_TITLE" | grep -qPi '^NO-ISSUE\b'; then echo "::notice::PR explicitly opted out of issue association." + elif echo "$PR_TITLE" | grep -qPi '^[a-z]+(\([^)]*\))?!?:\s*NO-ISSUE\b'; then + echo "::notice::PR explicitly opted out of issue association (conventional commit style)." else - echo "::error::PR title must start with a Linear issue ID (e.g., \"ENG-123: Add feature\") or \"NO-ISSUE:\" to opt out." + echo "::error::PR title must start with a Linear issue ID (e.g., \"ENG-123: Add feature\"), include one in a conventional-commit scope (e.g., \"feat(ENG-123): add feature\"), or use \"NO-ISSUE\" to opt out." exit 1 fi