我正在使用以下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?