Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Rob Becker
    @robrbecker
    You can see the history in github https://github.com/SpinlockLabs/github.dart/graphs/contributors. Most of the code was developed 4+ years ago and it has only been very lightly maintained since. I recently started as a maintainer a few months ago. It’s all open source and we’re all volunteers. This isn’t an official github project or maintained by a company.
    These sort of projects depend on those that use it to report issues and put up fixes like you did, so thank you!
    Rob Becker
    @robrbecker
    notice: I published 5.5.0 and started a dev branch for the next major release https://github.com/SpinlockLabs/github.dart/tree/dev
    I’ve refactored to one cross platform entry point and plan to do some more cleanup and testing. I’ll release a 6.0 beta before going to stable if people want to test things out.
    Rob Becker
    @robrbecker
    Heads up 6.0 just released. Please file any bugs or API inconsistencies.
    Also, Pub now properly detects the library as working in all environments
    Rob Becker
    @robrbecker
    Should https://github.com/DirectMyFile/console.dart be transferred into Spinlock labs?
    Tim Sneath
    @timsneath
    I'm feeling stupid, but I can't figure out the exact requirements of the query string for GitHub issues. I'm trying to replicate a query such as this one using the API: https://api.github.com/search/issues?q=repo%3Aflutter/flutter+is%3Aopen+is%3Aissue+label%3A%22a%3A+annoyance%22
    My code looks something like this:
      final search = SearchService(GitHub());
      final fixedQuery =
          'repo%3Aflutter/flutter+is%3Aopen+is%3Aissue+label%3A"a%3A+annoyance"';
      final issueStream = search.issues(fixedQuery);
      int length = await issueStream.length;
      print(length);
    but I get a result of 0
    Should my query have the q= prefix? Or should it be encoded differently?
    Tim Sneath
    @timsneath
    I've dug a little deeper, and it seems that the package is over-encoding the query.
    If I set fixedQuery to 'repo:flutter/flutter+is:open+is:issue+label:"a: annoyance"',, the encoded query is
    ?q=repo%3Aflutter%2Fflutter%2Bis%3Aopen%2Bis%3Aissue%2Blabel%3A%22a%3A%20annoyance%22
    but GitHub doesn't like this.
    Tim Sneath
    @timsneath
    The query contains multiple parts, but the call to encodeComponent encodes it as a single part
    Switching this to call encodeFull() instead ensures the right query is passed to GitHub, but I'm not sure if that's what you really want
    Tim Sneath
    @timsneath
    Rob Becker
    @robrbecker
    I responded on the issue but I’ll respond here as well. The query for code or issues should be the unencoded text that you would type into the search box in GitHub. For example "is:open label:duplicate someSearchWord"
    Documentation could use some work (if anyone is looking for some OSS contributions)
    Tim Sneath
    @timsneath
    Brilliant. Thanks -- that's the one combination I didn't try :(
    Rob Becker
    @robrbecker
    Glad it worked!
    I also released 6.0.4 which should fix your other issue you filed @timsneath (SpinlockLabs/github.dart#196 )
    Prakash
    @wikyprash
    hello there i'm really interested in creating GitHub API
    Rob Becker
    @robrbecker
    Hi @wikyprash ! Welcome! Are you interested in helping to improve this project or are you using it in your own project?
    I recently discovered https://github.com/octokit which is the home for official clients for github. With some effort and outreach, we might be able to get the Dart implementation adopted as an official oktokit. Does anyone have thoughts or is interested in helping with that?
    Prakash
    @wikyprash
    im interested to improve this project
    btw
    im also using this in my project
    Rob Becker
    @robrbecker
    @wikyprash As you use it in your projects and come across areas that could use improvement or are missing .. feel free to put up a pull request. Or if you have an idea of what you’d like to add/improve we can discuss it here too.
    lucianolang
    @lucianolang
    Hello everyone! I was wondering if there was a way of checking out a branch locally on dart and persisting it... Im trying to host some documents on my GitHub that then I can present inside my flutter app. These documents have to be downloaded locally. I apologise if this is not the right place to ask this but I figured any pointers would be helpful...
    Rob Becker
    @robrbecker
    Do you mean checking out a branch of the GitHub.dart dart library .. or using the GitHub.dart library to check out a different project?
    Let me see if I understand your question. You have a flutter app and you want to use this library to download files from a github repository to present somehow in your app? I now think "checking out a branch locally” means “get all the files from github and save them in your flutter app”. Is that correct?
    lucianolang
    @lucianolang

    I mean the later, using the GitHub.dart library to check out a different project which is private and is where I have the contents of my app hosted.

    You got it. I know with your library I can save the documents. But I was wondering if there was a better way of doing this so I can then "pull the changes" into the local branch without having to download all the files again... FYI I want to do it this way because that way I can access the commit messages and revision history of each document.

    Im sorry I didn't get to see your reply earlier, thank you so much for your fast reply.

    Rob Becker
    @robrbecker

    You have an interesting use case. It sounds like you want to have a Dart API to interact with a locally cloned repo .. which this library isn’t meant to do. It’s basically just a Dart strongly typed API to the GitHub v3 network API. But, all is not lost. Since I’m not exactly sure if the number of files would be changing in your repo that you would want to be synced or if you just want to be able to update files and get the new version and the message for the update, I’ll give a few thoughts. For your use case, I would recommend either:

    hard way: figure out a way to ship a git client binary (for android and IOS) and then call by spawning a process to clone/pull the repo. Then you could use the git log to see what was updated.

    Easier way: Basically, implement a cheap “clone” functionality yourself. You’ll be keeping track of which commit you have downloaded. Use this library to list all commits in the repo (or if there are newer than the one you already have). For each commit, get a list of file and their locations, then request each files at this commit and save it to the filesystem at the correct path.
    This will not be as efficient as a real git clone since it only downloads the diffs needed, this would download the full file at each commit. But if you just want the latest all the time and the things that have changed .. you could simplify and list files in the repo and download them all, then list commits to get the list of things that have changed. @lucianolang

    lucianolang
    @lucianolang
    Hi Rob, thanks for the advice! I have researched into doing the harder option but with my current knowledge its quite ambitious. So for now I will go with my initial implementation idea, which matches a bit what you proposed as the easier path, just server side, im adding an index where I keep the stats of the files and there I can know what I need to download. Thanks for the help! Cheers!
    Sarad Gajurel
    @ictsolved
    hello there. thanks for the awesome "github" package for flutter. i have a question. when i use github token, what is the best way to make it secure? Hard coding it in the application must be a bad idea, isn't it?
    Rob Becker
    @robrbecker
    Right, I would not hardcode it or check it into your source code. Depending on what your app is doing you could do a couple solutions:
    • Ask the user to create a token for their account and provide it in the UI of the app and save it to their profile.
    Rob Becker
    @robrbecker
    or possibly use https://pub.dev/packages/flutter_github_api ? it looks like it wraps this library to help with auth siutations? I haven’t played with it at all.
    Seems like something that should just be built into this library though.
    Sarad Gajurel
    @ictsolved
    Thanks Rob
    GroovinChip
    @GroovinChip
    Seems like this package is missing a lot of Event models - https://developer.github.com/v3/activity/events/types/
    GroovinChip
    @GroovinChip
    What is the recommended way to get the public activity events of a group of users? Since listPublicEventsPerformedByUser returns a stream of events of one user, the only thing I can think of is to first get a list of users, combine a list of public event streams for each user, and listen to that combined stream. But that seems crazy to me.
    Muhammet Ali Asan
    @muhammetasan
    Hi all. I am new to project. It looks interesting. I have developed a mobile application using Flutter. Hence I am familiar with Dart. I wanted to ask is there any starter task for me to look at ? I would appreciate contributing.
    Rob Becker
    @robrbecker
    hi @muhammetasan since you have experience with Flutter, would you be interested in creating a Flutter example app SpinlockLabs/github.dart#219 ?
    Muhammet Ali Asan
    @muhammetasan
    yes good idea. I am busy this week but I can start Friday evening. what it should look like ?
    Muhammet Ali Asan
    @muhammetasan
    I can work on that whole weekend. I hope it is not too late.