2013-04-05 15 views
11

Vorrei ottenere tutti i messaggi di commit per file separati in github REST api. Ma tutto quello che ho ottenuto - solo per ottenere tutti i commit per ramo separato. Poi ho cercato di ottenere seguente:È possibile ottenere la cronologia dei commit per un file in github api?

http://api.github.com/users/<username>/<project>/commits/<branch>/<path/to/file> 

Ma questo non ha aiutato anche. È almeno possibile?

risposta

1

Utilizzando GraphQL API v4, per un file sul ramo di default, sarebbe:

{ 
    repository(owner: "izuzak", name: "pmrpc") { 
    defaultBranchRef{ 
     target { 
     ...on Commit{ 
      history(first:100,path: "README.markdown"){ 
      nodes { 
       author { 
       email 
       } 
       message 
       oid 
      } 
      } 
     } 
     } 
    } 
    } 
} 

Try it in the explorer

Problemi correlati