github-api

How can I get a list of all github `PushEvents` for a user

拟墨画扇 提交于 2021-02-07 03:07:22
问题 I can see all events for a particular user, for example here are mine: https://api.github.com/users/arasbm/events But I am only interested in events of a particular type: "type": "PushEvent", How can I get this data without having to process the list of all events (which can be slow). I am trying to do this because I want to get a list of all my PRs that have been merged. If you can give me the curl command that would be awesome. I can not find this anywhere in the github api docs. 回答1: As

Generate line pointer URL into Github Pull Request

三世轮回 提交于 2021-02-04 18:41:05
问题 I am trying to auto-generate a URL that can point to a line number into the GitHub Pull request's file diff view. Basically, given the URL https://github.com/weppos/whois/pull/90/files I'd like to generate URL like https://github.com/weppos/whois/pull/90/files#diff-ce6bf647d5a531e54ef0502c7fe799deR27 that can point to the line 27 of file in the GitHub pull request. Looking at the URL, seems like it's combination of https://github.com/weppos/whois/pull/90/ + files/#diff- +

Github GraphQl - How to get a list of commits between tags

给你一囗甜甜゛ 提交于 2021-01-29 08:52:43
问题 With Github GraphQL I want to answer the question: What commits have been merged into master between releases/tags? The result should be similar to the results for this question Get commit list between tags in Git if I were to do it on the command line. I'm using the developer explorer and wondering if I will be able to do this with a single query or if I will need several. I tried the following but it does not give me the commits between tags that have not been tagged, just the tagged

C++ - Get latest release of a GitHub project

。_饼干妹妹 提交于 2021-01-29 07:18:53
问题 I have a program that uses a set of files stored in a GitHub project. I would like to check the latest release version of that GitHub project and download those files if it's newer than local. Does anyone know how to check release version and download from (using QT C++)? My program is done in Qt 5 (https://github.com/bq/QssWeb2Board) 回答1: Checking the commented lib and doing some digging around I found an answer. Here it is the main code. Thanks. QUrl url("https://api.github.com/repos/" +

Quarkus native and org.kohsuke:github-api - Failed to deserialize exception

江枫思渺然 提交于 2021-01-28 20:30:42
问题 I'm playing with Quarkus native and org.kohsuke:github-api:1.111 and I see Failed to deserialize exception in native mode when doing simple new GitHubBuilder().withOAuthToken(ghToken).build(); . This works in JVM mode. The main problem is probably the fact that org.kohsuke:github-api is not ready for native mode. I still want to ask if there are any options to workaround this, maybe some jackson tricks for https://github.com/github-api/github-api/blob/master/src/main/java/org/kohsuke/github

Github Last Commit?

和自甴很熟 提交于 2021-01-28 04:41:18
问题 So iv been looking around trying to find out how i can go to a specified github page and get the last commit value and bind this into a value in my application, nothing seems to make sense and there aren't many if any good examples to base anything on. As well as noone seeming to want to share their knowledge on this topic. Im trying to get the last commit value only from a github page, and use that as a value in my application, can someone give me an example of how to do this? I am using C#

GitHub API - How do I find out if a file is actually a symlink?

*爱你&永不变心* 提交于 2021-01-27 21:13:27
问题 When querying a symlink via the GitHub API, I get different results if the symlink points to a file as opposed to a directory. The latter is more well behaved in that it returns "type": "symlink" as part of its JSON, whereas the former returns "type": "file" . Example file symlink, example directory symlink. It's very confusing when a symlink advertises itself as a file, as GET-ing its download URL will just get you the target of the symlink and not the file contents . How do I tell if a file

GitHub API - find when repo made private

时间秒杀一切 提交于 2021-01-27 14:49:35
问题 I am creating an API which runs reports on repos that my company hosts on GitHub. One of the requirements is to list when reports were made private from public. I am not sure if the API has this feature. Firstly and foremost, I was not able to find this information even manually when I went into GitHub. So from Settings or some other section, is there a way I can see when a repo (of which I am a member) was made private? 回答1: GitHub doesn't provide information when the visibility of a repo

How to use ssh authentication with github API?

谁说胖子不能爱 提交于 2021-01-20 16:20:07
问题 Is there some way to use ssh-based authentication when accessing the GitHub API through the command line (via, e.g., curl, etc.?). FWIW, I tried many variations of the following (varying the way I specified my public ssh key file) but in every case I was still prompted for my password: % curl --pubkey ~/.ssh/id_rsa.pub --user yrstruly https://api.github.com/user/repos 回答1: If you are using ssh, then you would never logon as ' yrstruly '. You would always connect as 'git'. Your public key

Bad Credentials for Github API

本小妞迷上赌 提交于 2020-12-06 06:37:27
问题 I have the following script, which I am trying to test out in bash, using curl to do a couple things, one is to create a new repo, the second - which is not implemented yet - is to get the git_url from the json thats returned, which I'm not sure if my parse_json function will let me do that and then finally to push a sample commit message to that repo. the script is as follows: #!/usr/bin/env bash set -eux # Json Function: parse_json 'json string' key function parse_json() { echo $1 | sed -e