17 lines
416 B
Python
17 lines
416 B
Python
GIT_TYPE = ((0, "gitlab"), (1, "github"), (2, "gitea"))
|
|
|
|
DEFAULT_COMMANDS = (
|
|
("/review", "/review"),
|
|
("/describe", "/describe"),
|
|
("/improve_code", "/improve_code"),
|
|
)
|
|
|
|
UA_TYPE = {"GitLab": "gitlab", "GitHub": "github", "Go-http-client": "gitea"}
|
|
|
|
|
|
def get_git_type_from_ua(ua_value):
|
|
for git_type, git_value in GIT_TYPE:
|
|
if git_value == ua_value:
|
|
return git_type
|
|
return None
|