File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,10 @@ const validateGitHubToken = (token: string): boolean => {
2222}
2323
2424const validateGitLabToken = ( token : string ) : boolean => {
25- // GitLab personal access tokens: glpat- followed by 20 characters
26- // GitLab project access tokens: glpat- followed by 20 characters
27- // GitLab group access tokens: glpat- followed by 20 characters
28- const personalTokenPattern = / ^ g l p a t - [ A - Z a - z 0 - 9 _ - ] { 20 } $ /
29- return personalTokenPattern . test ( token )
25+ // GitLab personal access tokens: glpat- followed by at least 20 characters
26+ // GitLab tokens can be longer than 20 characters (up to 50+ characters)
27+ const tokenPattern = / ^ g l p a t - [ A - Z a - z 0 - 9 _ . - ] { 20 , } $ /
28+ return tokenPattern . test ( token )
3029}
3130
3231export default function PrivateReposDialog ( { repoType } : PrivateReposDialogProps ) {
@@ -100,9 +99,9 @@ export default function PrivateReposDialog({ repoType }: PrivateReposDialogProps
10099 return (
101100 < ul className = "list-disc list-inside space-y-1" >
102101 < li > Must have "read_repository" scope for repository access</ li >
103- < li > Personal access token format: glpat- followed by 20 characters</ li >
102+ < li > Personal access token format: glpat- followed by 20+ characters</ li >
104103 < li > Should not expire soon (or set no expiration)</ li >
105- < li > Must be exactly 26 characters total (glpat- + 20 chars )</ li >
104+ < li > Token length varies (typically 26-55+ characters total )</ li >
106105 </ ul >
107106 )
108107 }
You can’t perform that action at this time.
0 commit comments