VSTS API - repository creation date

一曲冷凌霜 提交于 2020-01-06 07:10:57

问题


I've checked VSTS REST API documentation, but I haven't found a method which allows me to get information about the repository creation date.

Is it possible to get such data via the VSTS API?


回答1:


I don't think it is possible to get the exact date of the moment the operation create repo was completed. However, logically the birthday of the repository is usually considered its first commit date.

If that's what you're looking for, you can achieve your goal with a usual Git command:

git log -1 --reverse --format="format:%ci"



回答2:


You need to check the first commit date for the repository. Check the Get Commits API:

GET https://{accountName}.visualstudio.com/_apis/git/repositories/{project}/commits?api-version=4.1


来源:https://stackoverflow.com/questions/51055157/vsts-api-repository-creation-date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!