mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-02 04:03:48 +00:00
fix(bitbucketdc): build status not reported on PR builds (#5162)
Co-authored-by: Ratko Ruzicic <ratko.ruzicic@oaklandgrp.com>
This commit is contained in:
parent
0a22070400
commit
1f23da379e
2 changed files with 3 additions and 3 deletions
|
@ -119,7 +119,7 @@ func convertPullRequestEvent(ev *bb.PullRequestEvent, baseURL string) *model.Pip
|
|||
Author: authorLabel(ev.Actor.Name),
|
||||
Email: ev.Actor.Email,
|
||||
Timestamp: time.Time(ev.Date).UTC().Unix(),
|
||||
Ref: fmt.Sprintf("refs/pull-requests/%d/from", ev.PullRequest.ID),
|
||||
Ref: ev.PullRequest.Source.ID,
|
||||
ForgeURL: fmt.Sprintf("%s/projects/%s/repos/%s/commits/%s", baseURL, ev.PullRequest.Source.Repository.Project.Key, ev.PullRequest.Source.Repository.Slug, ev.PullRequest.Source.Latest),
|
||||
Refspec: fmt.Sprintf("%s:%s", ev.PullRequest.Source.DisplayID, ev.PullRequest.Target.DisplayID),
|
||||
FromFork: ev.PullRequest.Source.Repository.ID != ev.PullRequest.Target.Repository.ID,
|
||||
|
|
|
@ -218,7 +218,7 @@ func Test_convertPullRequestEvent(t *testing.T) {
|
|||
Author: "John Doe",
|
||||
Email: "john.doe@mail.com",
|
||||
Timestamp: now.UTC().Unix(),
|
||||
Ref: "refs/pull-requests/123/from",
|
||||
Ref: "refs/head/branch",
|
||||
ForgeURL: "https://base.url/projects/PRJ/repos/REPO/commits/1234567890abcdef",
|
||||
Event: model.EventPull,
|
||||
Refspec: "branch:main",
|
||||
|
@ -273,7 +273,7 @@ func Test_convertPullRequestCloseEvent(t *testing.T) {
|
|||
Author: "John Doe",
|
||||
Email: "john.doe@mail.com",
|
||||
Timestamp: now.UTC().Unix(),
|
||||
Ref: "refs/pull-requests/123/from",
|
||||
Ref: "refs/head/branch",
|
||||
ForgeURL: "https://base.url/projects/PRJ/repos/REPO/commits/1234567890abcdef",
|
||||
Event: model.EventPullClosed,
|
||||
Refspec: "branch:main",
|
||||
|
|
Loading…
Reference in a new issue