1
0
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:
pat-s 2024-12-05 23:34:30 +01:00
parent 91c9f1b99a
commit 67ca41991e
No known key found for this signature in database
GPG Key ID: 3C6318841EF78925
3 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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(),

View File

@ -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