diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index c567f17f..8fa665be 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -13,6 +13,7 @@ jobs:
permissions:
id-token: write
contents: read
+ pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
@@ -30,13 +31,12 @@ jobs:
cloudfront_distribution_id: ${{ secrets.CLOUDFRONT_ID_TEST }}
cloudfront_invalidation_paths: '/preview/${{ github.event.number }}/*'
- name: Adding comment to PR with preview link and validation results
- uses: actions/github-script@v6
+ uses: actions/github-script@v7
with:
- github-token: ${{ secrets.SUPPORT_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Check **PR ${{ github.event.number }}** preview 👀
[https://x.test.empathy.co/preview/${{ github.event.number }}/index.html](https://x.test.empathy.co/preview/${{ github.event.number }}/index.html) `
- })
\ No newline at end of file
+ })