Skip to content

GIT_HOST_USER_PATTERN

PromptScript API


const GIT_HOST_USER_PATTERN: RegExp

Defined in: core/src/types/approval.ts:91

A Git host user handle: @, a letter or digit, then letters, digits, _, . or -, with no two of _.- in a row and none at the end. GitLab users may hold . and _, and GitHub managed users end in _<shortcode>. Hosts never issue other handles, and CODEOWNERS ignores an invalid user, so it would drop the rule’s protection silently. Governance owners and approvers share this rule. _.- never matches a letter or digit, so each character has one way to match and the match stays linear. No lookahead, because TypeDoc reads ]( in the pattern as a Markdown link.