mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-04-15 01:41:56 +00:00
Add linter staticcheck (#535)
* Add linter staticcheck Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -190,9 +190,9 @@ func convertPushHook(from *webhook) *model.Build {
|
||||
if len(build.Author) == 0 {
|
||||
build.Author = from.Head.Author.Username
|
||||
}
|
||||
if len(build.Email) == 0 {
|
||||
// default to gravatar?
|
||||
}
|
||||
// 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!
|
||||
|
||||
@@ -266,12 +266,11 @@ func (c *client) Dir(ctx context.Context, u *model.User, r *model.Repo, b *model
|
||||
}
|
||||
|
||||
var files []*remote.FileMeta
|
||||
var errors []error
|
||||
|
||||
for i := 0; i < len(data); i++ {
|
||||
select {
|
||||
case err := <-errc:
|
||||
errors = append(errors, err)
|
||||
return nil, err
|
||||
case fileMeta := <-fc:
|
||||
files = append(files, fileMeta)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user