FAQ Database Discussion Community


How to create Organization name through Github API instead of creating manually?

git,curl,github,github-api
I am trying to use github api to create organization and repositories instead of creating them manually. I was looking at this site which talks about how to create repositories under a particular organization. My github instance url is like this - https://github.host.com And I want my repository to be...

Starring a repository with the github API

github,put,github-api
I'm trying to star a repository using the GithubAPI. This is done via a PUT request to /user/starred/:owner/:repo. I attempted to implement this feature in python using the requests library, but it isn't working. Here is a minimum working example: The constant are defined as GITHUB_API = api.github.com, GITHUB_USER =...

Print out repository releases with go-github

go,github-api
I am very new to Go and am having issues printing out all releases for a given repo using the go-github api. I am adapting my code from the example in the project here. This is the code I have so far. package main import ( "fmt" "github.com/google/go-github/github" "golang.org/x/oauth2" )...

GitHub API authentication with MSXML2.XMLHTTP

github,vbscript,github-api
I am trying to authenticate on the GitHub API via Basic Authentication using MSXML2.XMLHTTP. I understand that I need to pass my credentials using the Authorization HTTP header. So this is my code, but it always returns unauthenticated. (As per the GitHub API documentation, with a 404 / Not Found)....

Electron & ReactJS, Use BrowserWindow for GitHub oAuth authentication

oauth,callback,github-api,electron
I have set up github's Electron with ReactJs. So I got a BrowserWindow and a react app playing nicely in that window. What I'm trying to achieve is to get authenticated with GitHub. So when a user presses the Login with Github button, a new BrowserWindow opens and goes to...

How to create repository in github through github API?

git,curl,github,github-api
I am trying to use github api to create repositories under a particular organization. I was looking at this site which talks about how to create repositories under a particular organization. Create a new repository in this organization. The authenticated user must be a member of the specified organization. POST...

GitHub API returned Url meaning

git,api,url,github,github-api
Take this very simple API as example, https://api.github.com/users/zhuhuihuihui In the JSON formatted response, you'll find something like following, "following_url":"https://api.github.com/users/zhuhuihuihui/following{/other_user}", "gists_url": "https://api.github.com/users/zhuhuihuihui/gists{/gist_id}", "starred_url": "https://api.github.com/users/zhuhuihuihui/starred{/owner}{/repo}", Ok, I know like the following_url, starred_url is something like a sub API which you can call to fetch who that user are following, or what repos...

Is there any way to refer a external and custom issue tracker from github?

github,github-api
It is possible integrate github with a custom application that track issues? This custom issue tracker is developed by people that is not involved with github development, but can code some plugin or feature that provides a pattern to refer a external issue. The pattern can be #I or something...

Cannot upload github release asset through API

github-api
I have a github release with no assets yet: $ curl https://api.github.com/repos/cljsinfo/api-docs/releases/1260660/assets [ ] But I cannot upload an asset to this release: $ curl -X POST --header "Content-Type:application/edn" --data-binary @cljsdocs-full.edn "https://api.github.com/repos/cljsinfo/api-docs/releases/1260660/assets?name=full.edn&access_token=$(cat my-token)" { "message": "Not Found", "documentation_url": "https://developer.github.com/v3" } my api access token has public_repo access. Thanks for any...

Link to download latest version tag of a repository from GitHub

github,github-api
I want to make download link for latest version of my application from GitHub tags. But I can not use GitHub releases, only just tags to make the new version. So I want an universal link to the latest tag zipball. I already did that with jQuery and GitHub API,...

Download link for latest release of GitHub project

javascript,html,ajax,github,github-api
I am trying to add to my website a download link to the latest github release of a project. For example the link https://github.com/mongodb/mongo/archive/r3.0.0-rc7.zip does link to the latest release (as of today), but I do not want to hard-code the version number on the web site. I found several...

Python append json to json file in a while loop

python,json,python-requests,github-api,writefile
I'm trying to get all users information from GitHub API using Python Requests library. Here is my code: import requests import json url = 'https://api.github.com/users' token = "my_token" headers = {'Authorization': 'token %s' % token} r = requests.get(url, headers=headers) users = r.json() with open('users.json', 'w') as outfile: json.dump(users, outfile) I...

Ruby github API

ruby-on-rails,ruby,github,github-api
I am new to ruby programming. I was trying to write below ruby code to create a comment in Github gist. uri = URI.parse("https://api.github.com/gists/xxxxxxxxxxx/comments") http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = (uri.scheme == 'https') http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(uri.request_uri) request.body = { "body" => "Chef run failed " }.to_json response...

