Skip to content

Commit c51aaa5

Browse files
committed
cleanup
1 parent a82e947 commit c51aaa5

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

dist/813.index.js

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/813.index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers/create-batched-commit-message.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,14 @@ export const createBatchedCommitMessage = () => {
2121
error('No commits found in the event payload.');
2222
return;
2323
}
24+
25+
const maxCharactersPerMessage = 50;
26+
2427
return eventPayload.commits
2528
.map(commit => {
2629
const prNumberMatch = commit.message.match(/\(#(\d+)\)/)?.[0] ?? '';
2730
const messageWithoutPrNumber = commit.message.replace(prNumberMatch, '').trim();
28-
const truncatedMessage = messageWithoutPrNumber.slice(0, 50);
31+
const truncatedMessage = messageWithoutPrNumber.slice(0, maxCharactersPerMessage);
2932
if (truncatedMessage.length < messageWithoutPrNumber.length) {
3033
return `${truncatedMessage}... ${prNumberMatch ?? 'PR unknown'}`;
3134
}

0 commit comments

Comments
 (0)