mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-22 16:36:30 +00:00
fix missing commit sha and wrong tag link.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
0c972d8fc5
commit
2a2ff0550c
2 changed files with 3 additions and 2 deletions
|
@ -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,
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in a new issue