Skip to content

Commit 355a69a

Browse files
committed
add search for default branch
Signed-off-by: Isaac Milarsky <[email protected]>
1 parent 0f28664 commit 355a69a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

codejson_index_generator/parsers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, agency: str, verison: str, token: Optional[str] = None,):
2323

2424
def get_code_json(self, repo: Repository) -> Optional[Dict]:
2525
try:
26-
content = repo.get_contents("code.json", ref = "main")
26+
content = repo.get_contents("code.json", ref = repo.default_branch)
2727
except GithubException as e:
2828
print(f"GitHub Error: {e.data.get('message', 'No message available')}")
2929
return None

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "codejson-index-generator"
3-
version = "1.0.0"
3+
version = "1.0.1"
44
description = "Script to create an indexed code.json for agencies."
55
authors = ["Sachin Panayil <[email protected]>"]
66
license = "CC0-1.0"

0 commit comments

Comments
 (0)