Skip to content

Commit 7b7dbc0

Browse files
committed
Changde users exclusion to pattern exclusion in pr description check
1 parent e924812 commit 7b7dbc0

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/pr-description-validation.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ jobs:
3030
const pr = context.payload.pull_request;
3131
const body = pr.body || '';
3232
33-
// List of users to skip description validation
33+
// List of user patterns to skip description validation
3434
// This should be automations where we don't care that much about the description format
35-
const skipUsersPrefixes = [
36-
'unity-renovate',
37-
'svc-'
35+
const skipUserPatterns = [
36+
/^unity-renovate/,
37+
/(^|-)svc(-|$)/
3838
];
39-
40-
// If PR author is in the skip list, exit early
39+
40+
// If PR author matches the skip list, exit early
4141
const author = pr.user.login;
4242
console.log(`PR author: ${author}`);
43-
if (skipUsersPrefixes.some(prefix => author.startsWith(prefix))) {
43+
if (skipUserPatterns.some(pattern => pattern.test(author))) {
4444
console.log(`Skipping PR description check for user: ${author}`);
4545
return;
4646
}

0 commit comments

Comments
 (0)