Maciej Szulik added the comment:

Those are the three remaining issues, all the rest looks good. 

roundup/pull_request.py:

> except Unauthorised, message:
>     logging.error(message, exc_info=True)
>     raise Unauthorised(message)
> except MethodNotAllowed, message:
>     logging.error(message, exc_info=True)
>     raise MethodNotAllowed(message)
> except UnsupportedMediaType, message:
>     logging.error(message, exc_info=True)
>     raise UnsupportedMediaType(message)

You can just re-rise an exception with rise, like so:

except UnsupportedMediaType, message:
    logging.error(message, exc_info=True)
    raise

> if 'pull_request' in self.data['issue']:
>     return self.data['issue']['pull_request']['html_url']\
>         .encode('utf-8')

You can safely just return without the if, like you do in other methods.
You have the "safety net" at dispatch level, iow. try-except clauses.


There's still a problem that multiple calls to the same bug will create 
multiple links to the same PR. 
Example: create issue1 and invoke curl -H "X-GitHub-Event: pull_request" -H 
"content-type: application/json" -H "X-Hub-Signature: 
sha1=2c74c307193b7276fef7b1776956da2288034e5b" -d 
@test/data/pullrequestevent.txt localhost:9999/python-dev/pull_request
several times, you'll get that many 
https://github.com/AnishShah/cpython/pull/11 urls as you invoked the curl.

_______________________________________________________
PSF Meta Tracker <metatrac...@psf.upfronthosting.co.za>
<http://psf.upfronthosting.co.za/roundup/meta/issue589>
_______________________________________________________
_______________________________________________
Tracker-discuss mailing list
Tracker-discuss@python.org
https://mail.python.org/mailman/listinfo/tracker-discuss
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to