Skip to content

Commit

Permalink
fixing final lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Claire.Nicholas authored and Claire.Nicholas committed Jan 2, 2024
1 parent 55b5ef3 commit fb0cc5f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion library/actions/delete.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: Apache-2.0

//
//nolint:dupl // similar code to push.go
package actions

import "github.com/go-vela/types/constants"
Expand Down
8 changes: 4 additions & 4 deletions library/actions/delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ func TestLibrary_Delete_ToMask(t *testing.T) {
}

func testDelete() *Delete {
delete := new(Delete)
delete.SetBranch(true)
delete.SetTag(true)
deletion := new(Delete)
deletion.SetBranch(true)
deletion.SetTag(true)

return delete
return deletion
}
8 changes: 4 additions & 4 deletions library/events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,15 @@ func testEvents() *Events {
comment.SetCreated(false)
comment.SetEdited(false)

delete := new(actions.Delete)
delete.SetBranch(true)
delete.SetTag(true)
deletion := new(actions.Delete)
deletion.SetBranch(true)
deletion.SetTag(true)

e.SetPush(push)
e.SetPullRequest(pr)
e.SetDeployment(deploy)
e.SetComment(comment)
e.SetDelete(delete)
e.SetDelete(deletion)

return e
}
2 changes: 2 additions & 0 deletions library/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ func (r *Repo) SetApproveBuild(v string) {
}

// EventAllowed determines whether or not an event is allowed based on the repository settings.
//
//nolint:nakedret // not necessary to watch for here
func (r *Repo) EventAllowed(event, action string) (allowed bool) {
allowed = false

Expand Down

0 comments on commit fb0cc5f

Please sign in to comment.