build: fix potential source of errors in issue workflow (#41715)

This commit is contained in:
Samuel Attard 2024-03-27 09:50:55 -07:00 committed by GitHub
parent 4f76fff978
commit 6e36153799
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,6 +38,8 @@ jobs:
- run: npm install mdast-util-from-markdown@2.0.0 unist-util-select@5.1.0
- name: Add labels
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
ISSUE_BODY: ${{ github.event.issue.body }}
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
@ -47,7 +49,7 @@ jobs:
const [ owner, repo ] = '${{ github.repository }}'.split('/');
const issue_number = ${{ github.event.issue.number }};
const tree = fromMarkdown(`${{ github.event.issue.body }}`);
const tree = fromMarkdown(process.env.ISSUE_BODY);
const labels = [];