Skip to content

Commit 728aa2a

Browse files
fix GitHub PAT regex
1 parent ba1b6ad commit 728aa2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gitingest/utils/git_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from gitingest.utils.exceptions import InvalidGitHubTokenError
1111

12-
GITHUB_PAT_PATTERN = r"^(?:github_pat_|ghp_)[A-Za-z0-9_]{36,}$"
12+
GITHUB_PAT_PATTERN = r"^(?:gh[pousr]_[A-Za-z0-9]{36}|github_pat_[A-Za-z0-9]{22}_[A-Za-z0-9]{59})$"
1313

1414

1515
def is_github_host(url: str) -> bool:

0 commit comments

Comments
 (0)