Skip to content

Commit

Permalink
ci: fix size labeler (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
Josephasafg authored Jul 30, 2024
1 parent 4b85505 commit 1247b81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1247b81

Please sign in to comment.