From 2d41d26ec5c615441898db8dcae6e3b2ce7000cb Mon Sep 17 00:00:00 2001 From: Sun Date: Thu, 7 Mar 2024 14:34:15 +0800 Subject: [PATCH] fix: title regex in PR labeler --- .github/workflows/PR.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/PR.yml b/.github/workflows/PR.yml index 598e3b99..10f942ec 100644 --- a/.github/workflows/PR.yml +++ b/.github/workflows/PR.yml @@ -16,7 +16,7 @@ jobs: const pr = await github.rest.pulls.get({ owner, repo, pull_number: issue_number }); const title = pr.data.title; const labRegex = /\[LAB(\d+)\]/; - const titleRegex = /\[LAB\d+\] [\da-zA-Z]+/; + const titleRegex = /^\[LAB\d+\] [\da-zA-Z]+$/; if (!titleRegex.test(title)) { core.setFailed('PR title does not match the required format. Please use the format [LAB#] student#.');