Description
Validation fails on checking valid enterprise sso users
Example: @user-name-can-be-very-long_and-has-underscore
Validation fails after adding SSO user to CODEOWNERS file.
Expected result
User should be validated successfully.
Actual result
Fails with
Owner @user_id does not look like a GitHub username or team name
Steps to reproduce
Add * @user_id to CODEOWNERS file
Troubleshooting
Here's the regex that doesn't match it.
|
usernameOrTeamRegexp = regexp.MustCompile(`^@(?i:[a-z\d](?:[a-z\d-]){0,37}[a-z\d](/[a-z\d](?:[a-z\d_-]*)[a-z\d])?)$`) |
Description
Validation fails on checking valid enterprise sso users
Example:
@user-name-can-be-very-long_and-has-underscoreValidation fails after adding SSO user to CODEOWNERS file.
Expected result
User should be validated successfully.
Actual result
Fails with
Steps to reproduce
Add
* @user_idto CODEOWNERS fileTroubleshooting
Here's the regex that doesn't match it.
codeowners-validator/internal/check/valid_syntax.go
Line 16 in 84b4fa2