1- import fetch from 'node-fetch'
21import fs from 'fs'
32
43const {
@@ -25,7 +24,7 @@ if (GITHUB_EVENT_PATH && fs.existsSync(GITHUB_EVENT_PATH)) {
2524 const payload = JSON . parse ( fs . readFileSync ( GITHUB_EVENT_PATH , 'utf8' ) )
2625
2726 if ( GITHUB_EVENT_NAME === 'push' ) {
28- message += `\n*Push*\n`
27+ message += `\n*Push*\n\n `
2928 message += `Branch: ${ GITHUB_REF ?. replace ( 'refs/heads/' , '' ) } \n`
3029
3130 payload . commits ?. slice ( 0 , 3 ) . forEach ( ( c , i ) => {
@@ -35,15 +34,15 @@ if (GITHUB_EVENT_PATH && fs.existsSync(GITHUB_EVENT_PATH)) {
3534
3635 if ( GITHUB_EVENT_NAME === 'pull_request' || GITHUB_EVENT_NAME === 'pull_request_target' ) {
3736 const pr = payload . pull_request
38- message += `\n*Pull Request*\n`
37+ message += `\n*Pull Request*\n\n `
3938 message += `Title: ${ pr . title } \n`
4039 message += `Action: ${ payload . action } \n`
4140 message += `URL: ${ pr . html_url } \n`
4241 }
4342
4443 if ( GITHUB_EVENT_NAME === 'issues' ) {
4544 const issue = payload . issue
46- message += `\n*Issue*\n`
45+ message += `\n*Issue*\n\n `
4746 message += `Title: ${ issue . title } \n`
4847 message += `Action: ${ payload . action } \n`
4948 message += `URL: ${ issue . html_url } \n`
0 commit comments