Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:15
    47erbot labeled #48
  • 05:15
    47erbot unlabeled #48
  • 05:13
    47erbot labeled #48
  • 05:13
    47erbot unlabeled #48
  • 05:10
    47erbot closed #620
  • 05:09
    47erbot labeled #48
  • 05:09
    47erbot unlabeled #48
  • 05:08
    47erbot labeled #48
  • 05:08
    47erbot unlabeled #48
  • 05:04
    github-actions[bot] labeled #620
  • 05:04
    47erbot opened #620
  • Feb 26 05:04
    github-actions[bot] labeled #619
  • Feb 26 05:04
    47erbot opened #619
  • Feb 23 17:08
    kell18 closed #618
  • Feb 23 17:08
    kell18 commented #618
  • Feb 23 11:12
    codecov[bot] commented #618
  • Feb 23 11:06
    kell18 opened #618
  • Feb 22 14:27
    47erbot labeled #48
  • Feb 22 14:27
    47erbot unlabeled #48
  • Feb 22 14:25
    47erbot labeled #48
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!
zachkirlew
@zachkirlew
Hey everyone, when is the 0.26.0 release planned?
Ben Fradet
@BenFradet
there aren't any immediate plans afaik
Juan Pedro Moreno
@juanpedromoreno
zachkirlew
@zachkirlew
Tilman Zuckmantel
@tizuck

Hey guys! I am currently working with github4s and i have a problem that my program won't terminate. It is not stuck somewhere but after executing the last line of code it just won't stop. I figured out that it does terminate when i don't execute the code that fetches files from github. The methods that relate to github4s that i use are

private val TIMEOUT_DURATION = Duration(1,duration.SECONDS)

private val httpClient: Client[IO] = {
    val N_THREADS = 5
    val blockingPool = Executors.newFixedThreadPool(N_THREADS)
    val blocker = Blocker.liftExecutorService(blockingPool)
    implicit val cs: ContextShift[IO] = IO.contextShift(global)
    JavaNetClientBuilder[IO](blocker).create
  }

  private val accessToken = sys.env.get("GITHUB_TOKEN")
  private val gh = Github[IO](httpClient, accessToken)

gh.repos.getContents(...)
val response = getContents
        .unsafeRunTimed(TIMEOUT_DURATION)
        .getOrElse(throw new IOException(s"Unable to fetch content of: $path"))

Does anybody know if there might be some running thread problem here ? Thx.

Daniel Capo Sobral
@dcsobral
May I suggest enabling Github Discussions?
Ryan Peters
@sloshy
New release v0.28.0. Contains one significant breaking change due to the GitHub API removing basic auth, and a small bug fix for search query parameters. https://github.com/47degrees/github4s/releases/tag/v0.28.0
Albert Bikeev
@kell18
Hello people! Do you know if there is Search HTTP API implementation in the library somewhere?
Ryan Peters
@sloshy
@kell18 There is an issues search, but I believe that is it right now
Do you have a more specific feature request? Maybe a certain search endpoint or two? The API is rather large, and we tend to only add things on an as-needed basis so we can add your feature request if it's something specific and not all-encompassing.
Albert Bikeev
@kell18
Thanks for the reply @sloshy! We need to search for repositories and issues. Is there some work done on that? Or I'll consider adding that in the PR, if that works?
Albert Bikeev
@kell18
By the way, do you know where to get these authorizeUrl and accessTokenUrl for Github Enterprise? I don't use OAuth App nor Github App for authorization, just a user with a token in Atuhorisation header
Ryan Peters
@sloshy
@kell18 sorry for the late response - I didn't have gitter open yesterday, for some reason, and never noticed :sweat_smile:
4 replies
I can add repository search, if it is not already present. And, I will also look into your auth issue now to see what's up with that.
1 reply
Ryan Peters
@sloshy
@kell18 Alright, I was able to slap this together over what little free time I had the past day and a half between regular work + playing Hades. Next version of github4s should have repository search once this goes through! 47degrees/github4s#611
1 reply