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
Support github timeline events (GH-422). #1302
Conversation
Hey @ncb000gt, TravisBuddy Request Identifier: a01bd840-1057-11ea-a65a-5f455ab5a299 |
Codecov Report
@@ Coverage Diff @@
## master #1302 +/- ##
==========================================
- Coverage 98.17% 98.14% -0.04%
==========================================
Files 186 188 +2
Lines 14092 14222 +130
==========================================
+ Hits 13835 13958 +123
- Misses 257 264 +7
Continue to review full report at Codecov.
|
This is looking great! Would you mind adding a test case for TimelineEvent where you fetch one from the API and assert it's parsed correctly? tests/RequiredStatusChecks.py is a small example. |
@s-t-e-v-e-n-k I'll take a look and post back. Thanks. |
@s-t-e-v-e-n-k I took a look and the difference between individual timeline events is that they can't be lazily loaded. You either get the full timeline or you don't. I removed the "load if not found" calls since they can't be individually loaded. I added some additional checks to the test that I did add. What are your thoughts? |
Hey @ncb000gt, TravisBuddy Request Identifier: 5c00a040-1585-11ea-81b2-273600e26419 |
I'm happy with the replay data including the entire timeline even if you only assert the attributes of the first one. You can always selectively edit the replay data to have more brevity. |
1c420ab
to
4e26c3b
Compare
Hey @ncb000gt, TravisBuddy Request Identifier: 0ec12420-1cf7-11ea-a2fb-51cb67500490 |
@s-t-e-v-e-n-k let me know if you want me to make any additional changes. Thanks! |
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.
Two more niggling issues now that I've had a close look.
Hey @ncb000gt, TravisBuddy Request Identifier: f34db3e0-2208-11ea-b76a-c509dfe0ae07 |
Hey @ncb000gt, TravisBuddy Request Identifier: 4bbb87e0-220a-11ea-b76a-c509dfe0ae07 |
import github.TimelineEventSource | ||
|
||
|
||
class TimelineEvent(github.GithubObject.NonCompletableGithubObject): |
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.
It is completable! It has a URL and everything.
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.
They don't all have a url. Some do. if you look through the replay data the cross-referenced
event does not have a url.
Adds support for retrieval of Github timeline events. Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
Hey @ncb000gt, TravisBuddy Request Identifier: 7a6f7eb0-2265-11ea-b76a-c509dfe0ae07 |
Adds support for retrieval of Github timeline events (GH-422).
Usage example:
The class doesn't match the output exactly as shown on the api site because the output from the call/events doesn't. This can be seen in the text file used for testing. This can be verified using the following.
curl -i https://[REPLACE WITH GH TOKEN]@api.github.com/repositories/3544490/issues/28/timeline -H"Accept:application/vnd.github.mockingbird-preview"
Signed-off-by: Nick Campbell nicholas.j.campbell@gmail.com