You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-23 21:44:44 +02:00
let HookParse func explicit ignore events (#1942)
for now it's not clear defined, what to do on an unsupported event. e.g. gitea webhook panel shows 500 error and no message. now we have a successful webhook and a message to show an info
This commit is contained in:
@@ -20,8 +20,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/franela/goblin"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/woodpecker-ci/woodpecker/server/forge/bitbucket/fixtures"
|
||||
"github.com/woodpecker-ci/woodpecker/server/forge/types"
|
||||
"github.com/woodpecker-ci/woodpecker/server/model"
|
||||
)
|
||||
|
||||
@@ -37,7 +39,7 @@ func Test_parser(t *testing.T) {
|
||||
r, b, err := parseHook(req)
|
||||
g.Assert(r).IsNil()
|
||||
g.Assert(b).IsNil()
|
||||
g.Assert(err).IsNil()
|
||||
assert.ErrorIs(t, err, &types.ErrIgnoreEvent{})
|
||||
})
|
||||
|
||||
g.Describe("Given a pull request hook payload", func() {
|
||||
|
||||
Reference in New Issue
Block a user