From 5774e147501abab5f6e5a5954b23c298640866bd Mon Sep 17 00:00:00 2001 From: Josephasafg Date: Tue, 30 Jul 2024 16:41:49 +0300 Subject: [PATCH] ci: fix size labeler --- .github/workflows/labeler.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 63383ea1..4e6ff4b1 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -92,8 +92,9 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} script: | const sizeLabels = ['size:s', 'size:m', 'size:l', 'size:xl', 'size:xxl']; + const newLabel = ${{ env.label }}; const currentLabels = ${{ steps.fetch_labels.outputs.result }}; - const labelsToRemove = currentLabels.filter(label => sizeLabels.includes(label)); + const labelsToRemove = currentLabels.filter(label => sizeLabels.includes(label) && label !== newLabel); for (const label of labelsToRemove) { await github.rest.issues.removeLabel({ owner: context.repo.owner,