例如,我有一个这样的URL,用于GET请求: https://stash-server.com/rest/api/1.0/projects/something/repos/project/commits/develop/
https://stash-server.com/rest/api/1.0/projects/something/repos/project/commits/develop/
这对 develop 但当我试图 feature/something 要访问该分支上的提交,它将返回404 not found。
develop
feature/something
缺少文档,我找不到如何访问这样的分支名称。。。
谢谢!
最终的解决方案/解决方法是执行两个REST调用,第一个调用 /branches 端点,遍历结果以找到正确的分支,并获取 latestCommit 散列,然后调用REST commits/hashID -这解决了无法访问分支名称的问题,如 feature/something 直接通过REST API。
/branches
latestCommit
commits/hashID