by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 18 12:11
    47erbot labeled #48
  • Sep 18 12:11
    47erbot unlabeled #48
  • Sep 18 12:09
    47erbot labeled #48
  • Sep 18 12:09
    47erbot unlabeled #48
  • Sep 18 08:54
    calvellido labeled #259
  • Sep 18 08:27
    fedefernandez commented #549
  • Sep 17 16:39
    artemkorsakov commented #259
  • Sep 17 11:50
    loonydev commented #549
  • Sep 17 10:44
    fedefernandez commented #549
  • Sep 17 10:44
    fedefernandez commented #549
  • Sep 17 10:44
    fedefernandez commented #549
  • Sep 17 10:32
    loonydev commented #549
  • Sep 17 10:31
    loonydev commented #547
  • Sep 17 10:00
    47erbot labeled #48
  • Sep 17 10:00
    47erbot unlabeled #48
  • Sep 17 09:59
    47erbot labeled #48
  • Sep 17 09:59
    47erbot unlabeled #48
  • Sep 17 09:55
    juanpedromoreno closed #550
  • Sep 17 09:55
    codecov[bot] commented #550
  • Sep 17 09:54
    47erbot labeled #48
Ben Fradet
@BenFradet
interesting stuff :+1: , do you think there is value in having these schemas and some of your workflow (except the specific queries obviously) as a separate module?
Daniel Capo Sobral
@dcsobral
Yes, I think there’s value, but I’m not sure what would make a good API design. Having out-of-box support to interacting with GitHub graphql API by providing nothing more than graphql query files, and having those queries checked for syntax and against the schema, and having type safety and codecs for query variables and result, there is a lot of value there.
I could easily have this implemented directly through HTTP, but github4s’s HttpClient handles a lot of of the boilerplate already, of github specifics. The extra two classes/codecs I added would make life easier on people as well, since it was a bit of a discovery process.
And, of course, doing everything in F.
Daniel Capo Sobral
@dcsobral
In my very limited experience with this API, I can think of two things that might be gained with a careful design:
  1. Support for reusing a connection, to chain queries and mutations;
  2. Support for automatic paging using Graphql’s notions of connections/edges/cursors.
I can’t see a way of handling the second one, however, since the cursors would be returned as part of A#Data.
Daniel Capo Sobral
@dcsobral
Should github4s send a default user agent, I wonder? The docs say All API requests MUST include a valid User-Agent header..
Ben Fradet
@BenFradet
I opened a PR regarding the last point: 47degrees/github4s#461
Daniel Capo Sobral
@dcsobral
I think it might be more simply implemented with unfold, like in https://github.com/47degrees/github4s/issues/169#issuecomment-611821491, though that’s on v3 not v4. At that, nextPage there could be injected, so that the same solution would apply to both v3 and v4, by just changing a parameter.
I’d rather return Stream[F, T] over F[List[T]] as well. Depending on one’s needs, it might not be necessary to fetch the entire set of results, and that will save on API usage as well as getting results out faster.
Daniel Capo Sobral
@dcsobral
Yay! New version!
Damn, that means I’ll have to refactor all my stuff!
I had hoped to submit a couple of PRs adding a few methods I’ve had need for, and which do not require feature flags.
Alas… too much work.
Ben Fradet
@BenFradet
no worries :+1:
Daniel Capo Sobral
@dcsobral
Food for thought: I’m writing tests following a blog post I found about testing tagless final (https://medium.com/wix-engineering/functional-testing-with-tagless-final-50eeacf5df6). When creating the implicit for Issues, I get a huge amount of methods to define. Even leaving stuff defined as ???, it’s still a big chunk of lines with very few actual definitions, since I only need to deal with labels.
There’s some clear divisions in that algebra: issues, comments, labels, milestones. Instead of breaking the algebra by Github’s v3 classification, it would be neater to break it up in smaller chunks.
Ben Fradet
@BenFradet
issues is further broken down on the website https://developer.github.com/v3/issues/, it's just that we started from a very small set of endpoints and never made the leap to further divide what we had
Daniel Capo Sobral
@dcsobral
In the end I created a trait/class that just forwards label methods to issues, but allows me to keep a smaller footprint for tests.
Daniel Capo Sobral
@dcsobral
I got this error:
[error] github4s.GithubResponses$JsonParsingException: Invalid message body: Could not decode JSON: {
[error]   "message" : "Not Found",
[error]   "documentation_url" : "https://developer.github.com/v3"
[error] }
Unfortunately, there’s not way of knowing which API was called that returned this error. It would have been helpfull if more information about the request was included.
Ben Fradet
@BenFradet
this isn't on 0.24.0, right? adding request information makes sense to me :+1:
Daniel Capo Sobral
@dcsobral
This is on 0.24.0.
Mind you, it might not be on one of the existing APIs, since I used HttpClient when writing the extra ones I needed.
Daniel Capo Sobral
@dcsobral
So, the issue is removeLabel, which passes label as part of the url (as per spec), but fails to url-encode it.
Ben Fradet
@BenFradet
mmh ok, weird. can you share the label?
Daniel Capo Sobral
@dcsobral
version: revision. It’s the space, specifically.
I’ve worked around it by calling http4s’s Uri.encode on it before passing it to g4s. It encodes the space, but not the colon. I’ve also confirmed it using curl.
zachkirlew
@zachkirlew
Hello everyone! I would like to submit a PR. How can I get get the access rights to do this?
Ben Fradet
@BenFradet
Hello, you'll need to fork the repository :+1:
https://github.com/firstcontributions/first-contributions might be a useful resource to get started
zachkirlew
@zachkirlew
thanks @BenFradet
zachkirlew
@zachkirlew
Submitted my first PR! 47degrees/github4s#528 . Little confused by the codecov report though... Impacted files are ones I haven't even changed 🤔
Ben Fradet
@BenFradet
yes it's because for external contributors , only part of the test suite is run. you don't have to worry about them
zachkirlew
@zachkirlew
alright thanks
Daniel Capo Sobral
@dcsobral
I’m having issues with every recently created repository, with labels failing to decode. Has anyone seen this?
Daniel Capo Sobral
@dcsobral
Dang. Id is not an int, it’s. a long.
Daniel Capo Sobral
@dcsobral
@BenFradet Do you think it would be possible to get a release out quickly to fix this? I mean, I can (will) submit a PR for it and it is a trivial change, but this broke my build infrastructure and I have to figure out quickly whether to go with a new github4s version fixing it or come up with something else.
Daniel Capo Sobral
@dcsobral
Oh, damn, this was fixed already.
Daniel Capo Sobral
@dcsobral
But not released.
Daniel Capo Sobral
@dcsobral
Are there published snapshots for master commits?
Daniel Capo Sobral
@dcsobral
Yep, sonatype snapshots. Got it.
Matthew Tovbin
@tovbinm
Hello, when is the next release of github4s?
Daniel Capo Sobral
@dcsobral
So, I cannot use the snapshot to solve my issue with label ids. I use github4s on a plugin, and since plugins cannot add a resolver I’d have to add the resolver to every project, instead of just changing the version (which I do automatically). I’d really like a new version of github4s, to get this fixed.
Juan Pedro Moreno
@juanpedromoreno
Daniel Capo Sobral
@dcsobral
Thanks!