From 4b31babb982075c60a75bb3d46d3eaf8f462069f Mon Sep 17 00:00:00 2001 From: Joachim Hill-Grannec Date: Tue, 19 Apr 2016 01:14:55 -0400 Subject: [PATCH] fixing to use the commit hash instead of the refID --- remote/bitbucketserver/bitbucketserver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote/bitbucketserver/bitbucketserver.go b/remote/bitbucketserver/bitbucketserver.go index d119a6ef8..601a2fd77 100644 --- a/remote/bitbucketserver/bitbucketserver.go +++ b/remote/bitbucketserver/bitbucketserver.go @@ -274,7 +274,7 @@ func (bs *BitbucketServer) Hook(r *http.Request) (*model.Repo, *model.Build, err buildModel.Event = model.EventPush buildModel.Ref = hookPost.RefChanges[0].RefID buildModel.Author = hookPost.Changesets.Values[0].ToCommit.Author.EmailAddress - buildModel.Commit = hookPost.RefChanges[0].RefID + buildModel.Commit = hookPost.RefChanges[0].ToHash buildModel.Avatar = avatarLink(hookPost.Changesets.Values[0].ToCommit.Author.EmailAddress) //All you really need is the name and owner. That's what creates the lookup key, so it needs to match the repo info. Just an FYI