Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tekktrik committed Mar 15, 2024
1 parent 66678e7 commit 28257db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion circfirm/backend/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""

import datetime
import pprint
import re
from typing import List, Tuple, TypedDict

Expand Down Expand Up @@ -68,9 +69,11 @@ def get_board_id_list(token: str) -> List[str]:
},
headers=headers,
)
jj = response.json()
try:
tree_items: List[GitTreeItem] = response.json()["tree"]
tree_items: List[GitTreeItem] = jj["tree"]
except KeyError as err:
pprint.pp(jj)
raise ValueError("Could not parse JSON response, check token") from err
for tree_item in tree_items:
if tree_item["type"] != "tree":
Expand Down
1 change: 1 addition & 0 deletions tests/cli/test_cli_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_query_board_ids(monkeypatch: pytest.MonkeyPatch) -> None:
)

result = RUNNER.invoke(cli, ["query", "board-ids"])
print(result.output)
assert result.exit_code == 0
assert result.output == expected_output

Expand Down

0 comments on commit 28257db

Please sign in to comment.