Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Concerned Hobbit
@ConcernedHobbit
Ah, cheers @cripplet
Concerned Hobbit
@ConcernedHobbit
Is there an example for webhook usage with this API anywhere?
Clay Jensen-Reimann
@clayreimann
@concernedhobbit I whipped up this for Russell. I should add it to the doc site too
Concerned Hobbit
@ConcernedHobbit
Great! Cheers @clayreimann.
Matt Smith
@mtscout6
You guys mention in the readme that the GitHub Tools org is behind this repo. Have you considered transfering the repo to the Org. GitHub will maintain a redirect for all your old links: https://github.com/blog/1508-repository-redirects-are-here
Ændrew Rininsland
@aendrew
@clayreimann @AurelioDeRosa — Hi! Just briefly popping in to say I used the library in a quick project the other day, and y'all have done a smashing job with everything. Between the new architecture and the excellent new API docs, things are terrific beyond belief. Very, very well done!
I'll probably be back to doing some open source work in the next while, sorry I've just sort of vanished the last few months (can't believe it's June already...). If there's anything in terms of docs or testing or whatnot I can help out with, please don't hesitate to let me know!
Aurelio De Rosa
@AurelioDeRosa
Hi @aendrew. I think @clayreimann is the man to thanks as I've been pretty inactive lately. I've started to contribute back today with a few PRs :)
Aurelio De Rosa
@AurelioDeRosa
@clayreimann I've merged the two trivial PRs I submitted. I'd like to receive a thumb up for the other 3. You've taken care of this repo for a while now, so I'd like to have a quick review before merging.
After this we can even release version 2.3
Finally, I'd like to be added to the contributors list of the lib on npm.
Clay Jensen-Reimann
@clayreimann
@AurelioDeRosa your PRs looked good so I merged them
I've added you on npm as well
I'll release v2.3 shortly, FYI anyone with write access to the repo can release a new version by running npm run release -- <npm version spec>
Aurelio De Rosa
@AurelioDeRosa
Oh...cool. Thank you for merging the PRs and let me know about this info :+1:
Matthew Rattray
@Discmt
Does anyone know how to get the label counts?
I.E. the number of issues that have the label bug.
That kind of thing.
Aurelio De Rosa
@AurelioDeRosa
I don't think we support this feature at the moment.
Matt Smith
@mtscout6
@AurelioDeRosa @clayreimann @aendrew I got those babel changes in there, but now some tests are failing, but it’s not immediately clear if or how it’s related to the babel changes. I’m at my capacity this morning to dig in, but if I get time tonight I’ll take another stab at it.
Christopher DeCairos
@cadecairos
I'm attempting to use github-api to fetch issues from GH, but when I call issues.listIssues() , it will hang without error indefinitely, regardless of whether using promises or callbacks. What might cause this?
Clay Jensen-Reimann
@clayreimann
@cadecairos have you turned on debug? We proactively fetch all pages for you so if you're trying to fetch 10,000+ issues it could take a while
Cp
@Cp-022
How do we create a gist?
and what does the 3165654 resemble in var gist = github.getGist(3165654)
Clay Jensen-Reimann
@clayreimann
@Cp-022 There's an example of creating a gist in the readme, and 3165654 is the gist id. For example, in the url https://gist.github.com/clayreimann/923e6c30b8e410017299 the gist id is 923e6c30b8e410017299
Matt Smith
@mtscout6
@AurelioDeRosa @clayreimann @michael What’s the status on #263? The CI has been failing for some time and I’d like to help get it back up and running. Though once it’s solid again I’d like to prevent it from failing again by protecting the master branch. I’m getting ready to add more features to this library to pull from the github analytics api, but I don’t want to proceed without a successful CI.
Clay Jensen-Reimann
@clayreimann
@mtscout6 The underlying problem with CI is that our tests do not generally reflect real-world usage of the Github APIs (we hit them really fast) and so we see some flakyness in the tests
The fact that the build failed does not mean the code is bad, just that the tests are unstable
I have not yet had time to fully isolate each test, but if you wanted to do that then we can tell Mocha to rerun failed tests (maybe twice) and we should see CI go back to green
Matt Smith
@mtscout6
My concern is that I’m seeing some tests reliably fail at this point. I’m open to help with it, and if the GitHub rate limiting is a factor we may want to have a pool of test accounts to use so we can run tests more often.
@clayreimann I sent @michael a message on Twitter about moving the repo to an Org, I don’t see his email address anywhere. If you have his email address can you give that a try? Also, my opinion is to push him to move it to the github-tools org since you and @AurelioDeRosa are already members of that org. I’d like to join that org and help on occasion if you’re interested.
Clay Jensen-Reimann
@clayreimann
@mtscout6 both of those are fair points. And I cc:ed you on my email to Michael
Matt Smith
@mtscout6
@clayreimann Can I get an invite to the GitHub Tools org?
Looks like something is nuking that test repo from github, which would explain why the issue tests fail...
Clay Jensen-Reimann
@clayreimann
I'm not an admin we'll have to get @AurelioDeRosa or @aendrew or @michael to add you
Leonardo Santos
@leonardosnt
Ændrew Rininsland
@aendrew
@mtscout6 I’ve added you to the org, apologies for the delay! I haven’t had Gitter open!
Matt Smith
@mtscout6
No worries
Thanks
Jeanette
@jeanettehead
Is it possible to list user repositories (http://github-tools.github.io/github/docs/2.3.0/User.html#listRepos) and only get the first N results rather than waiting for all the pagination to finish?
I found that I could use the since option to only get repos modified after a certain datetime, but that's not what I'm looking for in this case.
Matt Smith
@mtscout6
@jeanettehead The way it’s written right now no. Though I wonder if there’s a better way to write that using a generator function so you can only iterate as much as you need without forcing an enumeration over all the pages.
@aendrew Thanks for adding me to the org. Though I don’t seem to have permission to do anything in the org. Can you either modify the default permissions for the repos in the org or add a Team that has read/write access to the repos?
Ændrew Rininsland
@aendrew
@mtscout6 You should have admin privs now.
Wait, hold up.
Ændrew Rininsland
@aendrew
THERE. Wow, GitHub’s permissions model really needs work..
Matt Smith
@mtscout6
Thanks
Tim Wisniewski
@timwis
Hello folks! I'm trying to get the contents of a file. It seems like the only way to do that is using Repository's .getContents() method while passing raw=true in the arguments. But Iv'e noticed that if the file is a json file, the github js library parses the json into an object. Is there any way to get the json as text, in the same way it'd come through if it were yaml, markdown, etc? Seems a bit inconsistent to have the json be parsed
loko
@binario200

hi guys, great tool githuba-api! but I'm having issues trying to delete a hook:

          var remoteRepo = github.getRepo(repoOwner, repoName);
          return remoteRepo.deleteHook(hookId);

but I'm getting

Error: error making request DELETE https://github.hpe.com/api/v3undefined/hooks/4844

I'm using github-api 2.3.0

loko
@binario200
@ConcernedHobbit I did this to get the hooks of a repo
var repo = github.getRepo(login, repositoryName);
            return repo.listHooks()
                .then(function(hooks) {
                    if (hooks && hooks.data) {
                        console.log('hooks for ', hooks.config.url);
                        return hooks.data;
                    } else {
                        console.log('hook http response ', hooks);
                    }
                })
                .catch(function(error) {
                    console.log('an error occurred fetching the webhooks', error);
                });