Using GitHub API to determine if the last commit to master was a result of a merged pull request?

github,github-api
We use GitHub flow as branching strategy which means that anything in master is the result of a merged pull request. It's trivial to get the last commit by doing the following. GET https://api.github.com/repos/:org/:repo/git/refs/heads/master However it seems non-trivial to work out the pull request that caused this commit. Is it...

Get username and avatar url through github authenticaton

ruby-on-rails,oauth,github-api
I am using the oauth gem to authenticate users through GitHub. I'm trying to get the person's username and avatar url. I can't find, or completely missed, where in the scopes I can get access to these things. This is from my user model and my initializer file: # omniauth.rb...

Which scope(s) should I use to ask GitHub for permission to read public profile data + private email addresses?

rest,github,github-api
According to GitHub API documentation, the default scope is read-only access to public profile data, but you have to specify the scope user:email to get private email addresses. How can I get both? I can't see any explicit parameter to get public profile data as well as email addresses (user:email).

What is “Developer Program Member” on Github.com

github,github-api
I have seen couple of Github profiles having "Developer Program Member". I searched on Google a lot but not able to find how people get that in their profile.

Github OAuth flow with Express and Ember.js

node.js,ember.js,express,oauth,github-api
I'm pretty new to Express.js and the Github OAuth api and running into a wall. The flow I've got going is, the user clicks on a link from the Ember.js application which points to a route on the Express server. Which redirects to the Github oauth route. router.route('/oauth') .get(function(req, res){...

using the github API, Create git pull request without checking out the code

git,github,github-api
How can I create a github pull request for a project that I haven't checked out using the github api. I want to automate simple changes to repositories, that I need not check out first. I simply want to pull a file from raw.githubusercontent.com modify it and create said pull...

Is there a way to list down all the issues using github api without a page size?

github-api
I am using github apis to export a list of issues for a selected repository. For this, I am using python script. After getting a list of issues, I'd create a csv file. I just wanted to know if there is a way to extract all the issues at once...

Retrieve HTML of ReadMe

javascript,ajax,github-api
Hi so first time working with APIs like this. Anyways, I've been reading up on the GitHub API and came across this: READMEs support custom media types for retrieving the raw content or rendered HTML. src: https://developer.github.com/v3/repos/contents/#get-the-readme Which I believe means that it is possible to retrieve an HTML formatted...

How to find the new location of a repository after a rename

github,github-api
If a user renames a repository from foo/bar.git to foo/baz.git via GitHub's UI, how can I detect this via the API? Currently, I get a 404 if I call the API like this: GET /repos/foo/bar How can I find the new repository name?...

MeteorJs - Error in an http call

javascript,meteor,github-api
This is my first Meteor program and I'm trying to make an http call to Github. I'm facing an error which goes like this: Exception in delivering result of invoking 'getUserInfo': ["click button"]/<@http://localhost:3000/helloMeteor.js?823f404b37c246a7d23ae50a10c37969e426b2b8:18:17 Meteor.bindEnvironment/<@http://localhost:3000/packages/meteor.js?43b7958c1598803e94014f27f5f622b0bddc0aaf:983:17 [email protected]://localhost:3000/packages/ddp.js?d1840d3ba04c65ffade261f362e26699b7509706:3860:7...

Getting issues before a time from github

github,github-api
The github issues api provides a way to get all the issues that were updated at or after a particular time, but is there a way I can get all the issues before a particular time?

How to get latest commit date - Github API

javascript,php,github-api
I'm currently writing a small database of git reps and im wondering how i would go ahead and get the date of the latest commit if i have the rep listed in my database. I've never worked with the github API and im having a bit of a hard time...

Automatically copy pushed files from one GitHub repository to another

git,github,github-api,githooks
I have two GitHub repositories. I'd like to automatically (probably using hooks and/or github API) commit and push files to the second repository when they are pushed to the first one. The second repository is not a clone of the first one, their folder layout is not necessarily the same...

Fetch Private Repositories information using github API

github-api
I am trying to get the list of all my github repositories using this API. https://api.github.com/users/<user>/repos/?access_token=<auth_token> This API returns only public repositories and not the private ones too though I am adding auth_token as a query parameter. Thanks for your help....

Get user total starred count using Github API v3

github-api
From the doc, I can list repositories being starred using: GET /users/:username/starred But it seems that I can't directly get the count of total starred repos of a user. Am I missing something?...

How to get project badge via GitHub API?

api,github,github-api,badge
I have build a resume page for my self, and list all my projects there by using GitHub API. Some of the project are document which have rtfd build passing badge, some are python projects which have travis-ci and pep-lint badges. Now, I want to display the badges as with...

Using Github login with a Django project

json,django,github,github-api
I'm working on making a site that allows login with Github and I'm using Django for this. I've gotten as far as redirecting the user to the github authorization page, and then redirecting the user to another part of my project after successful authorization. My question is then: How do...

Extract commits related to code changes from commit tree

python,github,github-api,pygit2
Right now I am able to traverse through the commit tree for a github repository using pygit2 library. I am getting all the commits for each file change in the repository. This means that I am getting changes for text files with extensions .rtf as well in the repository. How...

Performing a PUT update in dojo using GitHub api returns 400: problems parsing JSON

javascript,json,github,dojo,github-api
Basically I am trying to update a file on Github using the api. When I do this in Poster it works no problem and I get a response from the server. When sending the exact same params in an xhr put request however, I receive a 400: Bad request error...

Github push event signature don't match

javascript,github,github-api
I'm coding a Webhook for GitHub, and implemented secure verification in KOA.js as: function sign(tok, blob) { var hmac; hmac = crypto .createHmac('sha1', tok) .update(blob) .digest('hex'); return 'sha1=' + hmac; } ... key = this.request.headers['x-hub-signature']; blob = JSON.stringify(this.request.body); if (!key || !blob) { this.status = 400; this.body = 'Bad Request';...

404 Not Found error while creating repositories through Github API?

git,curl,github,github-api
I am trying to use github api to create repositories under a particular organization. I was looking at this site which talks about how to create repositories under a particular organization. My github instance url is like this - https://github.host.com And I want my repository to be like this after...

Is there Task Completion info on GitHub Issues API?

github,markdown,github-api,github-flavored-markdown
On GitHub Flavored Markdown you can write something like: - [ ] Subtask 1 - [ ] Subtask 2 - [x] Subtask 3 This will render as a list of three checkboxes, the last one checked. That also gives a nice bonus to Issues listing as it includes a progress...

URL encoding issues with curly braces

ruby,github-api,url-encoding,faraday
I'm having issues getting data from GitHub Archive. The main issue is my problem with encoding {} and .. in my URL. Maybe I am misreading the Github API or not understanding encoding correctly. require 'open-uri' require 'faraday' conn = Faraday.new(:url => 'http://data.githubarchive.org/') do |faraday| faraday.request :url_encoded # form-encode POST...

GitHub release asset download with node.js

node.js,github,github-api,nw.js
I want to write an auto downloader in Node.js using the http.get method from a GitHub release using the API and and i receive 302 error. What can i do?

spring-social-github maven repository

spring,github-api,spring-social
I can't find Maven repository for spring-social-github. Could you please let me know where it is located ?

Output bash variable with multiple lines to curl json

json,bash,curl,github-api
I'm trying to create a script that will use the Github API to post a comment containing the output of a command. This output has multiple lines. Here's what I'm trying to do: curl -H "Authorization: token oauthtoken" \ -H "Content-Type: application/json" \ -X POST [email protected] \ https://api.github.com/repos/company/repo/issues/14/comments <<EOF {...

How to use GET to fetch list of repositories?

git,github,github-api
I am not able to understand how the below thing works: I run the "GET /orgs/octokit/repos" command in the terminal and nothing happens. It's supposed to get list of repositories. I am sure I am not doing the correct way. Can somebody please explain why this command doesn't work? Example:...

How can I get list of all issues related to a particular version for a repository from github api

github,github-api
For public repositories that have multiple versions of product released on github is there a way to get list of issues that are logged against particular version for the repository

Github API Create Issues return 404 Not found

github-api
I am making a request to the below URL- Post https://api.github.com/repos/kvimal/2048/issues With my Token as a header for authorization. The Curl Request curl -i -X POST https://api.github.com/repos/kvimal/2048/issues -d "{title:'hey'}" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxx" -H "Content-Type: application/json" And GitHub sends a response 404 Not found. I have reade the Documentation and...

GitHub Search API only return 30 results

github-api
https://api.github.com/search/issues?q=stress+test+label:bug+language:python+state:closed the above query is suppose to return 76 results, and when I try to run it, it only returns 30. I guess GitHub return results in portions when it is over 30. Any idea how I can get the rest of the results? ...

Github Api - how to keep track of moved repos/projects?

github,github-api
I'm having trouble with an application I'm building that keeps track of some github repos via github API. When I manually move or rename a project (on github) that my app is tracking, I lose it (by getting a 404 when I call the old api url). I do notice...