I am trying to get commits on a particular branch in bitbucket stash.
- Branch was initially branched from master to develop some features
- after feature code was committed it was merged back to master
- But the branch was not deleted, so I want to use Bitbucket rest API to get the exact commits on that particular feature branch.
I tried
https://<stash-url>/stash/rest/api/1.0/projects/<project-ID>/repos/<repo-slig>/compare/commits?from=<my-target-feature-branch>&to=master
which gives me
{
"values": [],
"size": 0,
"isLastPage": true,
"start": 0,
"limit": 25,
"nextPageStart": null
}
and the other url i tried is
https://<stash-url>/stash/rest/api/latest/projects/<project-ID>/repos/<repo-slug>/commits?until=<my-target-feature-branch>&limit=100
which gives me the whole commit history from master too.
can someone please help me? I am a newbie and I'm sure there is something wrong in my understanding of API docs