问题
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