mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-22 06:06:18 +00:00
github tag build should not have changed files (#698)
This commit is contained in:
parent
549996cbcd
commit
2f780193b1
1 changed files with 7 additions and 0 deletions
|
@ -187,12 +187,15 @@ func convertPushHook(from *webhook) *model.Build {
|
|||
Sender: from.Sender.Login,
|
||||
ChangedFiles: files,
|
||||
}
|
||||
|
||||
if len(build.Author) == 0 {
|
||||
build.Author = from.Head.Author.Username
|
||||
}
|
||||
|
||||
// if len(build.Email) == 0 {
|
||||
// TODO: default to gravatar?
|
||||
// }
|
||||
|
||||
if strings.HasPrefix(build.Ref, "refs/tags/") {
|
||||
// just kidding, this is actually a tag event. Why did this come as a push
|
||||
// event we'll never know!
|
||||
|
@ -202,7 +205,11 @@ func convertPushHook(from *webhook) *model.Build {
|
|||
if strings.HasPrefix(from.BaseRef, "refs/heads/") {
|
||||
build.Branch = strings.Replace(from.BaseRef, "refs/heads/", "", -1)
|
||||
}
|
||||
|
||||
// tags should not have changed files
|
||||
build.ChangedFiles = nil
|
||||
}
|
||||
|
||||
return build
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue