GIT API:获取带有特定标签的标签

时间:2019-10-02 08:53:07

标签: git github bitbucket github-api

我正在使用以下API来获取给定存储库的标签的完整列表:

https://GIT_SERVER.com/rest/api/1.0/projects/PROJ/repos/MY_REPO/tags

{
   "size": 13,
   "limit": 25,
   "isLastPage": true,
   "values": [
      {
         "id": "refs/tags/20191002_1",
         "displayId": "MYLABEL1",
         "type": "TAG",
         "latestCommit": "fc1582a425d466b4f7b1",
         "latestChangeset": "fc1581393cf11001c5d466b4f7b1",
         "hash": "defe1e666c1b19"
      },
      {
         "id": "refs/tags/20191002_1",
         "displayId": "MYLABEL2",
         "type": "TAG",
         "latestCommit": "fc15801c5d466b4f7b1",
         "latestChangeset": "fc1582a425bf1446b4f7b1",
         "hash": "defe1ead44f77d02e1b19"
      },...
   ]

}

我正在寻找一种提取与参数中给定标签关联的哈希的方法。 示例:如果我提供label = defe1e666c1b19

,我想得到MYLABEL1

是否可以使用GIT API?

0 个答案:

没有答案