Hey guys,
Im trying to get the latest commit for a particular branch in stash (deploy). When I run the rest api call -
curl -X GET -H "<authentication info>" "http://<ourstashurl>/stash/rest/api/latest/projects/<projectname>/repos/<reponame>/compare/commits?from=deploy&start=0&limit=0"
However, the results that I get from running this are not correct. I am getting the lastest commit from other branches, but not the "deploy" branch.
How should I adjust this rest API call in order to get the latest commit from the "deploy" branch? The piece of information that I want is the date of the latest commit for the "deploy" branch.
Thanks.
I found the answer -
curl -X GET -H "<some authorization>" -H "Content-Type: application/json" "http://<stashurl>/stash/rest/api/latest/projects/<projectname>/repos/<myrepo>/commits?until=deploy&limit=0&start=0"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
try
curl -X GET -H "<authentication info>" "http://<ourstashurl>/stash/rest/api/latest/projects/<projectname>/repos/<reponame>/commits?path=refs/heads/deploy&start=0&limit=0"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.