From 2c3de9540bf4b19d8197f4eed56ad06c5f2cad28 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 8 Jul 2026 14:23:27 +0000 Subject: [PATCH] build(workflows): tolerate GitHub sub-issue cap in `create_sub_issue` The nightly `lint_random_files` workflow's "Create sub-issue for JavaScript lint failures" step failed with exit code 1 on every run in the last several weeks. The GraphQL `addSubIssue` mutation returned a VALIDATION error: "Parent cannot have more than 100 sub-issues", because tracking issue #5377 already has exactly 100 linked sub-issues, GitHub's hard per-parent cap. The child issue itself (containing the lint report) was created successfully each time; only the cosmetic parent-linking step failed, permanently turning the job red with no actionable fix available in-band. This commit detects that specific validation message and treats it as non-fatal: the script now warns and exits 0 instead of exit 1, since the underlying lint report was still filed. Any other error from the mutation (auth, network, unexpected schema) continues to fail loudly as before. Ref: https://github.com/stdlib-js/stdlib/actions/runs/28907996546 --- .github/workflows/scripts/common/create_sub_issue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/scripts/common/create_sub_issue b/.github/workflows/scripts/common/create_sub_issue index 1f28bdf85fcf..e19d5d54dfe6 100755 --- a/.github/workflows/scripts/common/create_sub_issue +++ b/.github/workflows/scripts/common/create_sub_issue @@ -251,6 +251,12 @@ main() { sub_issue_success=$(echo "$sub_issue_response" | jq -r '.data.addSubIssue.subIssue.number') if [ -z "$sub_issue_success" ] || [ "$sub_issue_success" = "null" ]; then + # Check whether the parent issue has reached GitHub's maximum number of sub-issues, in which case the child issue was still created successfully and linking is not possible until the parent is replaced or pruned: + if echo "$sub_issue_response" | jq -e '.errors // [] | any(.message // "" | test("cannot have more than 100 sub-issues"; "i"))' > /dev/null 2>&1; then + echo -e "Warning: parent issue #${parent_issue_number} has reached the maximum number of sub-issues. Child issue #${child_issue_number} was created but could not be linked." + print_success + exit 0 + fi echo -e "Failed to create sub-issue relationship. Response: ${sub_issue_response}" exit 1 fi