mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 13:20:39 +08:00
protection for no language
This commit is contained in:
@ -132,6 +132,10 @@ def get_main_pr_language(languages, files) -> str:
|
||||
Get the main language of the commit. Return an empty string if cannot determine.
|
||||
"""
|
||||
main_language_str = ""
|
||||
if not languages:
|
||||
logging.info("No languages detected")
|
||||
return main_language_str
|
||||
|
||||
try:
|
||||
top_language = max(languages, key=languages.get).lower()
|
||||
|
||||
|
Reference in New Issue
Block a user