fix(ci): guard pr.labels access in pr-labeler workflow
Address review feedback from myasnikovdaniil on .github/workflows/pr-labeler.yaml:129: defensive (pr.labels || []) avoids TypeError if the webhook payload arrives without the labels field on edge cases like stripped edited events. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
738762994e
commit
1baadd75a7
1 changed files with 1 additions and 1 deletions
2
.github/workflows/pr-labeler.yaml
vendored
2
.github/workflows/pr-labeler.yaml
vendored
|
|
@ -126,7 +126,7 @@ jobs:
|
|||
const pr = context.payload.pull_request;
|
||||
const title = pr.title || '';
|
||||
const body = pr.body || '';
|
||||
const existing = new Set(pr.labels.map(l => l.name));
|
||||
const existing = new Set((pr.labels || []).map(l => l.name));
|
||||
const toAdd = new Set();
|
||||
|
||||
// 1. Strip "[Backport release-1.x]" prefix if present.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue