Skip to content

Commit 9c5d789

Browse files
authored
ci: Check title length before skipping already-formatted titles (#672)
1 parent 3b5695a commit 9c5d789

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/title-formatter.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ jobs:
5353
if (isBreaking) newTitle += '!';
5454
newTitle += `: ${description}`;
5555
56-
if (rawTitle === newTitle) {
57-
console.log("Title is already correctly formatted. Skipping update.");
58-
return;
59-
}
60-
6156
const displayTitle = `${newTitle} (#${pr_number})`;
6257
if (displayTitle.length > 72) {
6358
core.setFailed(
@@ -66,6 +61,11 @@ jobs:
6661
return;
6762
}
6863
64+
if (rawTitle === newTitle) {
65+
console.log("Title is already correctly formatted. Skipping update.");
66+
return;
67+
}
68+
6969
await github.rest.pulls.update({
7070
owner,
7171
repo,

0 commit comments

Comments
 (0)