From 6e361537994dfeedae2f64b07243118ba0d838d7 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 27 Mar 2024 09:50:55 -0700 Subject: [PATCH] build: fix potential source of errors in issue workflow (#41715) --- .github/workflows/issue-opened.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/issue-opened.yml b/.github/workflows/issue-opened.yml index 809fc8a46c79..6e69b2615e18 100644 --- a/.github/workflows/issue-opened.yml +++ b/.github/workflows/issue-opened.yml @@ -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 = [];