
    _Og                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr   " S	 S
\R                  5      r
 " S S\
5      r " S S\
5      r " S S\
5      rg)z,This module contains the RepoCommit classes.   )status   )checks)git)models)users)RepoCommentc                   h    \ rS rSrSrSS0rS rS rS rS r	S r
S	 rS
 rS rS rSS jrSS jrSrg)_RepoCommit
   aD  The :class:`RepoCommit <RepoCommit>` object.

This represents a commit as
viewed by a :class:`Repository`. This is different from a Commit object
returned from the git data section.

Two commit instances can be checked like so::

    c1 == c2
    c1 != c2

And is equivalent to::

    c1.sha == c2.sha
    c1.sha != c2.sha

AcceptzMapplication/vnd.github.groot-preview+json,application/vnd.github.v3.full+jsonc                 :    US   U l         US   =U l        U l        g )Nurlsha_api_uniqr   )selfcommits     Y/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/repos/commit.py_update_attributes_RepoCommit._update_attributes$   s    5M	 &u-
TX    c                 B    SU R                    SU R                  S S  S3$ )N<z [   z]>)
class_namer   )r   s    r   _repr_RepoCommit._repr)   s&    4??#2dhhrl^266r   c                     U R                  SU R                  S9nU R                  SU[        R                  [        R                  R
                  SS9$ )zRetrieve the check runs for this commit.

.. versionadded:: 1.3.0

:returns:
    the check runs for this commit
:rtype:
    :class:`~github3.checks.CheckRun`
z
check-runsbase_url
check_runsheaderslist_key)
_build_urlr   _iterr   CheckRunCUSTOM_HEADERSr   r   s     r   r$   _RepoCommit.check_runs,   sM     oolTYYo?zzOOOO22!  
 	
r   c                     U R                  SU R                  S9nU R                  SU[        R                  [        R                  R
                  SS9$ )zRetrieve the check suites for this commit.

.. versionadded:: 1.3.0

:returns:
    the check suites for this commit
:rtype:
    :class:`~github3.checks.CheckSuite`
zcheck-suitesr!   r#   check_suitesr%   )r(   r   r)   r   
CheckSuiter+   r,   s     r   r/   _RepoCommit.check_suites?   sQ     oontyyoAzz%%44#  
 	
r   c                     U R                  U R                  SS0S9nU R                  USS5      (       a  UR                  $ S$ )z_Retrieve the diff for this commit.

:returns:
    the diff as a bytes object
:rtype:
    bytes
r   zapplication/vnd.github.diffr&        r   _getr   _booleancontentr   resps     r   diff_RepoCommit.diffR   sI     yyII*GH  
  $}}T3<<t||E#Er   c                     U R                  U R                  SS0S9nU R                  USS5      (       a  UR                  $ S$ )zpRetrieve the patch formatted diff for this commit.

:returns:
    the patch as a bytes object
:rtype:
    bytes
r   zapplication/vnd.github.patchr3   r4   r5   r   r6   r:   s     r   patch_RepoCommit.patch_   sI     yyII*HI  
  $}}T3<<t||E#Er   c                     U R                  SU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zRetrieve the combined status for this commit.

:returns:
    the combined status for this commit
:rtype:
    :class:`~github3.repos.status.CombinedStatus`
r   r!   r4   )r(   r   _jsonr7   _instance_or_nullr   CombinedStatus)r   r   jsons      r   r   _RepoCommit.statusl   sK     ooho;zz$))C.#.%%f&;&;TBBr   c                 x    U R                  SU R                  S9nU R                  SU[        R                  5      $ )zRetrieve the statuses for this commit.

:returns:
    the statuses for this commit
:rtype:
    :class:`~github3.repos.status.Status`
statusesr!   r#   )r(   r   r)   r   Statusr,   s     r   rH   _RepoCommit.statusesx   s1     ooj499o=zz"c6==11r   Nc                 t    U R                  SU R                  S9nU R                  [        U5      U[        US9$ )a<  Iterate over comments for this commit.

:param int number:
    (optional), number of comments to return. Default: -1 returns all
    comments
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of comments
:rtype:
    :class:~github3.repos.comment.RepoComment`
commentsr!   )etag)r(   r   r)   intr	   )r   numberrM   r   s       r   rL   _RepoCommit.comments   s5     ooj499o=zz#f+sKdzCCr   c                     SSK Jn  U R                  SU R                  S9nU R	                  UUUR
                  UU R                  S9$ )aG  Iterate pull requests associated with a commit.

:param int number:
    (optional), number of comments to return. Default: -1 returns all
    pull requests
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of pull requests
:rtype:
    :class:~github3.pulls.PullRequest`
r   )pullsrR   r!   )rM   r&   ) rR   r(   r   r)   ShortPullRequestPREVIEW_HEADERS)r   rO   rM   rR   r   s        r   associated_pull_requests$_RepoCommit.associated_pull_requests   sN     	oog		o:zz""((  
 	
r   r   )r#   N)__name__
__module____qualname____firstlineno____doc__rU   r   r   r   r$   r/   r<   r?   r   rH   rL   rV   __static_attributes__ r   r   r   r   
   sU    & 	 .O
 J.
7
&
&FF
C	2D 
r   r   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )
RepoCommit   z8Representation of a commit with repository and git data.zRepository Commitc                   > [         TU ]  U5        SU l        SU l        US   U l        SU l        US   U l        U R                  (       a=  U R                  S   U l        U R                  S   U l        U R                  S   U l        g g )N    filesstats	additions	deletionstotal)superr   rf   rg   rd   rh   re   r   r   	__class__s     r   r   RepoCommit._update_attributes   sw    "6*G_

G_
::!ZZ4DN!ZZ4DNG,DJ r   )rf   rg   rd   re   rh   )	rX   rY   rZ   r[   r\   r   r   r]   __classcell__rk   s   @r   r`   r`      s    B$J- -r   r`   c                        \ rS rSrSrSr\rSrg)
MiniCommit   z#A commit returned on a ShortBranch.zMini Repository Commitr^   N)	rX   rY   rZ   r[   r\   r   r`   _refresh_tor]   r^   r   r   rp   rp      s    -)JKr   rp   c                   4   ^  \ rS rSrSrSr\rU 4S jrSr	U =r
$ )ShortCommit   z7Representation of an incomplete commit in a collection.zShort Repository Commitc                   > [         TU ]  U5        US   U l        U R                  (       a&  [        R                  " U R                  U 5      U l        US   U l        [        R                  " US   U 5      U l        US   U l	        U R                  (       a&  [        R                  " U R                  U 5      U l	        US   U l
        US   U l        [        U R                  SS 5      U l        g )Nauthorcomments_urlr   	committerhtml_urlparentsmessage)ri   r   rw   r   	ShortUserrx   r   rt   r   ry   rz   r{   getattrr|   rj   s     r   r   ShortCommit._update_attributes   s    "6*X&;;//$++t<DK">2oofX&6=,>>"__T^^TBDNz*i(t{{It<r   )rw   rx   r   ry   rz   r|   r{   )rX   rY   rZ   r[   r\   r   r`   rr   r   r]   rm   rn   s   @r   rt   rt      s    A*JK= =r   rt   N)r\   rS   r   r   r   r   r   commentr	   
GitHubCorer   r`   rp   rt   r^   r   r   <module>r      sS    2       _
&## _
D- -, =+ =r   