GitHub API文档说:
Git DB API functions will return a 409 if the git repo for a Repository is empty or unavailable.
我POST上$repo/git/trees确实返回409.
我如何在存储库中创建初始提交呢?我是否必须强制用户手动提交一些无用的垃圾,只是为了创建root提交?
通过github API,PushEvents类别包括一个提交列表和一个github在事件发生时分配的时间.PushEvent描述文档声明属性commits[][distinct]指示
此提交是否与之前推送的任何提交不同.
这表明只有一个事件条目,其中提交被标记为'distinct'标志设置为True作为Github看到它们的最早时间,并且此类事件将具有最早的时间戳与任何其他具有该提交的事件相比.
但是,我发现一些提交在多个不同的推送事件通知中被标记为"不同",并且标记为'distinct'= False的提交实际上可能出现在早期事件中,而不是那些被标记为'True'的事件.
这是为什么?我误解了"独特"旗帜的含义吗?
我们在Stack Overflow Careers上使用GitHub API来引入用户的存储库.我们没有成功引入属于组织的用户存储库.
例如,wycats是jQuery项目的贡献者.然而,通过API 查询他的存储库并没有表明这一点 - jQuery repo归jQuery组织所有.
什么是API调用,以了解wycats是jQuery存储库的贡献者?正确答案将采用URL的形式,该URL返回给定用户名的组织存储库列表.如果需要多次通话,那很好.
谢谢!
我目前正在尝试阅读(GitHub API)[http://developer.github.com/v3/repos/contents/],以了解如何以编程方式检索单个存储库中特定文件的所有版本.
我看到可以轻松获取提交列表和单个文件的当前版本.但是,有没有办法列出与特定文件相关的所有提交,然后遍历该文件的所有版本?
我想在chrome打包的应用程序中使用chrome.identity API,以允许用户使用github进行身份验证.
从应用程序方面来说,我很满意:
chrome.identity.launchWebAuthFlow(
{'url':'https://github.com/login/oauth/authorize?client_id=clientidgoeshere','interactive':true},
functionToTakeRedirectURL
);
Run Code Online (Sandbox Code Playgroud)
但我不确定github端的重定向URL应该是什么.当应用程序处于活动状态时,我会在github应用程序页面上将重定向URL设置为https://appidgoeshere.chromiumapp.org,但我不认为在应用程序运行之前该URL可用.
在编写应用程序时,有人知道在哪里指向重定向?
我正在使用chrome.dart库在Dart中编写应用程序,但我认为如果我使用普通的javascript编写时存在同样的问题.
我想知道匿名github gists是否会过期
我在Github的gist API文档上找不到任何内容,谷歌会在如何删除它们的结果中找到结果,但是到期时没有任何内容(如果有的话)
的build.gradle(模块:APP)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.example.beetel.App"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral() // jcenter() works as well because it pulls from Maven Central
maven{ url "https://jitpack.io"}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
//glide libraries
compile 'com.android.support:palette-v7:23.3.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.florent37:glidepalette:2.0.0'
compile 'com.github.bumptech.glide:okhttp-integration:1.3.1@aar'
// { transitive = true;}
// { exclude …Run Code Online (Sandbox Code Playgroud) 我试图使用新的Github上GraphQL API(V4),我似乎并没有能够弄清楚如何获得最后x提交对主.我使用过存储库和参考,但他们仍然没有给我我需要的东西.
下面的查询几乎给了我我需要的东西:
query{
repository(owner: "typelevel", name: "cats") {
refs(refPrefix:"refs/heads/", last: 5) {
edges{
node {
associatedPullRequests(states: MERGED, last: 5) {
edges{
node {
title
baseRef {
name
prefix
}
baseRefName
commits(last: 10) {
edges {
node {
commit {
abbreviatedOid
message
}
}
}
}
}
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
但:
我也尝试过使用defaultBranchRef,但这也不起作用:
query{
repository(owner: "typelevel", name: "cats") {
defaultBranchRef {
name
prefix
associatedPullRequests(states: [MERGED], last: …Run Code Online (Sandbox Code Playgroud) 我想使用GraphQL Github API递归列出目录中包含的所有文件.现在我的查询看起来像这样:
{
search(first:1, type: REPOSITORY, query: "language:C") {
edges {
node {
... on Repository {
name
descriptionHTML
stargazers {
totalCount
}
forks {
totalCount
}
object(expression: "master:") {
... on Tree {
entries {
name
type
}
}
}
}
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
但是,这只给了我第一级目录内容,特别是一些结果对象又是树.有没有办法调整查询,以便它再次递归列出树的内容?
我的Github应用程序如何获得具有创建问题权限的访问令牌?
我启用了Settings-> Developer settings -> GitHub Apps -> Permissions and webhook页面中的所有权限,按照 说明获取访问令牌,然后提交引用文档的请求,但获得以下响应:
{
"message": "Resource not accessible by integration",
"documentation_url": "https://developer.github.com/v3/issues/#create-an-issue"
}
但是当我使用个人访问令牌发出此请求时,一切正常.
我启用了所有权限

订阅所有活动

https://github.com/login/oauth/authorize?client_id=Iv1.abfa65bfc68dc75a


https://github.com/login/oauth/access_token


当我用我的个人访问令牌取代之前步骤中获得的access_token时,一切正常.

