From 0888ac6ee82d55297898dc91113800a7ff4c0c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Rey?= Date: Fri, 8 May 2026 02:04:39 +0200 Subject: [PATCH] fix(ci): Check title length before skipping already-formatted titles The length check was placed after the early return for titles that were already correctly formatted, so a too-long title that happened to match the expected format would pass the workflow without error. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/title-formatter.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/title-formatter.yml b/.github/workflows/title-formatter.yml index 5b05b1d0..5e872a4c 100644 --- a/.github/workflows/title-formatter.yml +++ b/.github/workflows/title-formatter.yml @@ -53,11 +53,6 @@ jobs: if (isBreaking) newTitle += '!'; newTitle += `: ${description}`; - if (rawTitle === newTitle) { - console.log("Title is already correctly formatted. Skipping update."); - return; - } - const displayTitle = `${newTitle} (#${pr_number})`; if (displayTitle.length > 72) { core.setFailed( @@ -66,6 +61,11 @@ jobs: return; } + if (rawTitle === newTitle) { + console.log("Title is already correctly formatted. Skipping update."); + return; + } + await github.rest.pulls.update({ owner, repo,