Browse Source

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

Samuel Attard 1 year ago
parent
commit
6e36153799
1 changed files with 3 additions and 1 deletions
  1. 3 1
      .github/workflows/issue-opened.yml

+ 3 - 1
.github/workflows/issue-opened.yml

@@ -38,6 +38,8 @@ jobs:
       - run: npm install [email protected] [email protected]
       - 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 = [];