Skip to content

Commit

Permalink
Send topic Accept header in fetch_repo() too, closes #26
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Apr 16, 2020
1 parent c4aaa50 commit 85a09a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions github_to_sqlite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ def save_issue_comment(db, comment):

def fetch_repo(repo, token=None):
headers = make_headers(token)
# Get topics:
headers["Accept"] = "application/vnd.github.mercy-preview+json"
owner, slug = repo.split("/")
url = "https://api.github.com/repos/{}/{}".format(owner, slug)
return requests.get(url, headers=headers).json()
Expand Down

0 comments on commit 85a09a9

Please sign in to comment.