mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 03:41:01 +00:00
Use Bitbucket PR title for pipeline message (#3984)
This commit is contained in:
parent
2d039f85cb
commit
ec02379b04
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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())
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue