Skip to content

Commit

Permalink
ci: skip adding PR labels if there are none to add (#25475)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianGlowala committed Jan 28, 2024
1 parent 9eb0d21 commit 80b1c70
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ jobs:
}
// Add selected labels
github.rest.issues.addLabels({
issue_number: pullRequest.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: labelsToAdd
})
if (labelsToAdd.length > 0) {
github.rest.issues.addLabels({
issue_number: pullRequest.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: labelsToAdd
})
}

0 comments on commit 80b1c70

Please sign in to comment.