Skip to content

Commit a5778be

Browse files
authored
Dashboard scripts (#23)
Dashboard scripts add pyyaml to the requirements.txt Reviewed-by: Vladimir Vshivkov
1 parent 2bd3f20 commit a5778be

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

gitea_info.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,16 @@
2020

2121
db_host = os.getenv("DB_HOST")
2222
db_port = os.getenv("DB_PORT")
23+
db_csv = os.getenv("DB_CSV")
24+
db_orph = os.getenv("DB_ORPH")
2325
db_user = os.getenv("DB_USER")
2426
db_password = os.getenv("DB_PASSWORD")
2527

2628

2729
def check_env_variables():
2830
required_env_vars = [
2931
"GITHUB_TOKEN", "DB_HOST", "DB_PORT",
30-
"DB_USER", "DB_PASSWORD", "GITEA_TOKEN"
32+
"DB_CSV", "DB_ORPH", "DB_USER", "DB_PASSWORD", "GITEA_TOKEN"
3133
]
3234
for var in required_env_vars:
3335
if os.getenv(var) is None:
@@ -471,7 +473,7 @@ def main(org, gh_org, rtctable, opentable, string):
471473
check_env_variables()
472474
csv_erase()
473475

474-
conn_csv = connect_to_db("csv")
476+
conn_csv = connect_to_db(db_csv)
475477
cur_csv = conn_csv.cursor()
476478

477479
g = Github(github_token)
@@ -492,7 +494,7 @@ def main(org, gh_org, rtctable, opentable, string):
492494
update_service_titles(cur_csv, rtctable)
493495
add_squad_column(cur_csv, rtctable)
494496

495-
conn_orph = connect_to_db("orph")
497+
conn_orph = connect_to_db(db_orph)
496498
cur_orph = conn_orph.cursor()
497499

498500
cur_orph.execute(f"DROP TABLE IF EXISTS {opentable}")

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ PyNaCl==1.5.0
1212
requests==2.31.0
1313
urllib3==2.0.3
1414
wrapt==1.15.0
15+
pyyaml==6.0.1
1516
gitpython==3.1.32

0 commit comments

Comments
 (0)