Skip to content

Commit 1dd48a9

Browse files
committed
Add _ as allowed character in usernameRegexp
While generally disallowed from public github usernames, an underscore is a key part of github EMU usernames. See https://docs.github.com/en/enterprise-cloud@latest/admin/identity-and-access-management/understanding-iam-for-enterprises/about-enterprise-managed-users for more information.
1 parent bd19ed7 commit 1dd48a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: parse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
var (
1313
emailRegexp = regexp.MustCompile(`\A[A-Z0-9a-z\._%\+\-]+@[A-Za-z0-9\.\-]+\.[A-Za-z]{2,6}\z`)
1414
teamRegexp = regexp.MustCompile(`\A@([a-zA-Z0-9\-]+\/[a-zA-Z0-9_\-]+)\z`)
15-
usernameRegexp = regexp.MustCompile(`\A@([a-zA-Z0-9\-]+)\z`)
15+
usernameRegexp = regexp.MustCompile(`\A@([a-zA-Z0-9\-_]+)\z`)
1616
)
1717

1818
const (

0 commit comments

Comments
 (0)