【发布时间】:2015-03-14 18:26:07
【问题描述】:
我正在尝试编写一个存储插件,该插件将遍历推送到预接收存储库挂钩中存储的更改集中的提交。
API 在 onReceive 方法中传递一个 refChange 集合。
public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)
如果我进行 3 次提交,然后 push 我会得到一个 RefChange,看起来像这样
refId = refs/heads/master
fromHash = ded3e4583653f14892cc3e8a898ba74ee75e1a58 // First Commit in change set
toHash = ae017dcdadf7ca69617fb05f6905cccfe2aa4229 // Most recent commit
type = "UPDATE"
我想获取所有提交的集合,以便我可以获取所有提交消息。
我正在查看 com.atlassian.stash.commit.CommitService getCommit 和 getCommits。我想我需要 getCommitsBetween 但不能完全弄清楚如何从我拥有的 RefChange 中创建所需的 GetCommitsBetween 参数。
我是不是走在正确的道路上?
【问题讨论】:
标签: bitbucket-server atlassian-plugin-sdk