From fffed257a8b8a9a0f7698b4296ffb5f05d3f4803 Mon Sep 17 00:00:00 2001 From: Josephasafg Date: Tue, 30 Jul 2024 16:50:35 +0300 Subject: [PATCH 1/2] ci: Added quotes --- .github/workflows/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 4e6ff4b1..43c0cde3 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -92,7 +92,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const sizeLabels = ['size:s', 'size:m', 'size:l', 'size:xl', 'size:xxl']; - const newLabel = ${{ env.label }}; + const newLabel = "${{ env.label }}"; const currentLabels = ${{ steps.fetch_labels.outputs.result }}; const labelsToRemove = currentLabels.filter(label => sizeLabels.includes(label) && label !== newLabel); for (const label of labelsToRemove) { From d889f6ca40e411b24093958995edd1329d17081f Mon Sep 17 00:00:00 2001 From: Josephasafg Date: Tue, 30 Jul 2024 16:52:47 +0300 Subject: [PATCH 2/2] ci: Read from env --- .github/workflows/labeler.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 43c0cde3..c2cebaf9 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -88,11 +88,13 @@ jobs: - name: Remove old size labels id: remove_labels uses: actions/github-script@v7 + env: + NEW_SIZE_LABEL: ${{ env.label }} with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const sizeLabels = ['size:s', 'size:m', 'size:l', 'size:xl', 'size:xxl']; - const newLabel = "${{ env.label }}"; + const newLabel = "${{ process.env.NEW_SIZE_LABEL }}"; const currentLabels = ${{ steps.fetch_labels.outputs.result }}; const labelsToRemove = currentLabels.filter(label => sizeLabels.includes(label) && label !== newLabel); for (const label of labelsToRemove) {