Skip to content

Commit ae1dfc2

Browse files
committed
ci: set explicit permissions and avoid interpolation
1 parent 09c49c4 commit ae1dfc2

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313

14+
permissions: {}
15+
1416
jobs:
1517
lint:
1618
runs-on: ubuntu-latest

.github/workflows/size-comment.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,13 @@ jobs:
5656
- name: 💬 Post or update comment
5757
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
5858
if: false
59+
env:
60+
PR_NUMBER: ${{ steps.pr.outputs.result }}
61+
COMMENT_BODY: ${{ steps.sizes.outputs.comment }}
5962
with:
6063
script: |
61-
const prNumber = ${{ steps.pr.outputs.result }};
62-
const commentBody = `${{ steps.sizes.outputs.comment }}`;
64+
const prNumber = Number(process.env.PR_NUMBER);
65+
const commentBody = process.env.COMMENT_BODY;
6366
6467
// Find existing comment
6568
const comments = await github.rest.issues.listComments({

0 commit comments

Comments
 (0)