diff --git a/server/forge/bitbucket/convert.go b/server/forge/bitbucket/convert.go index 431c24086e..ab8f9578fa 100644 --- a/server/forge/bitbucket/convert.go +++ b/server/forge/bitbucket/convert.go @@ -178,7 +178,7 @@ func convertPullHook(from *internal.PullRequestHook) *model.Pipeline { ), ForgeURL: from.PullRequest.Links.HTML.Href, Branch: from.PullRequest.Source.Branch.Name, - Message: from.PullRequest.Desc, + Message: from.PullRequest.Title, Avatar: from.Actor.Links.Avatar.Href, Author: from.Actor.Login, Sender: from.Actor.Login, diff --git a/server/forge/bitbucket/convert_test.go b/server/forge/bitbucket/convert_test.go index ee47a27705..b1adad9299 100644 --- a/server/forge/bitbucket/convert_test.go +++ b/server/forge/bitbucket/convert_test.go @@ -131,7 +131,7 @@ func Test_helper(t *testing.T) { hook.PullRequest.Source.Repo.FullName = "baz/bar" hook.PullRequest.Source.Commit.Hash = "c8411d7" hook.PullRequest.Links.HTML.Href = "https://bitbucket.org/foo/bar/pulls/5" - hook.PullRequest.Desc = "updated README" + hook.PullRequest.Title = "updated README" hook.PullRequest.Updated = time.Now() pipeline := convertPullHook(hook) @@ -143,7 +143,7 @@ func Test_helper(t *testing.T) { g.Assert(pipeline.ForgeURL).Equal(hook.PullRequest.Links.HTML.Href) g.Assert(pipeline.Ref).Equal("refs/heads/change") g.Assert(pipeline.Refspec).Equal("change:main") - g.Assert(pipeline.Message).Equal(hook.PullRequest.Desc) + g.Assert(pipeline.Message).Equal(hook.PullRequest.Title) g.Assert(pipeline.Timestamp).Equal(hook.PullRequest.Updated.Unix()) })