Skip to content

Commit f3c2f24

Browse files
authored
Update main.py (#3)
* Update main.py Added support for typescript & kotlin, updated some print statements * Update main.py
1 parent 2b7d3da commit f3c2f24

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

main.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
token = sys.argv[1]
77
endpoint = sys.argv[2]
88
exclude = sys.argv[3]
9-
codeql_languages = ["cpp", "csharp", "go", "java", "javascript", "python", "ruby"]
9+
codeql_languages = ["cpp", "csharp", "go", "java", "javascript", "python", "ruby", "typescript", "kotlin"]
1010

1111

1212
# Connect to the languages API and return languages
@@ -25,6 +25,10 @@ def build_languages_list(languages):
2525
languages[i] = ("cpp")
2626
if languages[i] == "c":
2727
languages[i] = ("cpp")
28+
if languages[i] == "typescript":
29+
languages[i] = ("javascript")
30+
if languages[i] == "kotlin":
31+
languages[i] = ("java")
2832

2933
intersection = list(set(languages) & set(codeql_languages))
3034
return intersection
@@ -40,8 +44,7 @@ def exclude_languages(language_list):
4044
def set_action_output(output_name, value) :
4145
if "GITHUB_OUTPUT" in os.environ :
4246
with open(os.environ["GITHUB_OUTPUT"], "a") as f :
43-
print("{0}={1}".format(output_name, value), file=f)
44-
print("{0}={1}".format(output_name, value))
47+
print("Detected languages: {0}={1}".format(output_name, value), file=f)
4548

4649
def main():
4750
languages = get_languages()

0 commit comments

Comments
 (0)