Add support for user public events. - #274
Conversation
phadej
left a comment
There was a problem hiding this comment.
LGTM, make travis green, and I'll merge this.
| where shouldSucceed f = withAuth $ \auth -> do | ||
| cs <- GitHub.executeRequest auth $ f | ||
| cs `shouldSatisfy` isRight | ||
| length (fromRightS cs) `shouldSatisfy` (> 1) |
There was a problem hiding this comment.
use
import Prelude ()
import Prelude.Compat
to get correct (polymorphic) length.
| GitHub.repositoryEventsR "phadej" "github" 1 | ||
| describe "userEventsR" $ do | ||
| it "returns non empty list of events" $ shouldSucceed $ GitHub.userEventsR "phadej" 1 | ||
| where shouldSucceed f = withAuth $ \auth -> do |
There was a problem hiding this comment.
Note to self: refactor this when merged (quicker to do myself, than try to explain what I want).
|
Thanks for the quick feedback. Alright, I'm going to get that pass through travis. I'll squash, force push and let you know when I'm done. |
b2ce175 to
1796b73
Compare
|
Alright, it should be ok now. I'll just let travis run. I was watching travis's logs and noticed it lacks a github API key hence integration tests are skipped:
I do not know if you are aware about that… I ran these tests locally, they all pass using the lts-7 Haskell. |
|
yeah, GITHUB_TOKEN is private and not set for non-member builds (otherwise you could expose them, by modifying I'll look at this tomorrow |
|
Hey @phadej, hope you are doing well. Friendly bump. |
Implement improvement #273
This PR implements a get method as well as its associated tests for this endpoint: https://developer.github.com/v3/activity/events/#list-public-events-performed-by-a-user
Since the get repository events endpoint (https://developer.github.com/v3/activity/events/#list-repository-events) was quite similar and was missing integration tests, I took advantage of this PR to write some.
I tried to respect as much as I could your coding style regarding tests, hope I managed to do that right.
Please note that I am a beginner regarding haskell, do not hesitate to let me know if I can improve something. I will not be offended and glad to fix that!
Have a nice day!