How do I find the default branch for a repository using the Github v3 API

前端 未结 1 1006
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 11:53

My goal is to get the tree for the latest SHA in the default branch

GET /repos/:owner/:repo/git/trees/:sha

How do I find the lastest SHA fr

相关标签:
1条回答
  • 2021-01-04 12:04

    Make a call to /repos/:owner/:repo and read the default_branch property value - this is the name of the default branch. See example response here: http://developer.github.com/v3/repos/#get

    0 讨论(0)
提交回复
热议问题