Skip to content

Commit

Permalink
fix: title regex in PR labeler
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiYou-TW committed Mar 7, 2024
1 parent d4b5920 commit 2d41d26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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#.');
Expand Down

0 comments on commit 2d41d26

Please sign in to comment.