File tree Expand file tree Collapse file tree 1 file changed +13
-18
lines changed
Expand file tree Collapse file tree 1 file changed +13
-18
lines changed Original file line number Diff line number Diff line change 1111
1212jobs :
1313 validate-readme :
14+ permissions :
15+ pull-requests : write
16+ contents : read
1417 runs-on : ubuntu-latest
1518 steps :
1619 - name : Checkout code
@@ -42,31 +45,23 @@ jobs:
4245
4346 - name : Comment on PR if README.md needs updating
4447 if : steps.check-diff.outputs.status == 'failure'
45- uses : actions/github-script@v7
48+ uses : marocchino/sticky-pull-request-comment@v2
4649 with :
47- github-token : ${{ secrets.GITHUB_TOKEN }}
48- script : |
49- const diff = `${{ steps.check-diff.outputs.diff }}`;
50- const body = `## ⚠️ README.md needs to be updated
50+ header : readme-validation
51+ message : |
52+ ## ⚠️ README.md needs to be updated
5153
52- The \ `update-readme.js\ ` script detected changes that need to be made to the README.md file.
54+ The `update-readme.js` script detected changes that need to be made to the README.md file.
5355
54- Please run \ `node update-readme.js\ ` locally and commit the changes before merging this PR.
56+ Please run `node update-readme.js` locally and commit the changes before merging this PR.
5557
5658 <details>
5759 <summary>View diff</summary>
5860
59- \`\`\`diff
60- ${diff}
61- \`\`\`
62- </details>`;
63-
64- github.rest.issues.createComment({
65- owner: context.repo.owner,
66- repo: context.repo.repo,
67- issue_number: context.issue.number,
68- body: body
69- });
61+ ```diff
62+ ${{ steps.check-diff.outputs.diff }}
63+ ```
64+ </details>
7065
7166 - name : Fail workflow if README.md needs updating
7267 if : steps.check-diff.outputs.status == 'failure'
You can’t perform that action at this time.
0 commit comments