File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments