New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve GitHub support #1487
Improve GitHub support #1487
Conversation
return _STATE_MAP.get(results, 'error') | ||
|
||
|
||
def _timeDeltaToHumanReadable(start, end): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing specific to Github here.
That could be used by other status plugins.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True.
That was my next step (first I wanted to make sure that there's a test for custom GitHub URL).
I still do not have test cases for the new functionality |
And, actually, I am not sure how to do that. It seems that |
Yes, FakeRequest is pretty bogus. Twisted's testing utilities may have a useful alternative. |
@djmitche I looked at what Twisted offers and it's not much. Maybe you could suggest what test cases would be "enough"? I really want this PR to land in eight before next release. |
This looks like a good set of tests now. Coverage is only missing for the various error-handling bits ( |
|
(Needs port to |
I still get a few pep8 changes and some test failures from
|
What is the exact command you are running? |
|
and, I did re-run |
Right. I believe you need to update txgithub package (since it's OK to run Buildbot without it, txgithub package does not have a proper versioned dependency). |
OK, looks good to me! Sorry to delay this so much.. |
* remove unused self._token * simplify expressions for sha, startDescription, endDescription * re-format addErrback * change import for datetime to simplify its usage
* _getGitHubState * _timeDeltaToHumanReadable
* there's an overlap between human_readable_delta and formatInterval
* refactor the way events of different kinds are handled * copy hmac support from contrib/github_buildbot.py * document hook's parameters
No description provided.