Skip to content

Commit 63450cf

Browse files
authored
Remove "Reapply" from the commit message (#1029)
1 parent b84e911 commit 63450cf

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Service/Revision/RevisionTitleNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public function normalize(string $title): string
99
{
1010
for ($i = 0; $i < 10; $i++) {
1111
$titleBefore = $title;
12-
$title = (string)preg_replace('/^Revert\s+"(.*)"$/', '$1', trim($title));
12+
$title = (string)preg_replace('/^(Revert|Reapply)\s+"(.*)"$/', '$2', trim($title));
1313

1414
if ($titleBefore === $title) {
1515
break;

tests/Unit/Service/Revision/RevisionTitleNormalizerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ public function testNormalize(): void
1616
static::assertSame('F#123 US#456 My task', $normalizer->normalize('F#123 US#456 My task'));
1717
static::assertSame('F#123 US#456 My task', $normalizer->normalize(' F#123 US#456 My task'));
1818
static::assertSame('F#123 US#456 My task', $normalizer->normalize('Revert "F#123 US#456 My task"'));
19+
static::assertSame('F#123 US#456 My task', $normalizer->normalize('Reapply "F#123 US#456 My task"'));
1920
}
2021
}

0 commit comments

Comments
 (0)