From 489d4d4255491469fa7475142a579fc7acba1ae0 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:42:31 +0800 Subject: [PATCH 1/2] Update update-pr-branches.yml --- .github/workflows/update-pr-branches.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/update-pr-branches.yml b/.github/workflows/update-pr-branches.yml index 6c68c989e5..88ff96976c 100644 --- a/.github/workflows/update-pr-branches.yml +++ b/.github/workflows/update-pr-branches.yml @@ -1,6 +1,18 @@ name: Update PR Branches on: + push: + branches: main + paths: + - "tests/*" + - ".github/workflows/ci.yml" + - ".github/workflows/pr.yml" + - "util/check-pr-template.cjs" + - "util/disallowed-cnames.json" + - "util/internal.json" + - "util/reserved.json" + - "util/trusted.json" + workflow_dispatch: jobs: From d30e97287dce38d0283738d7d1c25064970fc81f Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Wed, 19 Aug 2026 13:43:27 +0800 Subject: [PATCH 2/2] Refactor error handling for label creation Removed the creation of a label if a 404 error occurs, now only throws the error. --- .github/workflows/pr.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 06539107bb..a14166e2a7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -135,17 +135,7 @@ jobs: name: label }); } catch (error) { - if (error.status === 404) { - await github.rest.issues.createLabel({ - owner: context.repo.owner, - repo: context.repo.repo, - name: label, - color: "D93F0B", - description: "Your PR template is not complete. (e.g. missing the requirements form, missing website preview)" - }); - } else { - throw error; - } + throw error; } const labels = await github.rest.issues.listLabelsOnIssue({