Questions tagged [node-github]

A wrapper around the GitHub API for NodeJS

node-github is a wrapper written around the Github API to use with NodeJS. Documentation of the API can be found here: http://ajaxorg.github.com/node-github/

14 questions
7
votes
3 answers

Decoding base64 while using GitHub API to Download a File

I am using the GitHub API to download a file from GitHub. I have been able to successfully authenticate as well as get a response from github, and see a base64 encoded string representing the file contents. Unfortunately, I get an unusual error…
Eric Broda
  • 6,701
  • 6
  • 48
  • 72
4
votes
0 answers

List different commits between two branches by using nodegit

In my program, I'm using nodegit. I'm able to list commits using nodegit: var nodegit = require("nodegit"); var path = require("path"); var fs = require("fs"); var shas = []; var names= []; var mess= []; var sums= []; var time =[]; let promise =…
G.Szymon
  • 41
  • 2
4
votes
1 answer

How add directory or all files in a directory by nodegit?

I am new on node js and on git as well, i am building an app that will write results on text files and will push on git rapidly. After many struggle I have figured out following code that is writing file and pushing on github. But I am seeking a way…
Mian Majid
  • 814
  • 2
  • 8
  • 22
2
votes
1 answer

NodeGit how to get last commit id of another branch?

I have two branches checked out of my system Master and Dev. My Working directory is Master from Master I want to push/merge file to dev after knowing the difference. For say in Master I am working abc.txt file and I want to check the difference…
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59
1
vote
1 answer

How to use GitHub SSH key for private/public repositories in a Nodejs for (clone, pull, push, and commit)

I tried using Nodegit in the same method, but I got an error message saying "Clone.clone, stack: Error: Method clone has caused an error." or "Github authentitation failed." I have tried it but it gives me below error message Error: Method clone…
1
vote
1 answer

handling return values in promises nodejs

I have built this function in NodeJs, var Git = require('nodegit'); var fse = require('fs-extra'); var path = require('path'); var fs = require('fs'); var repoPath = 'D:\\sample' function gitCommitHistory(repoPath, callbackGitCommitHistory) { try…
Sritharan M
  • 43
  • 2
  • 13
1
vote
0 answers

node-github - get user public info

I'm trying to fetch some users data for a small research on github by using this api: https://developer.github.com/v3/users/#get-a-single-user When I'm trying to fetch user data via crul I'm getting the data just by runing this command (without no…
Shula
  • 167
  • 1
  • 18
0
votes
1 answer

NodeGit checkout a branch but Get error "HEAD detached at origin/branch"?

I am using nodegit to checkout from clone and Open it to do something. My code like this: //repo is a Repository from Clone() or Open() //branchName is your branch name, of course repo.getBranch('refs/remotes/origin/' + branchName) …
cauchuyennhocuatoi
  • 461
  • 3
  • 8
  • 21
0
votes
1 answer

How can I list all files with NodeGit? (Equivalent of 'git ls-files')

I currently run the following git command for list of all untracked and modified files: git ls-files -mo --exclude-standard Is there any equivalent for it in the NodeGit world?
nitishagar
  • 9,038
  • 3
  • 28
  • 40
0
votes
1 answer

node-github: "getStatsContributors" doesn't return results properly

This is how I'm using the method: github.repos.getStatsContributors({ repo: 'Cloudformation-Webserver', owner : 'DorrinPk' }, function (err, res) { console.log(err, res); }); The first time I run it for the repo…
tyrell_c
  • 503
  • 3
  • 10
  • 24
0
votes
1 answer

Unable to clone hosted Repository using NodeGit

I have created a GIT Bare Repository in the Linux server. And while I try to clone the repository using Nodegit from the local workstation, I'm getting the following error., err { Error: received unexpected content-type errno: -1 }. Following is…
Ramesh Gurusamy
  • 138
  • 1
  • 6
0
votes
1 answer

How to push using nodegit?

I am trying to push the file In the repository but getting error that {remote origin already exits errno -4} Basic Task Open the connection, commit the file, {pull and merge} , push the changes I am able to open the connection ,commit the file but…
Kunal Vashist
  • 2,380
  • 6
  • 30
  • 59
0
votes
1 answer

git push remote ssh using Nodegit, Not working?

Hi I am trying to do a git push origin master command with the help of Nodegit, but it is resulting in an error, var Git = require('nodegit'); function gitRemoteLookUp(repoPath) { var open = Git.Repository.open; var Remote = Git.Remote; …
Sritharan M
  • 43
  • 2
  • 13
0
votes
1 answer

Correct approach to getting all pages from API that utilizes a Link header (using JavaScript/NodeJS)

I'm using a NodeJS module called node-github, which is a wrapper around the Github API, to get some statistics about certain users, such as their followers: var getFollowers = function(user, callback) { github.user.getFollowers(user, function(err,…
Traveling Tech Guy
  • 27,194
  • 23
  • 111
  • 159