github-api

Create an issue with image via GitHub API

霸气de小男生 提交于 2019-12-06 19:02:49
问题 I am creating issues with https://developer.github.com/v3/issues/#create-an-issue. Is it possible to attach images to message body? I tried 'Accept', 'application/vnd.github.v3.html+json' and emmbeded the image as img elment base64 encoded. The image will not show, but the ticket editor shows the img element. 回答1: There is no simple solution to this. The official docs say nothing about that which means it's not supported. The GitHub.com authentication works based on cookies while the API

Github API: Finding untagged commits

不羁的心 提交于 2019-12-06 15:44:06
Is it possible to find all untagged commits since the latest release using Github API? 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 to 250 commits. If you are working with a larger commit range, you can use the Commit List API to enumerate

How to get all fork sources from one GitHub repo list operation?

懵懂的女人 提交于 2019-12-06 12:30:08
I want to get all the source repos for a GitHub user's repos. I have to do it by two steps. For example, first, I can use https://api.github.com/users/nmap/repos to get all repos of user nmap . But the source and parent do not exist. Only when I call https://api.github.com/repos/nmap/:repo_name for each repo, I can get the source and parent : { "id": 63894766, "name": "libpcap", "full_name": "nmap/libpcap", "owner": { "login": "nmap", "id": 63385, "avatar_url": "https://avatars3.githubusercontent.com/u/63385?v=4", "gravatar_id": "", "url": "https://api.github.com/users/nmap", "html_url":

How to get all user repositories by github api? (including Pinned repositories)

大城市里の小女人 提交于 2019-12-06 12:01:35
问题 I' trying get all user's repositories by using PyGithub . For clarity the user: https://github.com/mbostock has 53 public repos. my code: import github con = github.Github(mylogin, pass) u = g.get_user('mbostock').get_repos('all') and I get 53, It's correct number but, I have noticed that among all received repos I can't find some user's Pinned repositories , for example d3/d3 , although that user also make big contribution on this repo. If somebody know github api, and way of receiving all

Decoding base64 while using GitHub API to Download a File

天大地大妈咪最大 提交于 2019-12-06 11:03:48
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 (string length is not a multiple of 4) when decoding the base64 string. The HTTP request is illustrated below: GET /repos/:owner/:repo/contents/:path The (partial) response is illustrated below: { "name":...., "download_url":...", "type":"file", "content":"ewogICAgInN3YWdnZXIiOiAiM... } The issue I am encountering is that the length of the string is

GithubAPI: Get repositories a user has ever committed in

一笑奈何 提交于 2019-12-06 10:49:37
问题 Within the scope of the research project ideally I need for any two users find the repositories that they have in their shared history of public development, i.e. they have committed in the same repos. I wonder if it is possible to get the list of repositories that were ever been touched by a given user. In Github-API I can see only: GET /repos/:owner/:repo/contributors GET /users/:user/repos GET /users/:user/events First gives only the contributors for a given :repo repository Second only

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

谁都会走 提交于 2019-12-06 09:21:02
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 and repo's content I used a combination of the 2nd and 6th answer (2nd starts with Here is a nice way

Github GraphQL Search with Filtering

戏子无情 提交于 2019-12-06 07:16:39
Based on my limited searching, it seems GraphQL can only support equal filtering. So, Is it possible to do Github GraphQL searching with the filtering conditions of, stars > 10 forks > 3 total commit >= 5 total issues >= 1 open issues <= 60 size > 2k score > 5 last update is within a year I.e., filtering will all above conditions. Is it possible? When querying for repositories, you can apply a filter only for a certain number of the fields in your list: number of stars number of forks size last update Although you cannot specify them in the query filter, you can include other fields in your

Github Api list commit status when repository is under organisation

橙三吉。 提交于 2019-12-06 07:15:14
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" https://api.github.com/orgs/mydummyorg/repos/:owner:repos/commits/:ref/statuses Where: :owner =

Forking a GitHub repo using from the command line with bash, cURL, and the GitHub API

∥☆過路亽.° 提交于 2019-12-06 07:12:01
问题 I am having trouble with my bash script to fork a GitHub repo using cUrl. The gitHub API doc for creating a fork. I've tried many variations: curl -u $my_user_name https://api.github.com/repos/forks -d "{\"owner\":\"$upstream_repo_username\",\"repo\":\"$upstream_repo_name\"}" and curl -u $my_user_name https://api.github.com/repos/'$upstream_repo_username'/'$upstream_repo_name'/forks yield the following error: { "message": "Not Found", "documentation_url": "https://developer.github.com/v3" }