ci: skip adding PR labels if there are none to add (#25475)

This commit is contained in:
Damian Głowala 2024-01-28 21:52:38 +01:00 committed by GitHub
parent 9eb0d21ad5
commit 80b1c7077f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,9 +71,11 @@ jobs:
} }
// Add selected labels // Add selected labels
if (labelsToAdd.length > 0) {
github.rest.issues.addLabels({ github.rest.issues.addLabels({
issue_number: pullRequest.number, issue_number: pullRequest.number,
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
labels: labelsToAdd labels: labelsToAdd
}) })
}