Skip to content

Commit

Permalink
Add comment script to diff dist workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
domoscargin committed May 10, 2023
1 parent cf09dce commit 3a8a922
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/diff-change-to-dist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,15 @@ jobs:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const fs = require('fs').promises
const commentOnPr = require('./shared/stats/comment.js').commentOnPr
const diff = await fs.readFile(
process.env.GITHUB_WORKSPACE + '/dist.diff', 'utf8'
)
const commentText = '## Changes to dist\n' +
const commentText = '<!-- Diff release -->' +
'## Changes to dist\n' +
'```diff\n' +
diff +
'\n```'
github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: commentText
})
await commentOnPr({github,context}, '<!-- Diff release -->', commentText)

0 comments on commit 3a8a922

Please sign in to comment.