diff --git a/remote/gitea/helper.go b/remote/gitea/helper.go index d625dc040..587daf383 100644 --- a/remote/gitea/helper.go +++ b/remote/gitea/helper.go @@ -100,9 +100,9 @@ func buildFromTag(hook *pushHook) *model.Build { return &model.Build{ Event: model.EventTag, - Commit: hook.After, + Commit: hook.Sha, Ref: fmt.Sprintf("refs/tags/%s", hook.Ref), - Link: fmt.Sprintf("%s/src/%s", hook.Repo.URL, hook.Ref), + Link: fmt.Sprintf("%s/src/tag/%s", hook.Repo.URL, hook.Ref), Branch: fmt.Sprintf("refs/tags/%s", hook.Ref), Message: fmt.Sprintf("created tag %s", hook.Ref), Avatar: avatar, diff --git a/remote/gitea/types.go b/remote/gitea/types.go index f648f8de1..1671bd812 100644 --- a/remote/gitea/types.go +++ b/remote/gitea/types.go @@ -1,6 +1,7 @@ package gitea type pushHook struct { + Sha string `json:"sha"` Ref string `json:"ref"` Before string `json:"before"` After string `json:"after"`