Pre Receive Repository Hook で stash にプッシュされた変更セットのコミットを反復処理する stash プラグインを作成しようとしています。
API は onReceive メソッドで refChange の Collection を渡します。
public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse)
3 つのコミットを行ってからプッシュすると、次のような RefChange が 1 つ取得されます
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 パラメーターをクレートする方法がよくわかりません。
私はここで正しい道を進んでいますか?