Pull Request Integration

Review Request #7963 — Created Feb. 15, 2016 and discarded

Information

Review Board
master

Reviewers

Pull Request Integration Feature

https://student-sonar.herokuapp.com/projects

This currently takes a GitHub payload containing pull request information and creates a new review request on Review Board. When a new review request is created, the GitHub commit is tagged with a status containing information about the review request. When an update is made to the pull request (synchronize), a new payload is sent and the associated review request is looked up from previously tagged information. After the review request is found, the updated pull request data overwrites the existing review request.
The status of the pull request on GitHub's side changes accordingly with the approval state of the review request.
A button exists to both merge the pull request and close the review request, when the review request has an approval status.

Payload is simulated to see how Review Board reacts. I test to see that a new Review Request is successfully created and that it is updated when a synchronize action is called.

Description From Last Updated

What if the X-Hub-Signature header is not provided? This will cause an attribute error (because NoneType doesn't define split method).

brenniebrennie

local variable 'server_url' is assigned to but never used

reviewbotreviewbot

'GitDiffParser' imported but unused

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 5 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E116 unexpected indentation (comment)

reviewbotreviewbot

Col: 9 E116 unexpected indentation (comment)

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 54 E221 multiple spaces before operator

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 20 E225 missing whitespace around operator

reviewbotreviewbot

Col: 58 E225 missing whitespace around operator

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

local variable 'server_url' is assigned to but never used

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 5 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E116 unexpected indentation (comment)

reviewbotreviewbot

Col: 9 E116 unexpected indentation (comment)

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 54 E221 multiple spaces before operator

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 20 E225 missing whitespace around operator

reviewbotreviewbot

Col: 58 E225 missing whitespace around operator

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

Col: 9 E265 block comment should start with '# '

reviewbotreviewbot

local variable 'server_url' is assigned to but never used

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 65 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 65 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 65 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 45 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 19 W292 no newline at end of file

reviewbotreviewbot

'spy_on' imported but unused

reviewbotreviewbot

Col: 80 E501 line too long (84 > 79 characters)

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

local variable 'response' is assigned to but never used

reviewbotreviewbot

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

Col: 23 E231 missing whitespace after ':'

reviewbotreviewbot

'File' imported but unused

reviewbotreviewbot

'DiffCompatVersion' imported but unused

reviewbotreviewbot

'DiffSet' imported but unused

reviewbotreviewbot

'FileDiff' imported but unused

reviewbotreviewbot

'GitDiffParser' imported but unused

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 17 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 17 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 80 E501 line too long (82 > 79 characters)

reviewbotreviewbot

Col: 18 E225 missing whitespace around operator

reviewbotreviewbot

Col: 17 E225 missing whitespace around operator

reviewbotreviewbot

Col: 35 E231 missing whitespace after ':'

reviewbotreviewbot

Col: 80 E501 line too long (87 > 79 characters)

reviewbotreviewbot

local variable 'diffset' is assigned to but never used

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 45 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 17 W292 no newline at end of file

reviewbotreviewbot

Col: 80 E501 line too long (113 > 79 characters)

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 43 E231 missing whitespace after ':'

reviewbotreviewbot

Col: 44 E203 whitespace before ','

reviewbotreviewbot

Col: 45 E231 missing whitespace after ','

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 23 E231 missing whitespace after ':'

reviewbotreviewbot

Col: 23 E231 missing whitespace after ':'

reviewbotreviewbot

'urllib2' imported but unused

reviewbotreviewbot

'HttpRequest' imported but unused

reviewbotreviewbot

'File' imported but unused

reviewbotreviewbot

'DiffCompatVersion' imported but unused

reviewbotreviewbot

'DiffSet' imported but unused

reviewbotreviewbot

'FileDiff' imported but unused

reviewbotreviewbot

'GitDiffParser' imported but unused

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 17 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 17 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 17 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 9 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 9 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 26 E231 missing whitespace after ','

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 45 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

local variable 'token' is assigned to but never used

reviewbotreviewbot

undefined name 'tkn'

reviewbotreviewbot

Col: 9 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 20 W292 no newline at end of file

reviewbotreviewbot

Col: 80 E501 line too long (113 > 79 characters)

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 43 E231 missing whitespace after ':'

reviewbotreviewbot

Col: 44 E203 whitespace before ','

reviewbotreviewbot

Col: 45 E231 missing whitespace after ','

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 23 E231 missing whitespace after ':'

reviewbotreviewbot

Col: 23 E231 missing whitespace after ':'

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 45 E226 missing whitespace around arithmetic operator

reviewbotreviewbot

Col: 80 E501 line too long (106 > 79 characters)

reviewbotreviewbot

Col: 80 E501 line too long (90 > 79 characters)

reviewbotreviewbot

Col: 13 E131 continuation line unaligned for hanging indent

reviewbotreviewbot

Col: 1 E302 expected 2 blank lines, found 1

reviewbotreviewbot

local variable 'response' is assigned to but never used

reviewbotreviewbot

No blank line here.

chipx86chipx86

This looks like leftover debug code?

chipx86chipx86

Let's be explicit with the naming: "pull_request" and "pull-request", instead of "pr".

chipx86chipx86

Needs a docstring. See https://www.reviewboard.org/docs/codebase/dev/docs/writing-codebase-docs/

chipx86chipx86

This is only used in one place, so you can just inline review_request.repository in that place.

chipx86chipx86

We don't use this form in our codebase. Should be: if review_request.approved: status = 'success' else: status = 'pending'

chipx86chipx86

Leftover debugging.

chipx86chipx86

_tag_branch (and most of these other methods) should be methods on the class, rather than being top-level functions.

chipx86chipx86

No need for this return.

chipx86chipx86

No blank line.

chipx86chipx86

This should go into further detail on exactly what will be happening, from a high level. Also needs info on …

chipx86chipx86

Leftover debugging.

chipx86chipx86

Blank line between these.

chipx86chipx86

Leftover debugging.

chipx86chipx86

Blank line between these.

chipx86chipx86

This is better formatted like: extra_data_dict = json.dumps({ 'id': ..., 'statuses_url': ..., ... })

chipx86chipx86

Should be abbreviated "review_request", not "rr", for consistency with the rest of the codebase.

chipx86chipx86

Instead of creating all this yourself, you should use ReviewRequest.objects.create(), which will do a bunch of important things that your …

chipx86chipx86

No need to save the review request after adding the diffset. It doesn't affect the Review Request object.

chipx86chipx86

No blank line here.

chipx86chipx86

Comments should be in sentence casing and end with a period. This is also wrapping a bit early.

chipx86chipx86

Leftover debugging.

chipx86chipx86

This should all be happening on a draft, not on the review request itself.

chipx86chipx86

Needs to follow the docstring conventions outlined in the guide above. Same with the other functions below.

chipx86chipx86

Most of this should be inlined: return { 'repository': ..., 'summary': ..., ... }

chipx86chipx86

Leftover debugging.

chipx86chipx86

Since this is having to wrap a bit awkwardly, let's pull it out into its own variable.

chipx86chipx86

Leftover debugging.

chipx86chipx86

Blank line between these. Also, the logging.error should be a logging.exception. No need for exc_info=1 in this case.

chipx86chipx86

Best not to abbreviate so much. "tkn" should be "token". Same everywhere else.

chipx86chipx86

Indentation is a bit weird. Instead, I'd do: ghc.api_post( status_url, json.dumps({ ... }), headers={ 'Authorization': token, })

chipx86chipx86

Everything should be in sentence casing and end with a period.

chipx86chipx86

Leftover debugging.

chipx86chipx86

Where does the -5 come from? If we have to use a number like this, we should document it.

chipx86chipx86

Leftover debugging. Check the rest of the file for this as well.

chipx86chipx86

Can be one statement.

chipx86chipx86

This means we'll crash when someone issues a merge. Best to have a proper error instead.

chipx86chipx86

Blank line between these.

chipx86chipx86

Not sure what this is really trying to say.

chipx86chipx86

Blank line between code and comments.

chipx86chipx86

Typo.

chipx86chipx86

Blank line between code and blocks.

chipx86chipx86

We have a constant for this: ReviewRequest.CLOSE_SUBMITTED.

chipx86chipx86

Blank line between these.

chipx86chipx86

code is an integer. Also, there are constants you should compare against in httplib.

chipx86chipx86

Blank line between these.

chipx86chipx86

Must follow our docstring format. First line has to be a single-line summary, and we need parameter docs. See the …

chipx86chipx86

Should only have a single from ... import per module. Use parens to wrap.

chipx86chipx86

""" on the next line.

chipx86chipx86

Should have a trailing comma.

chipx86chipx86

Here, too.

chipx86chipx86

Same here. Needs to check a flag. Also, it's assuming there's a hosting_service that isn't None, which is a bad …

chipx86chipx86

Leftover debugging.

chipx86chipx86

Unnecessary new blank line.

chipx86chipx86

Same here about checking a capability and hosting_service None-ness. Blank line before and after the conditional block.

chipx86chipx86

This code should never know about the specifics of the service being used. Instead, have a capability flag on the …

chipx86chipx86

Col: 13 E131 continuation line unaligned for hanging indent

reviewbotreviewbot

Since we want to move to using the API and not this, please make a note here with a big …

chipx86chipx86

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

undefined name '_get_auth_token'

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

undefined name 'statuses_url'

reviewbotreviewbot

undefined name '_get_auth_token'

reviewbotreviewbot

Col: 21 E222 multiple spaces after operator

reviewbotreviewbot

Col: 80 E501 line too long (91 > 79 characters)

reviewbotreviewbot

Col: 33 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 32 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 33 E122 continuation line missing indentation or outdented

reviewbotreviewbot

Col: 1 W391 blank line at end of file

reviewbotreviewbot

Col: 9 E303 too many blank lines (2)

reviewbotreviewbot

Col: 80 E501 line too long (88 > 79 characters)

reviewbotreviewbot

'GitHub' imported but unused

reviewbotreviewbot

undefined name 'merge_pull_request'

reviewbotreviewbot

'DiffSetHistory' imported but unused

reviewbotreviewbot

Col: 80 E501 line too long (81 > 79 characters)

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 36 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 33 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

'HostingServiceError' imported but unused

reviewbotreviewbot

undefined name 'HostingServiceError'

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 36 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 33 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 36 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 36 E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot

Col: 13 E128 continuation line under-indented for visual indent

reviewbotreviewbot

Col: 36 E126 continuation line over-indented for hanging indent

reviewbotreviewbot

Col: 36 E123 closing bracket does not match indentation of opening bracket's line

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 1)
     
     
    Show all issues
     local variable 'server_url' is assigned to but never used
    
  3. 
      
brennie
  1. 
      
  2. reviewboard/hostingsvcs/github.py (Diff revision 1)
     
     
    Show all issues

    What if the X-Hub-Signature header is not provided? This will cause an attribute error (because NoneType doesn't define split method).

  3. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
     'GitDiffParser' imported but unused
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 5
     E265 block comment should start with '# '
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E116 unexpected indentation (comment)
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E116 unexpected indentation (comment)
    
  7. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  9. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  10. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  11. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  12. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 54
     E221 multiple spaces before operator
    
  13. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  14. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  15. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  16. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  17. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  18. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  19. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 20
     E225 missing whitespace around operator
    
  20. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 58
     E225 missing whitespace around operator
    
  21. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  22. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  23. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  24. reviewboard/hostingsvcs/github.py (Diff revision 2)
     
     
    Show all issues
     local variable 'server_url' is assigned to but never used
    
  25. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 5
     E265 block comment should start with '# '
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E116 unexpected indentation (comment)
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E116 unexpected indentation (comment)
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  7. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  9. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  10. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  11. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 54
     E221 multiple spaces before operator
    
  12. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  13. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  14. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  15. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  16. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  17. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  18. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  19. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  20. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 20
     E225 missing whitespace around operator
    
  21. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 58
     E225 missing whitespace around operator
    
  22. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  23. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  24. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
    Col: 9
     E265 block comment should start with '# '
    
  25. reviewboard/hostingsvcs/github.py (Diff revision 3)
     
     
    Show all issues
     local variable 'server_url' is assigned to but never used
    
  26. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 4)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 4)
     
     
    Show all issues
    Col: 65
     E226 missing whitespace around arithmetic operator
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 4)
     
     
    Show all issues
    Col: 65
     E226 missing whitespace around arithmetic operator
    
  5. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests/test_github.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests/test_github.py
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 65
     E226 missing whitespace around arithmetic operator
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  7. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 45
     E226 missing whitespace around arithmetic operator
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 5)
     
     
    Show all issues
    Col: 19
     W292 no newline at end of file
    
  9. Show all issues
     'spy_on' imported but unused
    
  10. Show all issues
    Col: 80
     E501 line too long (84 > 79 characters)
    
  11. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  12. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  13. Show all issues
     local variable 'response' is assigned to but never used
    
  14. Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  15. Show all issues
    Col: 23
     E231 missing whitespace after ':'
    
  16. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests/test_github.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/hostingsvcs/tests/test_github.py
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
     'File' imported but unused
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
     'DiffCompatVersion' imported but unused
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
     'DiffSet' imported but unused
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
     'FileDiff' imported but unused
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
     'GitDiffParser' imported but unused
    
  7. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 17
     E128 continuation line under-indented for visual indent
    
  9. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  10. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 17
     E128 continuation line under-indented for visual indent
    
  11. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  12. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  13. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 80
     E501 line too long (82 > 79 characters)
    
  14. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 18
     E225 missing whitespace around operator
    
  15. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 17
     E225 missing whitespace around operator
    
  16. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 35
     E231 missing whitespace after ':'
    
  17. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 80
     E501 line too long (87 > 79 characters)
    
  18. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
     local variable 'diffset' is assigned to but never used
    
  19. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  20. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  21. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 45
     E226 missing whitespace around arithmetic operator
    
  22. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  23. reviewboard/hostingsvcs/github.py (Diff revision 6)
     
     
    Show all issues
    Col: 17
     W292 no newline at end of file
    
  24. Show all issues
    Col: 80
     E501 line too long (113 > 79 characters)
    
  25. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  26. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  27. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  28. Show all issues
    Col: 43
     E231 missing whitespace after ':'
    
  29. Show all issues
    Col: 44
     E203 whitespace before ','
    
  30. Show all issues
    Col: 45
     E231 missing whitespace after ','
    
  31. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  32. Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  33. Show all issues
    Col: 23
     E231 missing whitespace after ':'
    
  34. Show all issues
    Col: 23
     E231 missing whitespace after ':'
    
  35. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/hostingsvcs/service.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/github.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/hostingsvcs/service.py
    
    
    WARNING: Number of comments exceeded maximum, showing 30 of 33.
  2. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'urllib2' imported but unused
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'HttpRequest' imported but unused
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'File' imported but unused
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'DiffCompatVersion' imported but unused
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'DiffSet' imported but unused
    
  7. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'FileDiff' imported but unused
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     'GitDiffParser' imported but unused
    
  9. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  10. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  11. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 17
     E128 continuation line under-indented for visual indent
    
  12. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 17
     E128 continuation line under-indented for visual indent
    
  13. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  14. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 17
     E128 continuation line under-indented for visual indent
    
  15. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  16. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  17. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 9
     E128 continuation line under-indented for visual indent
    
  18. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 9
     E128 continuation line under-indented for visual indent
    
  19. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 26
     E231 missing whitespace after ','
    
  20. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  21. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  22. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 45
     E226 missing whitespace around arithmetic operator
    
  23. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  24. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  25. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     local variable 'token' is assigned to but never used
    
  26. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
     undefined name 'tkn'
    
  27. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 9
     E128 continuation line under-indented for visual indent
    
  28. reviewboard/hostingsvcs/github.py (Diff revision 7)
     
     
    Show all issues
    Col: 20
     W292 no newline at end of file
    
  29. Show all issues
    Col: 80
     E501 line too long (113 > 79 characters)
    
  30. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  31. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  32. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  33. Show all issues
    Col: 43
     E231 missing whitespace after ':'
    
  34. Show all issues
    Col: 44
     E203 whitespace before ','
    
  35. Show all issues
    Col: 45
     E231 missing whitespace after ','
    
  36. Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  37. Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  38. Show all issues
    Col: 23
     E231 missing whitespace after ':'
    
  39. Show all issues
    Col: 23
     E231 missing whitespace after ':'
    
  40. Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  41. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 8)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 8)
     
     
    Show all issues
    Col: 45
     E226 missing whitespace around arithmetic operator
    
  4. reviewboard/reviews/models/review.py (Diff revision 8)
     
     
    Show all issues
    Col: 80
     E501 line too long (106 > 79 characters)
    
  5. reviewboard/reviews/models/review.py (Diff revision 8)
     
     
    Show all issues
    Col: 80
     E501 line too long (90 > 79 characters)
    
  6. reviewboard/reviews/views.py (Diff revision 8)
     
     
    Show all issues
    Col: 13
     E131 continuation line unaligned for hanging indent
    
  7. reviewboard/reviews/views.py (Diff revision 8)
     
     
    Show all issues
    Col: 1
     E302 expected 2 blank lines, found 1
    
  8. reviewboard/reviews/views.py (Diff revision 8)
     
     
    Show all issues
     local variable 'response' is assigned to but never used
    
  9. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/reviews/views.py (Diff revision 9)
     
     
    Show all issues
    Col: 13
     E131 continuation line unaligned for hanging indent
    
  3. 
      
chipx86
  1. 
      
    1. Looks like a lot, but most of these are things like style fixes and leftover debugging. There are some meatier changes, like docstring improvements, organization of the new GitHub functions you're introducing, and some other things like that.

  2. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    No blank line here.

  3. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    This looks like leftover debug code?

  4. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    Let's be explicit with the naming: "pull_request" and "pull-request", instead of "pr".

  5. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Needs a docstring. See https://www.reviewboard.org/docs/codebase/dev/docs/writing-codebase-docs/

  6. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    This is only used in one place, so you can just inline review_request.repository in that place.

  7. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    We don't use this form in our codebase. Should be:

    if review_request.approved:
        status = 'success'
    else:
        status = 'pending'
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

  9. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    _tag_branch (and most of these other methods) should be methods on the class, rather than being top-level functions.

  10. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    No need for this return.

  11. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    No blank line.

  12. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    This should go into further detail on exactly what will be happening, from a high level.

    Also needs info on the function parameters, as detailed in the guide I linked above.

  13. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

  14. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between these.

  15. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

  16. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between these.

  17. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
     
    Show all issues

    This is better formatted like:

    extra_data_dict = json.dumps({
        'id': ...,
        'statuses_url': ...,
        ...
    })
    
  18. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Should be abbreviated "review_request", not "rr", for consistency with the rest of the codebase.

  19. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
     
     
     
     
    Show all issues

    Instead of creating all this yourself, you should use ReviewRequest.objects.create(), which will do a bunch of important things that your code isn't doing, like setting a Local Site ID when needed. (Also, this code needs to factor in Local Sites).

    See that method (reviewboard/reviews/managers.py:ReviewRequestManager.create) to see what it's doing.

  20. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    No need to save the review request after adding the diffset. It doesn't affect the Review Request object.

  21. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    No blank line here.

  22. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Comments should be in sentence casing and end with a period. This is also wrapping a bit early.

  23. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

  24. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    This should all be happening on a draft, not on the review request itself.

  25. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    Needs to follow the docstring conventions outlined in the guide above.

    Same with the other functions below.

  26. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Most of this should be inlined:

    return {
        'repository': ...,
        'summary': ...,
        ...
    }
    
  27. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

  28. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    Since this is having to wrap a bit awkwardly, let's pull it out into its own variable.

  29. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Leftover debugging.

  30. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between these.

    Also, the logging.error should be a logging.exception. No need for exc_info=1 in this case.

  31. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Best not to abbreviate so much. "tkn" should be "token". Same everywhere else.

  32. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
     
     
     
     
     
    Show all issues

    Indentation is a bit weird. Instead, I'd do:

    ghc.api_post(
        status_url,
        json.dumps({
            ...
        }),
        headers={
            'Authorization': token,
        })
    
  33. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Everything should be in sentence casing and end with a period.

  34. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

  35. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Where does the -5 come from? If we have to use a number like this, we should document it.

  36. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Leftover debugging.

    Check the rest of the file for this as well.

  37. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    Can be one statement.

  38. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    This means we'll crash when someone issues a merge. Best to have a proper error instead.

  39. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between these.

  40. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Not sure what this is really trying to say.

  41. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between code and comments.

  42. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
    Show all issues

    Typo.

  43. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between code and blocks.

  44. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    We have a constant for this: ReviewRequest.CLOSE_SUBMITTED.

  45. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between these.

  46. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
     
    Show all issues

    code is an integer. Also, there are constants you should compare against in httplib.

  47. reviewboard/hostingsvcs/github.py (Diff revision 9)
     
     
     
    Show all issues

    Blank line between these.

  48. reviewboard/hostingsvcs/service.py (Diff revision 9)
     
     
     
     
     
    Show all issues

    Must follow our docstring format. First line has to be a single-line summary, and we need parameter docs. See the guide above.

  49. reviewboard/hostingsvcs/tests/test_github.py (Diff revision 9)
     
     
     
     
    Show all issues

    Should only have a single from ... import per module. Use parens to wrap.

  50. Show all issues

    """ on the next line.

  51. Show all issues

    Should have a trailing comma.

  52. Show all issues

    Here, too.

  53. reviewboard/reviews/models/base_comment.py (Diff revision 9)
     
     
     
    Show all issues

    Same here. Needs to check a flag.

    Also, it's assuming there's a hosting_service that isn't None, which is a bad assumption.

  54. Show all issues

    Leftover debugging.

  55. reviewboard/reviews/models/review.py (Diff revision 9)
     
     
    Show all issues

    Unnecessary new blank line.

  56. reviewboard/reviews/models/review.py (Diff revision 9)
     
     
     
    Show all issues

    Same here about checking a capability and hosting_service None-ness.

    Blank line before and after the conditional block.

  57. reviewboard/reviews/views.py (Diff revision 9)
     
     
    Show all issues

    This code should never know about the specifics of the service being used. Instead, have a capability flag on the hosting service saying that it can merge pull requests, like can_merge_pull_requests.

    Also, this needs to only present the button if the review request is associated with a pull request.

  58. reviewboard/reviews/views.py (Diff revision 9)
     
     
     
     
    Show all issues

    Since we want to move to using the API and not this, please make a note here with a big "XXX" that this is temporary, and explain what it needs to be turned into.

  59. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
     undefined name '_get_auth_token'
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
     undefined name 'statuses_url'
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
     undefined name '_get_auth_token'
    
  7. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 21
     E222 multiple spaces after operator
    
  8. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 80
     E501 line too long (91 > 79 characters)
    
  9. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 33
     E128 continuation line under-indented for visual indent
    
  10. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 32
     E126 continuation line over-indented for hanging indent
    
  11. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 33
     E122 continuation line missing indentation or outdented
    
  12. reviewboard/hostingsvcs/github.py (Diff revision 10)
     
     
    Show all issues
    Col: 1
     W391 blank line at end of file
    
  13. Show all issues
    Col: 9
     E303 too many blank lines (2)
    
  14. Show all issues
    Col: 80
     E501 line too long (88 > 79 characters)
    
  15. reviewboard/reviews/views.py (Diff revision 10)
     
     
    Show all issues
     'GitHub' imported but unused
    
  16. reviewboard/reviews/views.py (Diff revision 10)
     
     
    Show all issues
     undefined name 'merge_pull_request'
    
  17. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 11)
     
     
    Show all issues
     'DiffSetHistory' imported but unused
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 11)
     
     
    Show all issues
    Col: 80
     E501 line too long (81 > 79 characters)
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 11)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  5. reviewboard/hostingsvcs/github.py (Diff revision 11)
     
     
    Show all issues
    Col: 36
     E126 continuation line over-indented for hanging indent
    
  6. reviewboard/hostingsvcs/github.py (Diff revision 11)
     
     
    Show all issues
    Col: 33
     E126 continuation line over-indented for hanging indent
    
  7. reviewboard/reviews/models/review.py (Diff revision 11)
     
     
    Show all issues
     'HostingServiceError' imported but unused
    
  8. reviewboard/reviews/views.py (Diff revision 11)
     
     
    Show all issues
     undefined name 'HostingServiceError'
    
  9. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 12)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
    1. Intentionally like this.

  3. reviewboard/hostingsvcs/github.py (Diff revision 12)
     
     
    Show all issues
    Col: 36
     E126 continuation line over-indented for hanging indent
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 12)
     
     
    Show all issues
    Col: 33
     E126 continuation line over-indented for hanging indent
    
  5. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 13)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 13)
     
     
    Show all issues
    Col: 36
     E126 continuation line over-indented for hanging indent
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 13)
     
     
    Show all issues
    Col: 36
     E123 closing bracket does not match indentation of opening bracket's line
    
  5. 
      
KS
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/reviews/views.py
        reviewboard/reviews/models/base_comment.py
        reviewboard/reviews/urls.py
        reviewboard/hostingsvcs/tests/test_github.py
        reviewboard/reviews/models/review.py
        reviewboard/hostingsvcs/service.py
        reviewboard/hostingsvcs/github.py
    
    Ignored Files:
        reviewboard/templates/reviews/review_detail.html
    
    
  2. reviewboard/hostingsvcs/github.py (Diff revision 14)
     
     
    Show all issues
    Col: 13
     E128 continuation line under-indented for visual indent
    
  3. reviewboard/hostingsvcs/github.py (Diff revision 14)
     
     
    Show all issues
    Col: 36
     E126 continuation line over-indented for hanging indent
    
  4. reviewboard/hostingsvcs/github.py (Diff revision 14)
     
     
    Show all issues
    Col: 36
     E123 closing bracket does not match indentation of opening bracket's line
    
  5. 
      
david
Review request changed
Status:
Discarded