fix: headers

This commit is contained in:
Alex
2024-10-05 21:36:04 +01:00
parent 8fa88175c1
commit 1ad82c22d9

View File

@@ -31,8 +31,7 @@ class GitHubLoader(BaseRemote):
def fetch_repo_files(self, repo_url: str, path: str = "") -> List[str]:
url = f"https://api.github.com/repos/{repo_url}/contents/{path}"
response = requests.get(url, headers=self.headers)
response.raise_for_status()
response = requests.get(url, headers={**self.headers, "Accept": "application/vnd.github.v3.raw"})
contents = response.json()
files = []
for item in contents: