mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-24 10:07:21 +02:00
adjust gh, gl and gitea
This commit is contained in:
parent
91c9f1b99a
commit
67ca41991e
@ -160,7 +160,7 @@ func pipelineFromPullRequest(hook *pullRequestHook) *model.Pipeline {
|
||||
Commit: hook.PullRequest.Head.Sha,
|
||||
ForgeURL: hook.PullRequest.HTMLURL,
|
||||
Ref: fmt.Sprintf("refs/pull/%d/head", hook.Number),
|
||||
Branch: hook.PullRequest.Base.Ref,
|
||||
Branch: hook.PullRequest.Head.Ref,
|
||||
Message: hook.PullRequest.Title,
|
||||
Author: hook.PullRequest.Poster.UserName,
|
||||
Avatar: avatar,
|
||||
|
@ -164,7 +164,7 @@ func parsePullHook(hook *github.PullRequestEvent, merge bool) (*github.PullReque
|
||||
Commit: hook.GetPullRequest().GetHead().GetSHA(),
|
||||
ForgeURL: hook.GetPullRequest().GetHTMLURL(),
|
||||
Ref: fmt.Sprintf(headRefs, hook.GetPullRequest().GetNumber()),
|
||||
Branch: hook.GetPullRequest().GetBase().GetRef(),
|
||||
Branch: hook.GetPullRequest().GetHead().GetRef(),
|
||||
Message: hook.GetPullRequest().GetTitle(),
|
||||
Author: hook.GetPullRequest().GetUser().GetLogin(),
|
||||
Avatar: hook.GetPullRequest().GetUser().GetAvatarURL(),
|
||||
|
@ -106,7 +106,7 @@ func convertMergeRequestHook(hook *gitlab.MergeEvent, req *http.Request) (int, *
|
||||
repo.CloneSSH = target.SSHURL
|
||||
}
|
||||
|
||||
repo.Branch = target.DefaultBranch
|
||||
repo.Branch = hook.ObjectAttributes.SourceBranch
|
||||
|
||||
if target.AvatarURL != "" {
|
||||
repo.Avatar = target.AvatarURL
|
||||
|
Loading…
Reference in New Issue
Block a user