mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
17 lines
643 B
Python
17 lines
643 B
Python
from GithubObject import *
|
|
|
|
def __testHook( hook ):
|
|
hook._github._statusRequest( "POST", hook._baseUrl() + "/test", None, None )
|
|
Hook = GithubObject(
|
|
"Hook",
|
|
BaseUrl( lambda obj: obj._repo._baseUrl() + "/hooks/" + str( obj.id ) ),
|
|
InternalSimpleAttributes(
|
|
"url", "updated_at", "created_at", "name", "events", "active", "config",
|
|
"id", "last_response",
|
|
"_repo",
|
|
),
|
|
Editable( [ "name", "config" ], [ "events", "add_events", "remove_events", "active" ] ),
|
|
Deletable(),
|
|
SeveralAttributePolicies( [ MethodFromCallable( "test", [], [], __testHook, SimpleTypePolicy( None ) ) ], "Testing" )
|
|
)
|