Skip to content

Commit 60471f2

Browse files
authored
fix: use only first line from commit message (#23)
1 parent 57faf88 commit 60471f2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

dist/main/index.js

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opsless/ms-teams-github-actions",
3-
"version": "0.2.2",
3+
"version": "0.2.3",
44
"private": true,
55
"description": "MS Teams Github Actions integration",
66
"main": "lib/main.js",

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ const send = async () => {
139139
run_id: ctx.runId
140140
})
141141

142+
const full_commit_message = wr.data.head_commit.message || ''
143+
const commit_message = full_commit_message.split('\n')[0]
144+
142145
const conclusion =
143146
lastStep?.conclusion === Conclusions.SUCCESS
144147
? 'SUCCEEDED'
@@ -162,7 +165,7 @@ const send = async () => {
162165
html_url: ctx.payload.repository?.html_url
163166
},
164167
commit: {
165-
message: wr.data.head_commit.message,
168+
message: commit_message,
166169
html_url: `${wr.data.repository.html_url}/commit/${wr.data.head_sha}`
167170
},
168171
workflow: {

0 commit comments

Comments
 (0)