diff --git a/README.md b/README.md index 84bae0c2..e668323a 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,11 @@ steps: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} + fields: repo,message,commit,author,action,eventName,ref,workflow # selectable (default: repo,message) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required if: always() # Pick up events even if the job fails or is canceled. ``` -success +success diff --git a/docs/content/index.md b/docs/content/index.md index 95b053fa..56743357 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -20,10 +20,11 @@ steps: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} + fields: repo,message,commit,author,action,eventName,ref,workflow # selectable (default: repo,message) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # optional SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required if: always() # Pick up events even if the job fails or is canceled. ``` -success +success diff --git a/src/client.ts b/src/client.ts index f5adef9d..5e7110e6 100644 --- a/src/client.ts +++ b/src/client.ts @@ -146,7 +146,9 @@ export class Client { commit && this.includesField('message') ? { title: 'message', - value: `<${commit.data.html_url}|${commit.data.commit.message}>`, + value: `<${commit.data.html_url}|${ + commit.data.commit.message.split('\n')[0] + }>`, short: true, } : undefined,