Skip to content

Commit a37008c

Browse files
committed
fix code issues
1 parent c4a895d commit a37008c

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

open_issues.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def get_issues_table(gh_org, gitea_issues, github_issues, cur, conn, table_name)
164164
logging.error(f"Issues table: an error occurred while posting data to Postgres: {e}")
165165
conn.rollback()
166166

167-
service_pattern = re.compile(rf"(?<={gh_org}\/).([^\/]+)")
167+
service_pattern = re.compile(rf"(?<={gh_org}/).([^/]+)")
168168
for hub in github_issues:
169169
if 'pull_request' in hub:
170170
continue

scheduler.py

+12-4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,14 @@
2525

2626
# Zulip stream and topic mapping for each squad
2727
squad_streams = {
28-
"Database Squad": {"stream": "Database Squad", "topic": "Doc alerts"},
29-
"Big Data and AI Squad": {"stream": "bigdata & ai", "topic": "helpcenter_alerts"},
30-
"Compute Squad": {"stream": "compute", "topic": "hc_alerts topic"},
31-
"Network Squad": {"stream": "network", "topic": "Alerts_HelpCenter"}
28+
# "Database Squad": {"stream": "Database Squad", "topic": "Doc alerts"},
29+
# "Big Data and AI Squad": {"stream": "bigdata & ai", "topic": "helpcenter_alerts"},
30+
# "Compute Squad": {"stream": "compute", "topic": "hc_alerts topic"},
31+
# "Network Squad": {"stream": "network", "topic": "Alerts_HelpCenter"}
32+
"Database Squad": {"stream": "4grafana", "topic": "testing"},
33+
"Big Data and AI Squad": {"stream": "grafana", "topic": "testing"},
34+
"Orchestration Squad": {"stream": "4grafana", "topic": "testing"},
35+
"Compute Squad": {"stream": "grafana", "topic": "testing"}
3236
}
3337

3438

@@ -59,6 +63,7 @@ def connect_to_db(db_name):
5963

6064

6165
def check_orphans(conn_orph, squad_name, stream_name, topic_name):
66+
results = []
6267
cur_orph = conn_orph.cursor()
6368
tables = ["open_prs", "open_prs_swiss"]
6469
for table in tables:
@@ -79,6 +84,7 @@ def check_orphans(conn_orph, squad_name, stream_name, topic_name):
7984

8085

8186
def check_open_issues(conn, squad_name, stream_name, topic_name):
87+
results = []
8288
cur = conn.cursor()
8389
tables = ["open_issues", "open_issues_swiss"]
8490
for table in tables:
@@ -99,6 +105,7 @@ def check_open_issues(conn, squad_name, stream_name, topic_name):
99105

100106

101107
def check_outdated_docs(conn, squad_name, stream_name, topic_name):
108+
results = []
102109
cur = conn.cursor()
103110
tables = ["last_update_commit", "last_update_commit_swiss"]
104111
for table in tables:
@@ -119,6 +126,7 @@ def check_outdated_docs(conn, squad_name, stream_name, topic_name):
119126

120127

121128
def send_zulip_notification(row, api_key, stream_name, topic_name):
129+
message = []
122130
current_date = datetime.now().strftime("%Y-%m-%d")
123131
client = zulip.Client(email="[email protected]", api_key=api_key, site="https://zulip.tsi-vc.otc-service.com")
124132
if row["type"] == "doc":

0 commit comments

Comments
 (0)