Skip to content

Commit

Permalink
fix labeler workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Aug 11, 2024
1 parent 7472072 commit 781a6c7
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ jobs:
contents: read
pull-requests: write
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- uses: actions/labeler@v5
with:
configuration-path: .github/labeler.yml

- name: Calculate the PR size
- name: "Apply size label"
uses: actions/github-script@v7
id: calculate-size
with:
script: |
console.log("Fetching pull request diff...");
Expand Down Expand Up @@ -44,16 +46,6 @@ jobs:
else if (changedLines > 9) label = 'size:S';
else label = 'size:XS';
console.log(`Assigned label: ${label}`);
core.setOutput("size-label", label);
- name: Apply size label
uses: actions/github-script@v7
with:
script: |
const label = core.getInput('size-label');
console.log(`Retrieved label from previous step: ${label}`);
if (label) {
console.log(`Applying label "${label}" to the pull request...`);
await github.rest.issues.addLabels({
Expand Down

0 comments on commit 781a6c7

Please sign in to comment.