sympy / sympy-bot-old

SymPy pull request helper
http://reviews.sympy.org/
Other
24 stars 16 forks source link

Handle cleanly the case when pull["head"]["repo"] returns None. #148

Closed jrioux closed 11 years ago

jrioux commented 11 years ago

This may be linked to the user sending a PR from his master branch. For example, see https://github.com/sympy/sympy/pull/1793

asmeurer commented 11 years ago

I wonder if this is actually a github bug.

certik commented 11 years ago

This is +1 from me.

jrioux commented 11 years ago

Could be. I just know that it previously crashed my bot:

> Reviewing pull request #1793
Traceback (most recent call last):
  File "./sympy-bot", line 709, in <module>
    main()
  File "./sympy-bot", line 248, in main
    dispatch_reviews(options, urls, username=username, password=password, token=token)
  File "./sympy-bot", line 424, in dispatch_reviews
    repo_url = pull["head"]["repo"]["html_url"]
TypeError: 'NoneType' object is not subscriptable

and with this change it proceeds with the review.

asmeurer commented 11 years ago

Let's report it to @github just in case.