Skip to content

Commit

Permalink
fix: use only first line from commit message (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
opsless-bot authored Apr 12, 2021
1 parent 57faf88 commit 60471f2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/main/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opsless/ms-teams-github-actions",
"version": "0.2.2",
"version": "0.2.3",
"private": true,
"description": "MS Teams Github Actions integration",
"main": "lib/main.js",
Expand Down
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ const send = async () => {
run_id: ctx.runId
})

const full_commit_message = wr.data.head_commit.message || ''
const commit_message = full_commit_message.split('\n')[0]

const conclusion =
lastStep?.conclusion === Conclusions.SUCCESS
? 'SUCCEEDED'
Expand All @@ -162,7 +165,7 @@ const send = async () => {
html_url: ctx.payload.repository?.html_url
},
commit: {
message: wr.data.head_commit.message,
message: commit_message,
html_url: `${wr.data.repository.html_url}/commit/${wr.data.head_sha}`
},
workflow: {
Expand Down

0 comments on commit 60471f2

Please sign in to comment.