【发布时间】:2018-10-27 02:25:41
【问题描述】:
我想获取自上次发布以来的提交列表,但由于我有很多 git 存储库要检查,我想通过 bitbucket rest API 来完成它,而不是克隆我想要的每个 git 存储库测试。
如果我确实有克隆,我的问题很简单:
#!/bin/bash
git tag | grep '<release-tag-regexp>' | sort <in-descending-order>' \
| while read tag
do
tag_sha1="$(git rev-parse "$tag^{commit}")"
ancestor="$(git merge-base HEAD $tag)"
if [ $ancestor = $tag_sha1 ]
then
echo "Closest release tag is: $tag"
exit 1
fi
done
if [ $? -eq 0 ]
then
echo "No release tag found which is an ancestor of HEAD"
fi
我希望 bitbucket 对此查询有一个休息电话。看起来,我似乎别无选择,只能使用提交日志和标签列表,自己构建一个映射。
【问题讨论】:
-
您使用的是 bitbucket.org 还是 Bitbucket Server?
-
内部部署 - 所以我猜它是 bitbucket 服务器
标签: bitbucket bitbucket-server