homu
homu copied to clipboard
Handle mergeability errors more gracefully
I'm seeing a mergeability error of the following form quite frequently in the log:
INFO:homu:Starting build of servo/servo#15142 on try: 4675448367063a6e2043c0cc4559f79695348f76
* Error while fetching mergeability
Traceback (most recent call last):
File "/home/servo/homu/_venv/lib/python3.4/site-packages/homu/main.py", line 754, in fetch_mergeability
mergeable = state.get_repo().pull_request(state.num).mergeable
AttributeError: 'NoneType' object has no attribute 'mergeable'
We should either retry when state.get_repo().pull_request(state.num) returns none, or just set mergeable to false upon failure to retrieve the mergeability state. (see https://developer.github.com/v3/pulls/)
This is pretty low-hanging fruit for a Pythonista and you're welcome to ping me on IRC if you'd like any guidance on it.
I can help, but am new to the codebase and github-api. Guidance welcomed.