github-api

Github API call: filter by committer-date

柔情痞子 提交于 2019-12-23 12:58:28
问题 I'm using the github api, trying to find all my commits on a specific day. This query, as expected, returns all my commits: https://api.github.com/search/commits?q=committer-email:foo@bar.com But this query returns that same list, including results outside the specified date range: https://api.github.com/search/commits?q=committer-email:foo@bar.com&committer-date=2017-08-13..2017-08-14 (These queries require a header to be set: Accept: application/vnd.github.cloak-preview) Why does the

Cross origin GET from local file://

拈花ヽ惹草 提交于 2019-12-23 10:06:15
问题 I'm trying to build an html file to monitor some things on a remote site- specifically, github.com. I'd like to be able to keep it to just that flat file, making the requests straight from the JS to github's API. My thought process went like this: Let's use jsonp, since I only need read access, so sticking with GETs should be fine. That fails because you can't do basic authentication with jsonp. Ok, I'll use Github's OAuth instead of basic authentication! That fails because the browser doesn

URL encoding issues with curly braces

旧城冷巷雨未停 提交于 2019-12-23 04:33:41
问题 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 params faraday.response :logger # log requests to STDOUT faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end #query =

How to search using Github API with enterprise

亡梦爱人 提交于 2019-12-23 04:01:54
问题 I'm trying to search through repositories, but I can't seem to figure it out with github enterprise edition. I have tried the following with no results. Any suggestions? curl -i http://my.domain.com/api/v3/repositories "If-Modified-Since: Mon, 16 Jun 2014 01:01:01 CST" curl -i http://my.domain.com/api/v3/search/repos?q=pushed:2014-06-17 HTTP/1.1 404 Not Found Server: GitHub.com Date: Wed, 18 Jun 2014 16:45:58 GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Status: 404

GitHub API: Enable Push Restrictions for branch

与世无争的帅哥 提交于 2019-12-23 03:42:21
问题 I am trying to disable and enable branch protections for a GitHub project in a Python script using the GitHub API (Version 2.11). More specifically I want to remove all push restrictions from a branch and later enable them with specific teams. Replacing/adding existing team restrictions works via PUT/POST /repos/:owner/:repo/branches/:branch/protection/restrictions/teams And removing push restrictions also works like a charm using DELETE /repos/:owner/:repo/branches/:branch/protection

Github API responding with 'Content is not valid Base64'

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 03:01:54
问题 I am getting a 'Content is not valid Base64' error when posting a certain, very simple, piece of content to github using the API. The content is unit = $("<li class='s clearfix'></li>"); I am using Base64.urlsafe_encode64 to encode the content. content = 'unit = $("<li class=\'s clearfix\'></li>")'; url = "https://api.github.com/repos/#{github_user}/#{github_repo}/contents/#{path}" RestClient.put(url, { message: "my message", content: Base64.urlsafe_encode64(content), encoding:"base64" }.to

Github API: Finding untagged commits

帅比萌擦擦* 提交于 2019-12-23 02:42:27
问题 Is it possible to find all untagged commits since the latest release using Github API? 回答1: First, you can get the latest release with the GitHub API (which matches the matest tag) GET /repos/:owner/:repo/releases/latest That means you can then compare two commits: GET /repos/:owner/:repo/compare/:base...:head For example: https://api.github.com/repos/git-for-windows/git/compare/v2.4.5.windows.1...master Notes: See Working with large comparisons: The response will include a comparison of up

Function searchissue() from egit don't return all issues in a GitHub repository

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 02:36:57
问题 I am trying to find issues from a repository in the GitHub, but when I use the searchissues() function from the IssueService class, that only returns 10 issues. The repository that i am search has more then 40 issues registred. How can i return all de issues registred in my repository? public static void main(String[] args) throws IOException { GitHubClient client = new GitHubClient(); client.setCredentials("xxxxxx", "xxxxx"); int openIssue = 0; int closedIssue = 0; RepositoryService

Github Api list commit status when repository is under organisation

◇◆丶佛笑我妖孽 提交于 2019-12-22 18:27:58
问题 I am trying to list status of commits for a repository using github rest api. The repository is under organisation and is private. The repos_url of which is https://api.github.com/orgs/mydummyorg/repos Users with pull access can view commit statuses for a given ref: GET /repos/:owner/:repo/commits/:ref/statuses As per the api above is the GET url So my final url will be repos_ulr + :owner/:repo/commits/:ref/statuses If I do the curl as below then it is giving 404 not found curl -u "username"

How to create and update a file in a Github repository with PHP and Github API?

▼魔方 西西 提交于 2019-12-22 17:46:34
问题 I am trying to build PHP functions to create and update files within a Github repository, using PHP through the Github API. The PHP files are being run from a standard shared hosting account. Therefore using frameworks that depend on installing Composer or other libraries is not an option for me. So for example, this https://github.com/KnpLabs/php-github-api is not an option. So far I have managed to access and list files using PHP, using the info given here: Github API List all repositories