diff --git a/.github/workflows/pr-description-validation.yml b/.github/workflows/pr-description-validation.yml index 748e887db5..eabd029d6f 100644 --- a/.github/workflows/pr-description-validation.yml +++ b/.github/workflows/pr-description-validation.yml @@ -30,17 +30,17 @@ jobs: const pr = context.payload.pull_request; const body = pr.body || ''; - // List of users to skip description validation + // List of user patterns to skip description validation // This should be automations where we don't care that much about the description format - const skipUsersPrefixes = [ - 'unity-renovate', - 'svc-' + const skipUserPatterns = [ + /^unity-renovate/, + /(^|-)svc(-|$)/ ]; - - // If PR author is in the skip list, exit early + + // If PR author matches the skip list, exit early const author = pr.user.login; console.log(`PR author: ${author}`); - if (skipUsersPrefixes.some(prefix => author.startsWith(prefix))) { + if (skipUserPatterns.some(pattern => pattern.test(author))) { console.log(`Skipping PR description check for user: ${author}`); return; }