Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that language validation works on all supported languages #459

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions shared/torngit/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import httpx

from shared.django_apps.core.models import Repository
from shared.torngit.cache import torngit_cache
from shared.torngit.enums import Endpoints
from shared.torngit.response_types import ProviderPull
Expand Down Expand Up @@ -38,28 +39,7 @@ class TorngitBaseAdapter(object):
_token: Token | None = None
verify_ssl = None

valid_languages = (
"javascript",
"shell",
"python",
"ruby",
"perl",
"dart",
"java",
"c",
"clojure",
"d",
"fortran",
"go",
"groovy",
"kotlin",
"php",
"r",
"scala",
"swift",
"objective-c",
"xtend",
)
valid_languages = set(language.value for language in Repository.Languages)

def __init__(
self,
Expand Down
Loading