Skip to content

Commit 6f44f84

Browse files
authored
Merge pull request #730 from PickNikRobotics/claude/weekly-failure-issue-bug-type
Add Bug type and example_ws label to weekly failure issue
2 parents 992d79c + 7b6c61f commit 6f44f84

1 file changed

Lines changed: 35 additions & 6 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,41 @@ jobs:
404404
});
405405
core.info(`Commented on existing ${issueOwner}/${issueRepo} issue #${existing.number}.`);
406406
} else {
407-
const created = await github.rest.issues.create({
408-
owner: issueOwner,
409-
repo: issueRepo,
410-
title,
411-
body,
412-
});
407+
// `type` is the native org-level issue Type (moveit_pro triages
408+
// failures by Type); `labels` marks the issue as originating from
409+
// example_ws so it can be filtered in moveit_pro's shared tracker.
410+
// Both are applied best-effort: if the create rejects them (e.g.
411+
// the "Bug" type is renamed), retry with just title/body so the
412+
// failure notification still lands rather than throwing and being
413+
// silently dropped — same fail-open intent as the search above.
414+
let created;
415+
try {
416+
created = await github.rest.issues.create({
417+
owner: issueOwner,
418+
repo: issueRepo,
419+
title,
420+
body,
421+
type: 'Bug',
422+
labels: ['example_ws'],
423+
});
424+
} catch (e) {
425+
// Only retry on a 422 (the type/labels were rejected). Any other
426+
// error — including a lost response after the issue was already
427+
// created remotely — must rethrow, or the retry would file a
428+
// duplicate issue.
429+
if (e?.status !== 422) {
430+
throw e;
431+
}
432+
core.warning(
433+
`Create with type/labels rejected (${e.message}); retrying without them.`
434+
);
435+
created = await github.rest.issues.create({
436+
owner: issueOwner,
437+
repo: issueRepo,
438+
title,
439+
body,
440+
});
441+
}
413442
core.info(`Opened ${issueOwner}/${issueRepo} issue #${created.data.number}.`);
414443
}
415444

0 commit comments

Comments
 (0)