Skip to content

Commit

Permalink
Fix labeler workflow (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich authored Aug 11, 2024
1 parent 66b939d commit 3a310d4
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,19 @@ jobs:
else if (changedLines > 9) label = 'size:S';
else label = 'size:XS';
return label;
core.setOutput("size-label", label);
- name: Apply size label
uses: actions/github-script@v7
if: steps.calculate-size.outputs.result
with:
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [ "${{steps.calculate-size.outputs.result}}" ]
})
const label = core.getInput('size-label');
if (label) {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [label]
});
}

0 comments on commit 3a310d4

Please sign in to comment.