Skip to content

Commit

Permalink
Merge pull request #58 from homoluctus/fix/commit_message
Browse files Browse the repository at this point in the history
Get first line if commit message includes newline
  • Loading branch information
homoluctus authored Dec 6, 2019
2 parents 9dcaaf0 + f3f2617 commit 61c6b12
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'

- name: Setup TS
run: npm install tslint typescript -g
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: '12.x'

- name: Create Release
uses: actions/[email protected]
Expand All @@ -33,4 +33,6 @@ jobs:
type: ${{ job.status }}
job_name: ':rocket: *Publish new release ${{ github.ref }}*'
channel: '#develop'
url: ${{ secrets.SLACK_WEBHOOK }}
url: ${{ secrets.SLACK_WEBHOOK }}
commit: true
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11024,7 +11024,7 @@ class Block {
const { data: commit } = yield client.repos.getCommit({ owner, repo, ref });
const authorName = commit.author.login;
const authorUrl = commit.author.html_url;
const commitMsg = commit.commit.message;
const commitMsg = commit.commit.message.split('\n')[0];
const commitUrl = commit.html_url;
const fields = [
{
Expand Down
2 changes: 1 addition & 1 deletion src/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Block {
);
const authorName: string = commit.author.login;
const authorUrl: string = commit.author.html_url;
const commitMsg: string = commit.commit.message;
const commitMsg: string = commit.commit.message.split('\n')[0];
const commitUrl: string = commit.html_url;
const fields: MrkdwnElement[] = [
{
Expand Down

0 comments on commit 61c6b12

Please sign in to comment.