Update app.py
Browse files
app.py
CHANGED
@@ -44,8 +44,9 @@ def get_repo_tree(owner: str, repo: str, branch: str):
|
|
44 |
headers = {'Authorization': f'token {GITHUB_TOKEN}'}
|
45 |
tree_url = f"https://api.github.com/repos/{owner}/{repo}/git/trees/{branch}?recursive=1"
|
46 |
response = requests.get(tree_url, headers=headers)
|
|
|
47 |
print("Repo Tree Data:", json.dumps(data, indent=2))
|
48 |
-
return
|
49 |
|
50 |
def get_file_content(owner: str, repo: str, file_path: str):
|
51 |
headers = {'Authorization': f'token {GITHUB_TOKEN}'}
|
|
|
44 |
headers = {'Authorization': f'token {GITHUB_TOKEN}'}
|
45 |
tree_url = f"https://api.github.com/repos/{owner}/{repo}/git/trees/{branch}?recursive=1"
|
46 |
response = requests.get(tree_url, headers=headers)
|
47 |
+
data = response.json()
|
48 |
print("Repo Tree Data:", json.dumps(data, indent=2))
|
49 |
+
return data
|
50 |
|
51 |
def get_file_content(owner: str, repo: str, file_path: str):
|
52 |
headers = {'Authorization': f'token {GITHUB_TOKEN}'}
|