This commit is contained in:
2025-02-19 00:36:51 +03:00
parent da837923b6
commit c6e0e0349c
3 changed files with 63 additions and 30 deletions

View File

@@ -6,6 +6,7 @@
*/
const getCommitEmoji = (message, stats) => {
const msg = message.toLowerCase()
if (msg.includes('merge')) return '📎'
if (msg.includes('fix')) return '🔧'
if (msg.includes('feat')) return '✨'
if (msg.includes('break')) return '💥'
@@ -66,7 +67,7 @@ const formatMessage = (data, commits) => {
const stats = formatStats(totalStats)
return [
`🔄 [${repoId}](${repoUrl}):[${branch}](${branchUrl}) ${commits.length} new commit${commits.length === 1 ? '' : 's'}`,
`🔄 [${repoId}](${repoUrl}):[${branch}](${branchUrl}) ${commits.length} new commit${Array.from(commits.length.toString()).pop() === '1' ? '' : 's'}`,
stats && commits.length > 1 ? `📊 ${stats}` : '',
commits.map(commit => formatCommit(commit, repoUrl)).join('\n')
].filter(Boolean).join('\n')