Skip to content

Commit 705fdd4

Browse files
fix: Strip type/scope from changelog lines (#102)
1 parent 4aea156 commit 705fdd4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/publish/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export const publish = async (options) => {
115115
return {
116116
hash: c.hash.substring(0, 7),
117117
body: c.body,
118-
message: c.message,
118+
subject: parsed.subject ?? '',
119119
author_name: c.author_name,
120120
author_email: c.author_email,
121121
type: parsed.type?.toLowerCase() ?? 'other',
@@ -145,7 +145,7 @@ export const publish = async (options) => {
145145
if (commit.body.includes('BREAKING CHANGE')) {
146146
releaseLevel = Math.max(releaseLevel, 2)
147147
}
148-
if (commit.message.includes('RELEASE_ALL') || commit.body.includes('RELEASE_ALL')) {
148+
if (commit.subject.includes('RELEASE_ALL') || commit.body.includes('RELEASE_ALL')) {
149149
RELEASE_ALL = true
150150
}
151151
}
@@ -296,9 +296,9 @@ export const publish = async (options) => {
296296
}
297297

298298
const scope = commit.scope ? `${commit.scope}: ` : ''
299-
const message = commit.message
299+
const subject = commit.subject
300300

301-
return `- ${scope}${message} (${commit.hash}) ${
301+
return `- ${scope}${subject} (${commit.hash}) ${
302302
username
303303
? `by @${username}`
304304
: `by ${commit.author_name || commit.author_email}`

src/publish/types.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export type Commit = {
22
hash: string
33
body: string
4-
message: string
4+
subject: string
55
author_name: string
66
author_email: string
77
type: string

0 commit comments

Comments
 (0)