Skip to content

Commit

Permalink
Use proper alarming
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanWoollett-Light committed Apr 10, 2024
1 parent 35943e0 commit 6389a1a
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def diff():
print("Running diff.")

response = requests.post(
url=f"{ADDR}commits",
data=json.dumps({"commits": [base, head]}),
url=f"{ADDR}check_alarms",
data=json.dumps({"first": base, "second": head}),
headers={"Content-Type": "application/json"},
cookies=session_cookie,
timeout=TIMEOUT,
Expand All @@ -76,17 +76,8 @@ def diff():
assert head in response_json

changes = {}
commit_one = response_json[base]
for key, value in commit_one.items():
changes[key] = {"from": value, "to": None}

commit_two = response_json[head]
for key, value in commit_two.items():
if key in changes:
changes[key]["to"] = value
else:
changes[key] = {"from": None, "to": value}

for key, value in response_json.items():
changes[key] = {"from": value["from"], "to": value["to"]}
print(f"changes: {changes}")

table_set = []
Expand Down

0 comments on commit 6389a1a

Please sign in to comment.