Skip to content

Commit 3ef3c87

Browse files
committed
feat(Slack): add full changelog for each field
1 parent 62474dd commit 3ef3c87

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/services/slack.ts

+20
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,26 @@ export class Slack {
309309
})
310310
}
311311

312+
if (param.changeLogs.length > 0) {
313+
const changeLogElementList: RichTextElement[] = []
314+
315+
for (const changeLog of param.changeLogs) {
316+
const { field, oldValue, newValue } = changeLog
317+
318+
changeLogElementList.push({
319+
type: 'text',
320+
text: `${field} ${translate(
321+
'status.modified'
322+
)}: ${oldValue} -> ${newValue}`
323+
})
324+
}
325+
326+
descriptionElements.push({
327+
type: 'rich_text_section',
328+
elements: changeLogElementList
329+
})
330+
}
331+
312332
const description: RichTextList = {
313333
type: 'rich_text_list',
314334
style: 'bullet',

0 commit comments

Comments
 (0)