From cadfcb7066040221fabe09dfc0e515661e89d039 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Wed, 20 May 2026 15:44:01 +0200 Subject: [PATCH 1/3] chore: Allow dependabot to user lowercase PR titles --- build-packages/check-pr/index.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build-packages/check-pr/index.ts b/build-packages/check-pr/index.ts index 4f581dfd59..3b429298a9 100644 --- a/build-packages/check-pr/index.ts +++ b/build-packages/check-pr/index.ts @@ -2,9 +2,18 @@ import { setFailed } from '@actions/core'; import { context } from '@actions/github'; import { validateTitle, validateBody } from './validators.js'; +function capitalizeAfterColon(title: string): string { + return title.replace(/^([^:]+:\s*)(\w)/, (_, pre, char) => + pre + char.toUpperCase() + ); +} + try { - validateTitle(context.payload.pull_request?.title); - validateBody(context.payload.pull_request?.body?.replace(/\r\n/g, '\n')); + const pr = context.payload.pull_request; + const isDependabot = pr?.user?.login === 'dependabot[bot]'; + const title = isDependabot && pr?.title ? capitalizeAfterColon(pr.title) : pr?.title; + validateTitle(title); + validateBody(pr?.body?.replace(/\r\n/g, '\n')); } catch (err: any) { setFailed(err); } From 36d01d5392355032814c105cd18fba2afe990b1b Mon Sep 17 00:00:00 2001 From: David Knaack Date: Tue, 26 May 2026 08:12:24 +0200 Subject: [PATCH 2/3] Revert "chore: Allow dependabot to user lowercase PR titles" This reverts commit cadfcb7066040221fabe09dfc0e515661e89d039. --- build-packages/check-pr/index.ts | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/build-packages/check-pr/index.ts b/build-packages/check-pr/index.ts index 3b429298a9..4f581dfd59 100644 --- a/build-packages/check-pr/index.ts +++ b/build-packages/check-pr/index.ts @@ -2,18 +2,9 @@ import { setFailed } from '@actions/core'; import { context } from '@actions/github'; import { validateTitle, validateBody } from './validators.js'; -function capitalizeAfterColon(title: string): string { - return title.replace(/^([^:]+:\s*)(\w)/, (_, pre, char) => - pre + char.toUpperCase() - ); -} - try { - const pr = context.payload.pull_request; - const isDependabot = pr?.user?.login === 'dependabot[bot]'; - const title = isDependabot && pr?.title ? capitalizeAfterColon(pr.title) : pr?.title; - validateTitle(title); - validateBody(pr?.body?.replace(/\r\n/g, '\n')); + validateTitle(context.payload.pull_request?.title); + validateBody(context.payload.pull_request?.body?.replace(/\r\n/g, '\n')); } catch (err: any) { setFailed(err); } From 6403fec0f3ac37d5b928f9930e3ce8d8e4de4a47 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Tue, 26 May 2026 11:30:58 +0200 Subject: [PATCH 3/3] chore: Allow all PRs to start with lowercase letter --- .github/actions/check-pr/index.js | 3 --- build-packages/check-pr/validators.spec.ts | 7 ------- build-packages/check-pr/validators.ts | 4 ---- 3 files changed, 14 deletions(-) diff --git a/.github/actions/check-pr/index.js b/.github/actions/check-pr/index.js index 395b20a31b..b89e509707 100644 --- a/.github/actions/check-pr/index.js +++ b/.github/actions/check-pr/index.js @@ -36296,9 +36296,6 @@ function validatePostamble(title) { if (title[0] !== ' ') { return setFailed('Space missing after conventional commit preamble.'); } - if (title[1] !== title[1].toUpperCase()) { - return setFailed('PR title must start with an uppercase letter.'); - } info('✓ Title: OK'); } function getAllowedBumps(preamble, isBreaking) { diff --git a/build-packages/check-pr/validators.spec.ts b/build-packages/check-pr/validators.spec.ts index f806036a58..bb869770a0 100644 --- a/build-packages/check-pr/validators.spec.ts +++ b/build-packages/check-pr/validators.spec.ts @@ -68,13 +68,6 @@ describe('check-pr', () => { ); }); - it('should invalidate title not starting with uppercase', async () => { - await validateTitle('chore: test'); - expect(setFailed).toHaveBeenCalledWith( - 'PR title must start with an uppercase letter.' - ); - }); - it('should invalidate title with wrong commit type', async () => { await validateTitle('featt: test'); expect(setFailed).toHaveBeenCalledWith( diff --git a/build-packages/check-pr/validators.ts b/build-packages/check-pr/validators.ts index 87fda52fdf..f5958793db 100644 --- a/build-packages/check-pr/validators.ts +++ b/build-packages/check-pr/validators.ts @@ -62,10 +62,6 @@ export function validatePostamble(title: string | undefined): void { return setFailed('Space missing after conventional commit preamble.'); } - if (title[1] !== title[1].toUpperCase()) { - return setFailed('PR title must start with an uppercase letter.'); - } - info('✓ Title: OK'); }