
    _Og                     B    S r SSKJr  SSKJr  SSKJr   " S S\5      rg)	z@This module contains only the Hook object for GitHub's Hook API.    )dumps   )requires_auth)
GitHubCorec                   v    \ rS rSrSrSS jrS r\S 5       r\0 / / / S4S j5       r	\S	 5       r
\S
 5       rSrg)Hook   a
  The representation of a hook on a repository.

See also: http://developer.github.com/v3/repos/hooks/

This object has the following attributes:

.. attribute:: active

    A boolean attribute describing whether the hook is active or not.

.. attribute:: config

    A dictionary containing the configuration for this hook.

.. attribute:: created_at

    A :class:`~datetime.datetime` object representing the date and time
    when this hook was created.

.. attribute:: events

    The list of events which trigger this hook.

.. attribute:: id

    The unique identifier for this hook.

.. attribute:: name

    The name provided to this hook.

.. attribute:: updated_at

    A :class:`~datetime.datetime` object representing the date and time
    when this hook was updated.
Nc                     US   U l         US   U l        US   U l        U R                  US   5      U l        US   U l        US   U l        US   U l        U R                  US   5      U l        g )	Nurlactiveconfig
created_ateventsidname
updated_at)	_apir   r   	_strptimer   r   r   r   r   )selfhooksessions      W/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/repos/hook.py_update_attributesHook._update_attributes.   sn    K	8n8n..l);<8nt*L	..l);<    c                 "    SU R                    S3$ )Nz<Hook [z]>)r   r   s    r   _repr
Hook._repr8   s    2&&r   c                 Z    U R                  U R                  U R                  5      SS5      $ )zVDelete this hook.

:returns:
    True if successful, False otherwise
:rtype:
    bool
     )_boolean_deleter   r   s    r   deleteHook.delete;   s$     }}T\\$))4c3??r   Tc                     XS.nU(       a  X&S'   U(       a  X6S'   U(       a  XFS'   U R                  U R                  U R                  [        U5      S9S5      nU(       a  U R	                  U5        gg)	a  Edit this hook.

:param dict config:
    (optional), key-value pairs of settings for this hook
:param list events:
    (optional), which events should this be triggered for
:param list add_events:
    (optional), events to be added to the list of events that this hook
    triggers for
:param list rm_events:
    (optional), events to be removed from the list of events that this
    hook triggers for
:param bool active:
    (optional), should this event be active
:returns:
    True if successful, False otherwise
:rtype:
    bool
)r   r   r   
add_eventsremove_events)data   TF)_json_patchr   r   r   )r   r   r   r(   	rm_eventsr   r*   jsons           r   edit	Hook.editF   sh    . !3#N!+$-!zz$++diieDk+BCH##D)r   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zTPing this hook.

:returns:
    True if successful, False otherwise
:rtype:
    bool
pingsbase_urlr!   r"   
_build_urlr   r#   _postr   r   s     r   ping	Hook.pingo   5     oog		o:}}TZZ_c377r   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zTTest this hook.

:returns:
    True if successful, False otherwise
:rtype:
    bool
testsr4   r!   r"   r6   r9   s     r   test	Hook.test{   r<   r   )r   r   r   r   r   r   r   r   )N)__name__
__module____qualname____firstlineno____doc__r   r   r   r%   r0   r:   r?   __static_attributes__ r   r   r   r      sp    #J=' @ @ rR& &P 	8 	8 	8 	8r   r   N)rE   r/   r   
decoratorsr   modelsr   r   rG   r   r   <module>rJ      s    F  & }8: }8r   