Skip to content

Commit

Permalink
Ignore it when we can't access the URL for a commit
Browse files Browse the repository at this point in the history
Works around #84.
  • Loading branch information
asmeurer committed Feb 25, 2020
1 parent 06cd750 commit 563276a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sympy_bot/webapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ async def pull_request_comment(event, gh):
header_in_message = commit['sha']

# Workaround https://github.com/sympy/sympy-bot/issues/84
com = await gh.getitem(f"https://api.github.com/repos/sympy/sympy/commits/{commit['sha']}")
try:
com = await gh.getitem(commit['url'])
except BadRequest:
print(f"Warning: could not get commit {commit['sha']}")
continue
if len(com['parents']) > 1:
# Merge commit
continue
Expand Down

0 comments on commit 563276a

Please sign in to comment.