
    _Og                    >   S r SSKrSSKrSSK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
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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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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#KJ&r&  SS$KJ'r'   " S% S&\RP                  5      r) " S' S(\)5      r* " S) S*\)5      r+ " S+ S,\RP                  5      r,          S.S- jr-g)/zThis module contains Repository objects.

The Repository objects represent various different repository representations
returned by GitHub.

    N   )branch)comment)commit)
comparison)contents)
deployment)hook)
invitation)issue_import)pages)release)stats)status)tag)topics)traffic   )checks)
decorators)events)
exceptions)git)issues)licenses)models)notifications)projects)pulls)users)utils)event)label)	milestonec                   b
   \ rS rSrSrSS0rSS0rS rS rS r	S r
S	 r\R                  SzS j5       rS{S jrS rS|S jrS rS rS}S jrS rS rS|S jrS~S jrS|S jrS rS|S jrS r        SS jrS rS|S jrSS jr SS jr!SS jr"\RF                          SS  j5       r$\RF                  S! 5       r%\R                  S" 5       r&\R                  SzS# j5       r'\R                  SS$ j5       r(\R                   SS% j5       r)\R                       SS& j5       r*\R                   SS' j5       r+\R                  SzS( j5       r,\R                  S)/S*4S+ j5       r-\R                       SS, j5       r.\R                  SS- j5       r/\R                  SzS. j5       r0\R                   SS/ j5       r1\R                  SzS0 j5       r2\R                   SS1 j5       r3\R                  S2 5       r4\R                  S3 5       r5\R                       SS4 j5       r6\R                   SS5 j5       r7\R                   SS6 j5       r8\R                  SzS7 j5       r9\R                  S8 5       r:\R                  S9 5       r;\R                  S: 5       r<S; r=S|S< jr>S
\?4S= jr@\R                              SS> j5       rA\R                  SS? j5       rBS|S@ jrCSzSA jrDSSB jrESC rF\R                  SD 5       rG\R                  S|SE j5       rH\R                  SF 5       rI\R                  SG 5       rJ\R                  SSH j5       rK\R                       SSI j5       rL\R                  S|SJ j5       rMSK rN\R                  SL 5       rOSM rPS|SN jrQ          SSO jrR\R                  SP 5       rS\R                  S|SQ j5       rTSR rUS|SS jrVS|ST jrW\R                  SU 5       rXSV rYSW rZ\R                  SSX j5       r[\R                  SSY j5       r\SZ r] SS[ jr^S|S\ jr_\R                   SS] j5       r`\R                  S^ 5       ra\R                  S|S_ j5       rbSzS` jrcS|Sa jrdSb re       SSc jrfSd rgSe rhSSf jriSg rjSh rkS|Si jrl\R                  Sj 5       rm\R                  Sk 5       rnS|Sl jroS|Sm jrp\R                  Sn 5       rqS|So jrr\R                  Sp 5       rsSq rtS|Sr jru\R                  S|Ss j5       rvSt rwSSu jrx\R                  Sv 5       ry\R                  Sw 5       rzSx r{Syr|g
)_Repository.   zThis class serves as the base for all other Repository objects.

Sub-classes should need only to override the ``_update_attributes``
method to ensure that all attributes are present on the object.
Acceptz)application/vnd.github.mercy-preview+json#application/vnd.github.v3.star+jsonc                 X   US   =U l         U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l	        [        R                  " US   5      U l
        [        R                  " US	   5      U l        [        R                  " US
   5      U l        US   U l        US   U l        US   U l        US   U l        US   U l        US   U l        US   U l        US   U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        US   U l        US   U l        US   U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        [        R                  " US   5      U l        US   U l         US   U l!        [        R                  " US    5      U l"        US!   U l#        [        R                  " US"   5      U l$        [J        RL                  " US#   U 5      U l'        US$   U l(        [        R                  " US%   5      U l)        [        R                  " US&   5      U l*        US'   U l+        [        R                  " US(   5      U l,        US)   U l-        US*   U l.        US+   U l/        US,   U l0        [        R                  " US-   5      U l1        g ).Nurlarchive_urlassignees_url	blobs_urlbranches_urlcollaborators_urlcomments_urlcommits_urlcompare_urlcontents_urlcontributors_urldeployments_urldescriptiondownloads_url
events_urlfork	forks_url	full_namegit_commits_urlgit_refs_urlgit_tags_url	hooks_urlhtml_urlidissue_comment_urlissue_events_url
issues_urlkeys_url
labels_urllanguages_url
merges_urlmilestones_urlnamenotifications_urlownerprivate	pulls_urlreleases_urlstargazers_urlstatuses_urlsubscribers_urlsubscription_urltags_url	teams_url	trees_url)2r+   _apiuritURITemplatearchive_urltassignees_urlt
blobs_urltbranches_urltcollaborators_urltcomments_urltcommits_urltcompare_urltcontents_urltr5   r6   r7   r8   r9   r:   r;   r<   git_commits_urltgit_refs_urltgit_tags_urltr@   rA   rB   issue_comment_urltissue_events_urltissues_urlt	keys_urltlabels_urltrH   rI   milestones_urltrK   notifications_urltr    	ShortUserrM   rN   
pulls_urltreleases_urltrQ   statuses_urltrS   rT   rU   rV   
trees_urlt)selfrepos     W/Users/admin/workspace/ai/Jarvis/env/lib/python3.13/site-packages/github3/repos/repo.py_update_attributes_Repository._update_attributes;   sM   #E{*49 ,,T--@A"..tO/DE**4+<=!--d>.BC"&"2"248K3L"M!--d>.BC ,,T--@A ,,T--@A!--d>.BC $%7 8#$56.!/2|,L	k*k* $ 0 06G1H I!--d>.BC!--d>.BCk*Z(t*"&"2"248K3L"M!%!1!1$7I2J!K++D,>?))$z*:;++D,>?!/2|,#//5E0FGL	"&"2"248K3L"M__T']D9
I**4+<=!--d>.BC"#34!--d>.BC#$56 $%7 8Z(k***4+<=    c                 (    SU R                    SU  S3$ )N<z []>)
class_namers   s    ru   _repr_Repository._reprj   s    4??#2dV2..rx   c                     U R                   $ N)r<   r}   s    ru   __str___Repository.__str__m   s    ~~rx   c                     U R                  U5        S nU(       a9  U R                  SU R                  S9nU R                  U R	                  X1S9S5      nU R                  [        R                  U5      $ )Nr   base_urldata   )_remove_none
_build_urlrX   _json_post_instance_or_nullr   ShortPullRequest)rs   r   jsonr+   s       ru   _create_pull_Repository._create_pullp   sb    $//'DII/>C::djjj8#>D%%e&<&<dCCrx   Nc                    U(       d  gU R                  S[        U5      U R                  S9nU(       a)  SU0nU R                  U[        R
                  " U5      S9nOU R                  U5      nU R                  USS5      $ )a  Add ``username`` as a collaborator to a repository.

:param username:
    (required), username of the user
:type username:
    str or :class:`~github3.users.User`
:param str permission:
    (optional), permission to grant the collaborator, valid on
    organization repositories only.
    Can be 'pull', 'triage', 'push', 'maintain', 'admin' or an
    organization-defined custom role name.
:returns:
    True if successful, False otherwise
:rtype:
Fcollaboratorsr   
permissionr   r     )r   strrX   _putjsonlibdumps_boolean)rs   usernamer   r+   r   resps         ru   add_collaborator_Repository.add_collaboratorx   sv    " ooS]TYY  
  *-D99Sw}}T':9;D99S>D}}T3,,rx   c                     SnUS;   a+  U R                  XU R                  S9nU R                  USSS9nU(       a/  U R                  USS5      (       a  [        R
                  " XB5        gg)	a  Get the tarball or zipball archive for this repo at ref.

See: http://developer.github.com/v3/repos/contents/#get-archive-link

:param str format:
    (required), accepted values: ('tarball', 'zipball')
:param path:
    (optional), path where the file should be saved
    to, default is the filename provided in the headers and will be
    written in the current directory.
    it can take a file-like object as well
:type path:
    str, file
:param str ref:
    (optional)
:returns:
    True if successful, False otherwise
:rtype:
    bool
N)tarballzipballr   T)allow_redirectsstream   r   F)r   rX   _getr   r!   stream_response_to_file)rs   formatpathrefr   r+   s         ru   archive_Repository.archive   se    * ++//&		/BC99S$t9DDDMM$S11))$5rx   c                     Sn[        U5      S:  aF  U R                  SS[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zReturn a single asset.

:param int id:
    (required), id of the asset
:returns:
    the asset
:rtype:
    :class:`~github3.repos.release.Asset`
Nr   releasesassetsr   r   )	intr   r   rX   r   r   r   r   Assetrs   rB   r   r+   s       ru   asset_Repository.asset   si     r7Q;//Hc"g		 " C ::diinc2D%%gmmT::rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )aS  Iterate over all assignees to which an issue may be assigned.

:param int number:
    (optional), number of assignees to return. Default:
    -1 returns all available assignees
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of users
:rtype:
    :class:`~github3.users.ShortUser`
	assigneesr   etagr   rX   _iterr   r    rn   rs   numberr   r+   s       ru   r   _Repository.assignees   s9     ookDIIo>zz#f+sEOO$zGGrx   c                     U R                  SSXR                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet the blob indicated by ``sha``.

:param str sha:
    (required), sha of the blob
:returns:
    the git blob
:rtype:
    :class:`~github3.git.Blob`
r   blobsr   r   )r   rX   r   r   r   r   Blobrs   shar+   r   s       ru   blob_Repository.blob   sK     ooeWcIIoFzz$))C.#.%%chh55rx   c                     SnU(       aR  U R                  SXR                  S9nU R                  U R                  U[        R
                  R                  S9S5      nU R                  [        R
                  U5      $ )zGet the branch ``name`` of this repository.

:param str name:
    (required), branch name
:returns:
    the branch
:rtype:
    :class:`~github3.repos.branch.Branch`
Nbranchesr   headersr   )r   rX   r   r   r   BranchPREVIEW_HEADERSr   )rs   rK   r   r+   s       ru   r   _Repository.branch   se     //*dYY/GC::		#v}}'D'D	EsD %%fmmT::rx   c           	          U R                  SU R                  S9nU(       a  SS0OSnU R                  [        U5      U[        R
                  UU[        R                  R                  S9$ )a  Iterate over the branches in this repository.

:param int number:
    (optional), number of branches to return. Default: -1 returns all
    branches
:param bool protected:
    (optional), True lists only protected branches.
    Default: False
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of branches
:rtype:
    :class:`~github3.repos.branch.Branch`
r   r   	protected1Nr   r   )r   rX   r   r   r   ShortBranchr   r   )rs   r   r   r   r+   paramss         ru   r   _Repository.branches   sd      ooj499o='0+s#dzzKMM11  
 	
rx   c                    Sn[        U5      S:  a\  U R                  S[        U5      U R                  S9nU R	                  U R                  U[        R                  R                  S9S5      nU R                  [        R                  U5      $ )zReturn a single check run.

.. versionadded:: 1.3.0

:param int id:
    (required), id of the check run
:returns:
    the check run
:rtype:
    :class:`~github3.checks.CheckRun`
Nr   
check-runsr   r   r   )
r   r   r   rX   r   r   r   CheckRunCUSTOM_HEADERSr   r   s       ru   	check_run_Repository.check_run  ss     r7Q;//,B$))/LC::		#v'E'E	FD %%foot<<rx   c                    Sn[        U5      S:  a\  U R                  S[        U5      U R                  S9nU R	                  U R                  U[        R                  R                  S9S5      nU R                  [        R                  U5      $ )zReturn a single check suite.

.. versionadded:: 1.3.0

:param int id:
    (required), id of the check suite
:returns:
    the check suite
:rtype:
    :class:`~github3.checks.CheckSuite`
Nr   check-suitesr   r   r   )
r   r   r   rX   r   r   r   
CheckSuiter   r   r   s       ru   check_suite_Repository.check_suite%  sw     r7Q;//.#b'DII/NC::		#v'8'8'G'G	H#D %%f&7&7>>rx   c                 v    U R                  SSU R                  S9nU R                  [        U5      U[        US9$ )a  Iterate over the code frequency per week.

.. versionadded:: 0.7

Returns a weekly aggregate of the number of additions and deletions
pushed to this repository.

.. note::

    All statistics methods may return a 202. On those occasions,
    you will not receive any objects. You should store your
    iterator and check the new ``last_status`` attribute. If it
    is a 202 you should wait before re-requesting.

:param int number:
    (optional), number of weeks to return. Default: -1
    returns all weeks
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of lists ``[seconds_from_epoch, additions, deletions]``
:rtype:
    list
r   code_frequencyr   r   )r   rX   r   r   listr   s       ru   r   _Repository.code_frequency9  s8    2 oog'7$))oLzz#f+sDtz<<rx   c                     U R                  SU R                  S9n1 SknX;  a  [        SR                  U5      5      eSU0nU R	                  [        U5      U[        R                  XcS9$ )a  Iterate over the collaborators of this repository.

:param str affiliation:
    (optional), affiliation of the collaborator to the repository.
    Default: "all" returns contributors with all affiliations
:param int number:
    (optional), number of collaborators to return.
    Default: -1 returns all comments
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of collaborators
:rtype:
    :class:`~github3.users.Collaborator`
r   r   >   alldirectoutsidezkInvalid affiliation value {!r} parameter passed, must be 'outside', 'direct', or 'all' (defaults to 'all').affiliationr   )r   rX   
ValueErrorr   r   r   r    Collaborator)rs   r   r   r   r+   affiliationsr   s          ru   r   _Repository.collaboratorsU  sw      ooo		oB3*L&%	   -zzKe00&  
 	
rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )aY  Iterate over comments on all commits in the repository.

: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 on commits
:rtype:
    :class:`~github3.repos.comment.RepoComment`
commentsr   r   )r   rX   r   r   r   RepoCommentr   s       ru   r   _Repository.commentss  s;     ooj499o=zz#f+sG,?,?dzKKrx   c                     U R                  SXR                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet a single (repo) commit.

See :meth:`git_commit` for the Git Data Commit.

:param str sha:
    (required), sha of the commit
:returns:
    the commit
:rtype:
    :class:`~github3.repos.commit.RepoCommit`
commitsr   r   )r   rX   r   r   r   r   
RepoCommitr   s       ru   r   _Repository.commit  sK     ooiyyoAzz$))C.#.%%f&7&7>>rx   c                 v    U R                  SSU R                  S9nU R                  [        U5      U[        US9$ )au  Iterate over last year of commit activity by week.

.. versionadded:: 0.7

See: http://developer.github.com/v3/repos/statistics/

.. note::

    All statistics methods may return a 202. On those occasions,
    you will not receive any objects. You should store your
    iterator and check the new ``last_status`` attribute. If it
    is a 202 you should wait before re-requesting.

:param int number:
    (optional), number of weeks to return. Default -1
    will return all of the weeks.
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of dictionaries
:rtype:
    dict
r   commit_activityr   r   )r   rX   r   r   dictr   s       ru   r   _Repository.commit_activity  s8    0 oog'8499oMzz#f+sDtz<<rx   c                     U R                  S[        U5      U R                  S9nU R                  U R	                  U5      S5      nU R                  [        R                  U5      $ )zGet a single commit comment.

:param int comment_id:
    (required), id of the comment used by GitHub
:returns:
    the comment on the commit
:rtype:
    :class:`~github3.repos.comment.RepoComment`
r   r   r   )r   r   rX   r   r   r   r   r   )rs   
comment_idr+   r   s       ru   commit_comment_Repository.commit_comment  sQ     ooj#j/DIIoNzz$))C.#.%%g&9&94@@rx   c	                    UUU[         R                  " U5      [         R                  " U5      US.n	U R                  U	5        U R                  SU R                  S9n
U R                  [        U5      U
[        R                  X5      $ )a!  Iterate over commits in this repository.

:param str sha:
    (optional), sha or branch to start listing commits from
:param str path:
    (optional), commits containing this path will be listed
:param str author:
    (optional), GitHub login, real name, or email to
    filter commits by (using commit author)
:param int number:
    (optional), number of commits to return. Default:
    -1 returns all commits
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:param since:
    (optional), Only commits after this date will be returned.
    This can be a ``datetime`` or an ``ISO8601`` formatted
    date string.
:type since:
    :class:`~datetime.datetime` or str
:param until:
    (optional), Only commits before this date will
    be returned. This can be a ``datetime`` or an ``ISO8601`` formatted
    date string.
:type until:
    :class:`~datetime.datetime` or str
:param int per_page:
    (optional), commits listing page size
:returns:
    generator of commits
:rtype:
    :class:`~github3.repos.commit.RepoCommit`
)r   r   authorsinceuntilper_pager   r   )	r!   timestamp_parameterr   r   rX   r   r   r   ShortCommit)rs   r   r   r   r   r   r   r   r   r   r+   s              ru   r   _Repository.commits  sy    Z ..u5..u5 
 	&!ooi$))o<zz#f+sF,>,>MMrx   c                     U R                  SUS-   U-   U R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zCompare two commits.

:param str base:
    (required), base for the comparison
:param str head:
    (required), compare this against base
:returns:
    the comparison of the commits
:rtype:
    :class:`~github3.repos.comparison.Comparison`
comparez...r   r   )r   rX   r   r   r   r   
Comparison)rs   baseheadr+   r   s        ru   compare_commits_Repository.compare_commits  s^     oote|d*TYY  
 zz$))C.#.%%j&;&;TBBrx   c                     U R                  SSU R                  S9nU R                  [        U5      U[        R
                  US9$ )a  Iterate over the contributors list.

.. versionadded:: 0.7

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

.. note::

    All statistics methods may return a 202. On those occasions,
    you will not receive any objects. You should store your
    iterator and check the new ``last_status`` attribute. If it
    is a 202 you should wait before re-requesting.

:param int number:
    (optional), number of weeks to return. Default -1
    will return all of the weeks.
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of contributor statistics for each contributor
:rtype:
    :class:`~github3.repos.stats.ContributorStats`
r   contributorsr   r   )r   rX   r   r   r   ContributorStatsr   s       ru   contributor_statistics"_Repository.contributor_statistics  s=    0 oog~		oJzz#f+sE,B,BzNNrx   c                     U R                  SU R                  S9n0 nU(       a  SS0nU R                  [        U5      U[        R
                  XS5      $ )a  Iterate over the contributors to this repository.

:param bool anon:
    (optional), True lists anonymous contributors as well
:param int number:
    (optional), number of contributors to return.
    Default: -1 returns all contributors
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of contributor users
:rtype:
    :class:`~github3.users.Contributor`
r  r   anontrue)r   rX   r   r   r    Contributor)rs   r  r   r   r+   r   s         ru   r  _Repository.contributors"  sK     oontyyoAf%Fzz#f+sE,=,=vLLrx   c                     0 nUS;   a  UR                  US9  O[        S5      eU R                  SSU R                  S9nU R	                  U R                  X2S9S5      nU R                  [        R                  U5      $ )	a  Get the total number of repository views and breakdown per day or
week for the last 14 days.

.. versionadded:: 1.4.0

See also: https://developer.github.com/v3/repos/traffic/

:param str per:
    (optional), ('day', 'week'), views reporting period. Default 'day'
    will return views per day for the last 14 days.
:returns:
    views data
:rtype:
    :class:`~github3.repos.traffic.ViewsStats`
:raises:
    ValueError if per is not a valid choice
dayweekperper must be 'day' or 'week'r   viewsr   r   r   )	updater   r   rX   r   r   r   r   
ViewsStatsrs   r  r   r+   r   s        ru   r  _Repository.views7  sw    $ /!MMcM":;;ooi499oEzz$))C)7=%%g&8&8$??rx   c                     0 nUS;   a  UR                  US9  O[        S5      eU R                  SSU R                  S9nU R	                  U R                  X2S9S5      nU R                  [        R                  U5      $ )	a  Get the total number of repository clones and breakdown per day or
week for the last 14 days.

.. versionadded:: 1.4.0

See also: https://developer.github.com/v3/repos/traffic/

:param str per:
    (optional), ('day', 'week'), clones reporting period. Default 'day'
    will return clones per day for the last 14 days.
:returns:
    clones data
:rtype:
    :class:`~github3.repos.traffic.ClonesStats`
:raises:
    ValueError if per is not a valid choice
r  r  r  r   clonesr   r  r   )	r  r   r   rX   r   r   r   r   ClonesStatsr  s        ru   r"  _Repository.clonesR  sw    $ /!MMcM":;;ooiDIIoFzz$))C)7=%%g&9&94@@rx   c                 D   SnU(       ax  U(       aq  UUUUUUUUU	U
S.
nU R                  U5        U R                  SU R                  S9nU R                  U R	                  U[
        R                  R                  US9S5      nU R                  [
        R                  U5      $ )aQ  Create a check run object on a commit

.. versionadded:: 1.3.0

:param str name:
    (required), The name of the check
:param str head_sha:
    (required), The SHA of the commit
:param str details_url:
    (optional), The URL of the integrator's site that has the full
    details of the check
:param str external_id:
    (optional), A reference for the run on the integrator's system
:param str started_at:
    (optional), ISO 8601 time format: YYYY-MM-DDTHH:MM:SSZ
:param str status:
    (optional), ('queued', 'in_progress', 'completed')
:param str conclusion:
    (optional), Required if you provide 'completed_at', or a
    'status' of 'completed'. The final conclusion of the check.
    ('success', 'failure', 'neutral', 'cancelled', 'timed_out',
    'action_required')
:param str completed_at:
    (optional), Required if you provide 'conclusion'. ISO 8601 time
    format: YYYY-MM-DDTHH:MM:SSZ
:param dict output:
    (optional), key-value pairs representing the output. Format:
    ``{'title': 'string', 'summary': 'text, can be markdown', 'text':
    'text, can be markdown', 'annotations': [{}], 'images': [{}]}``
:param list actions:
    (optional), list of action objects. Format is:
    ``[{'label': 'text', 'description', 'text', 'identifier', 'text'},
    ...]``
:returns:
    the created check run
:rtype:
    :class:`~github3.checks.CheckRun`
N)
rK   head_shadetails_urlexternal_id
started_atr   
conclusioncompleted_atoutputactionsr   r   r   r   r   )	r   r   rX   r   r   r   r   r   r   )rs   rK   r&  r'  r(  r)  r   r*  r+  r,  r-  r   r   r+   s                 ru   create_check_run_Repository.create_check_runm  s    h H$**( ( , "D d#//,/CC::

!?!?d   	D %%foot<<rx   c                 "   SnU(       ag  SU0nU R                  U5        U R                  SU R                  S9nU R                  U R	                  XC[
        R                  R                  S9S5      nU R                  [
        R                  U5      $ )zCreate a check suite object on a commit

.. versionadded:: 1.3.0

:param str head_sha:
    The sha of the head commit.
:returns:
    the created check suite
:rtype:
    :class:`~github3.checks.CheckSuite`
Nr&  r   r   r   r   r   )	r   r   rX   r   r   r   r   r   r   )rs   r&  r   r   r+   s        ru   create_check_suite_Repository.create_check_suite  s     )Dd#//.499/EC::

F,=,=,L,L   	D %%f&7&7>>rx   c                     SnUS;   aV  U R                  SSU R                  S9nXS.nU R                  U R                  XES9S5      nU(       a  UR	                  S	5      nU$ )
zCreate a blob with ``content``.

:param str content:
    (required), content of the blob
:param str encoding:
    (required), ('base64', 'utf-8')
:returns:
    string of the SHA returned
:returns:
    str
 )base64utf-8r   r   r   )contentencodingr   r   r   )r   rX   r   r   get)rs   r9  r:  r   r+   r   r   s          ru   create_blob_Repository.create_blob  sb     **//%499/EC&=D::djjj8#>Dhhuo
rx   c                 .    SU-  nU R                  X25      $ )aF  Create a branch git reference.

This is a shortcut for calling
:meth:`github3.repos.repo.Repository.create_ref`.

:param str branch:
    (required), the branch to create
:param str sha:
    the commit to base the branch from
:returns:
    a reference object representing the branch
:rtype:
    :class:`~github3.git.Reference`
zrefs/heads/%s)
create_ref)rs   rK   r   r   s       ru   create_branch_ref_Repository.create_branch_ref  s      $s((rx   c                 4   SnU(       ap  U(       ai  U(       ab  [        U5      S:  aS  UUUUS.nU R                  U5        U R                  SUSU R                  S9nU R	                  U R                  XS9S5      nU R                  [        R                  U5      $ )	a  Create a comment on a commit.

:param str body:
    (required), body of the message
:param str sha:
    (required), commit id
:param str path:
    (optional), relative path of the file to comment on
:param str position:
    (optional), line index in the diff to comment on
:param int line:
    (optional), line number of the file to comment on, default: 1
:returns:
    the created comment
:rtype:
    :class:`~github3.repos.comment.RepoComment`
Nr   )bodyliner   positionr   r   r   r   r   )	r   r   r   rX   r   r   r   r   r   )	rs   rC  r   r   rE  rD  r   r   r+   s	            ru   create_comment_Repository.create_comment  s    & CTc$i!m$	D d#//3
TYY " C ::djjj8#>D%%g&9&94@@rx   c                 2   SnU(       ao  U(       ah  [        U[        5      (       aS  U R                  SSU R                  S9nUUUUUS.nU R	                  U5        U R                  U R                  XxS9S5      nU R                  [        R                  U5      $ )aN  Create a commit on this repository.

:param str message:
    (required), commit message
:param str tree:
    (required), SHA of the tree object this commit points to
:param list parents:
    (required), SHAs of the commits that were parents
    of this commit. If empty, the commit will be written as the root
    commit.  Even if there is only one parent, this should be an
    array.
:param dict author:
    (optional), if omitted, GitHub will
    use the authenticated user's credentials and the current
    time. Format: {'name': 'Committer Name', 'email':
    'name@example.com', 'date': 'YYYY-MM-DDTHH:MM:SS+HH:00'}
:param dict committer:
    (optional), if ommitted, GitHub will use the
    author parameters. Should be the same format as the author
    parameter.
:returns:
    the created commit
:rtype:
    :class:`~github3.git.Commit`
Nr   r   r   )messagetreeparentsr   	committerr   r   )

isinstancer   r   rX   r   r   r   r   r   Commit)	rs   rI  rJ  rK  r   rL  r   r+   r   s	            ru   create_commit_Repository.create_commit  s    : t
7D 9 9//%TYY/GC"" &D d#::djjj8#>D%%cjj$77rx   c                    SnU(       aX  Uc  / nU R                  SU R                  S9nUUUUUUS.n	U R                  U	5        U R                  U R	                  XS9S5      nU R                  [        R                  U5      $ )aG  Create a deployment.

:param str ref:
    (required), The ref to deploy. This can be a branch, tag, or sha.
:param list required_contexts:
    Optional array of status contexts
    verified against commit status checks. To bypass checking
    entirely pass an empty array. Default: []
:param str payload:
    Optional JSON payload with extra information about
    the deployment. Default: ""
:param bool auto_merge:
    Optional parameter to merge the default branch
    into the requested deployment branch if necessary. Default: False
:param str description:
    Optional short description. Default: ""
:param str environment:
    Optional name for the target deployment
    environment (e.g., production, staging, qa). Default: "production"
:returns:
    the created deployment
:rtype:
    :class:`~github3.repos.deployment.Deployment`
Ndeploymentsr   )r   required_contextspayload
auto_merger7   environmentr   r   )r   rX   r   r   r   r   r	   
Deployment)
rs   r   rS  rT  rU  r7   rV  r   r+   r   s
             ru   create_deployment_Repository.create_deploymentJ  s    D  ($&!//-$))/DC%6"(**D d#::djjj8#>D%%j&;&;TBBrx   c                    U(       a   [        U[        5      (       d  [        S5      eSnU(       Ga  U(       Ga	  U(       Ga  U R                  SXR                  S9n[
        R                  " U5      R                  S5      nUUU[        R                  " U5      [        R                  " U5      S.n	U R                  U	5        U R                  U R                  U[        R                  " U	5      S9S5      nU(       aF  S	U;   a@  S
U;   a:  [        R                  " US	   U 5      US	'   [         R"                  " US
   U 5      US
'   U$ )aw  Create a file in this repository.

See also: http://developer.github.com/v3/repos/contents/#create-a-file

:param str path:
    (required), path of the file in the repository
:param str message:
    (required), commit message
:param bytes content:
    (required), the actual data in the file
:param str branch:
    (optional), branch to create the commit on.
    Defaults to the default branch of the repository
:param dict committer:
    (optional), if no information is given the
    authenticated user's information will be used. You must specify
    both a name and email.
:param dict author:
    (optional), if omitted this will be filled in with
    committer information. If passed, you must specify both a name and
    email.
:returns:
    dictionary of contents and commit for created file
:rtype:
    :class:`~github3.repos.contents.Contents`,
    :class:`~github3.git.Commit`
zcontent must be a bytes objectNr   r   r8  )rI  r9  r   rL  r   r   r   r9  r   )rM  bytesr   r   rX   r7  	b64encodedecoder   validate_commmitterr   r   r   r   r   Contentsr   rN  )
rs   r   rI  r9  r   rL  r   r   r+   r   s
             ru   create_file_Repository.create_file}  s   > :gu550  G//*dYY/GC&&w/66w?G"" %99)D"66v>D d#::dii'--2EiFLD	T)h$.>"*"3"3DOT"JY!$DND!AXrx   c                     U R                  SU R                  S9nU(       a  U R                  USU0S9nOU R                  U5      nU R                  US5      nU R	                  [
        U5      $ )zCreate a fork of this repository.

:param str organization:
    (required), login for organization to create the fork under
:returns:
    the fork of this repository
:rtype:
    :class:`~github3.repos.repo.Repository`
forksr   organizationr      )r   rX   r   r   r   
Repository)rs   rd  r+   r   r   s        ru   create_fork_Repository.create_fork  sd     oog		o:::c(F:GD::c?Dzz$$%%j$77rx   pushTc                 
   SnU(       a\  U(       aU  [        U[        5      (       a@  U R                  SU R                  S9nUUUUS.nU R	                  U R                  XgS9S5      nU(       a  [        R                  " XP5      $ S$ )a  Create a hook on this repository.

:param str name:
    (required), name of the hook
:param dict config:
    (required), key-value pairs which act as settings for this hook
:param list events:
    (optional), events the hook is triggered for
:param bool active:
    (optional), whether the hook is actually triggered
:returns:
    the created hook
:rtype:
    :class:`~github3.repos.hook.Hook`
Nhooksr   )rK   configr   activer   r   )rM  r   r   rX   r   r   r
   Hook)rs   rK   rl  r   rm  r   r+   r   s           ru   create_hook_Repository.create_hook  sv    " Fz&$77//'DII/>C   	D ::djjj8#>D(,tyy$6$6rx   c                     UUUUUUS.nU R                  U5        SnU(       a9  U R                  SU R                  S9n	U R                  U R	                  XS9S5      nU R                  [        R                  U5      $ )a  Create an issue on this repository.

:param str title:
    (required), title of the issue
:param str body:
    (optional), body of the issue
:param str assignee:
    (optional), login of the user to assign the issue to
:param int milestone:
    (optional), id number of the milestone to
    attribute this issue to (e.g. ``m`` is a
    :class:`~github3.issues.milestone.Milestone` object, ``m.number``
    is what you pass here.)
:param labels:
    (optional), labels to apply to this issue
:type labels:
    [str]
:param assignees:
    (optional), login of the users to assign the issue to
:type assignees:
    [str]
:returns:
    the created issue
:rtype:
    :class:`~github3.issues.issue.ShortIssue`
)titlerC  assigneer$   labelsr   Nr   r   r   r   )r   r   rX   r   r   r   r   
ShortIssue)
rs   rr  rC  rs  r$   rt  r   issuer   r+   s
             ru   create_issue_Repository.create_issue  s    J  ""
 	% //(TYY/?C::djjj93?D%%f&7&7>>rx   c                     SnU(       aE  U(       a>  XUS.nU R                  SU R                  S9nU R                  U R                  XeS9S5      nU R	                  [
        R                  U5      $ )a  Create a deploy key.

:param str title:
    (required), title of key
:param str key:
    (required), key text
:param bool read_only:
    (optional), restrict key access to read-only, default is False
:returns:
    the created key
:rtype:
    :class:`~github3.users.Key`
N)rr  key	read_onlykeysr   r   r   )r   rX   r   r   r   r    Key)rs   rr  rz  r{  r   r   r+   s          ru   
create_key_Repository.create_key  s`     S"YGD//&499/=C::djjj8#>D%%eii66rx   c                 >   SnU(       au  U(       an  XR                  S5      S.nUb  X5S'   U R                  SU R                  S9nU R                  Xe[        R
                  R                  S9nU R                  US5      nU R                  [        R
                  U5      $ )	a  Create a label for this repository.

:param str name:
    (required), name to give to the label
:param str color:
    (required), value of the color to assign to the
    label, e.g., '#fafafa' or 'fafafa' (the latter is what is sent)
:param str description:
    (optional), description to give to the label
:returns:
    the created label
:rtype:
    :class:`~github3.issues.label.Label`
N#)rK   colorr7   rt  r   r2  r   )	stripr   rX   r   r#   LabelSYMMETRA_PREVIEW_HEADERSr   r   )rs   rK   r  r7   r   r   r+   r   s           ru   create_label_Repository.create_label/  s      E ;;s+;<D&&1]#//(TYY/?C::(L(L  D ::dC(D%%ekk488rx   c                    U R                  SU R                  S9nUS;  a  SnUUUUS.nU R                  U5        SnU(       a  U R                  U R	                  XVS9S5      nU R                  [        R                  U5      $ )a  Create a milestone for this repository.

:param str title:
    (required), title of the milestone
:param str state:
    (optional), state of the milestone, accepted
    values: ('open', 'closed'), default: 'open'
:param str description:
    (optional), description of the milestone
:param str due_on:
    (optional), ISO 8601 formatted due date
:returns:
    the created milestone
:rtype:
    :class:`~github3.issues.milestone.Milestone`

milestonesr   )openclosedN)rr  stater7   due_onr   r   )r   rX   r   r   r   r   r$   	Milestone)rs   rr  r  r7   r  r+   r   r   s           ru   create_milestone_Repository.create_milestoneK  s    ( oolTYYo?**E&	
 	$::djjj8#>D%%i&9&94@@rx   c                 "   U R                  SU R                  S9nXS.nU R                  U5        SnU(       a8  U R                  U R	                  X4[
        R                  R                  S9S5      nU R                  [
        R                  U5      $ )zCreate a project for this repository.

:param str name:
    (required), name of the project
:param str body:
    (optional), body of the project
:returns:
    the created project
:rtype:
    :class:`~github3.projects.Project`
r   r   )rK   rC  Nr2  r   )	r   rX   r   r   r   r   Projectr   r   )rs   rK   rC  r+   r   r   s         ru   create_project_Repository.create_projectn  s     ooj499o=+$::

H,<,<,K,K   	D %%h&6&6==rx   c                 <    XX#S.nUb  XVS'   U R                  U5      $ )a  Create a pull request of ``head`` onto ``base`` branch in this repo.

:param str title:
    (required)
:param str base:
    (required), e.g., 'master'
:param str head:
    (required), e.g., 'username:branch'
:param str body:
    (optional), markdown formatted description
:param bool maintainer_can_modify:
    (optional), Indicates whether a maintainer is allowed to modify the
    pull request or not.
:returns:
    the created pull request
:rtype:
    :class:`~github3.pulls.ShortPullRequest`
)rr  rC  r  r  maintainer_can_modify)r   )rs   rr  r  r  rC  r  r   s          ru   create_pull_Repository.create_pull  s.    , dI ,,A()  &&rx   c                 N    [        U5      S:  a  XUS.nU R                  U5      $ g)a"  Create a pull request from issue #``issue``.

:param int issue:
    (required), issue number
:param str base:
    (required), e.g., 'master'
:param str head:
    (required), e.g., 'username:branch'
:returns:
    the created pull request
:rtype:
    :class:`~github3.pulls.ShortPullRequest`
r   )rv  r  r  N)r   r   )rs   rv  r  r  r   s        ru   create_pull_from_issue"_Repository.create_pull_from_issue  s-     u:>"$?D$$T**rx   c                 N   [        USU5      nSnU(       ap  UR                  S5      (       aZ  UR                  S5      S:  aE  U(       a>  XS.nU R                  SSU R                  S9nU R                  U R                  XTS	9S
5      nU R                  [        R                  U5      $ )a  Create a reference in this repository.

:param str ref:
    (required), fully qualified name of the reference,
    e.g. ``refs/heads/master``. If it doesn't start with ``refs`` and
    contain at least two slashes, GitHub's API will reject it.
:param str sha:
    (required), SHA1 value to set the reference to
:returns:
    the created ref
:rtype:
    :class:`~github3.git.Reference`
r   Nrefs/r   )r   r   r   r   r   r   )
getattr
startswithcountr   rX   r   r   r   r   	Reference)rs   r   r   r   r   r+   s         ru   r?  _Repository.create_ref  s     c5#&3>>&))ciin.Ac+D//%$))/DC::djjj8#>D%%cmmT::rx   c                     [        U5      UUUUUS.nU R                  U5        U R                  SU R                  S9nU R	                  U R                  XS9S5      n	U R                  [        R                  U	5      $ )a,  Create a release for this repository.

:param str tag_name:
    (required), name to give to the tag
:param str target_commitish:
    (optional), vague concept of a target, either a SHA or a branch
    name.
:param str name:
    (optional), name of the release
:param str body:
    (optional), description of the release
:param bool draft:
    (optional), whether this release is a draft or not
:param bool prerelease:
    (optional), whether this is a prerelease or not
:returns:
    the created release
:rtype:
    :class:`~github3.repos.release.Release`
)tag_nametarget_commitishrK   rC  draft
prereleaser   r   r   r   )	r   r   r   rX   r   r   r   r   Release)
rs   r  r  rK   rC  r  r  r   r+   r   s
             ru   create_release_Repository.create_release  sy    > H 0$
 	$ooj499o=zz$**S*4c:%%goot<<rx   c                    SnU(       aX  U(       aQ  UUUUS.nU R                  SXR                  S9nU R                  U5        U R                  U R	                  XS9S5      nU R                  [        R                  U5      $ )aL  Create a status object on a commit.

:param str sha:
    (required), SHA of the commit to create the status on
:param str state:
    (required), state of the test; only the following
    are accepted: 'pending', 'success', 'error', 'failure'
:param str target_url:
    (optional), URL to associate with this status.
:param str description:
    (optional), short description of the status
:param str context:
    (optional), A string label to differentiate this
    status from the status of other systems
:returns:
    the created status
:rtype:
    :class:`~github3.repos.status.Status`
N)r  
target_urlr7   contextstatusesr   r   r   )r   rX   r   r   r   r   r   Status)	rs   r   r  r  r7   r  r   r   r+   s	            ru   create_status_Repository.create_status  sy    . 5(*"	D //*cII/FCd#::djjj8#>D%%fmmT::rx   c                    U(       a#  U(       a  U(       a  U R                  SU-   U5      $ SnU(       a  U(       a  U(       a  U(       a|  [        U5      S:  am  UUUUUS.nU R                  SSU R                  S9n	U R	                  U R                  XS9S	5      nU(       a$  U R                  SU-   UR                  S
5      5        U R                  [        R                  U5      $ )aL  Create a tag in this repository.

By default, this method creates an annotated tag. If you wish to
create a lightweight tag instead, pass ``lightweight=True``.

If you are creating an annotated tag, this method makes **2 calls** to
the API:

1. Creates the tag object
2. Creates the reference for the tag

This behaviour is required by the GitHub API.

:param str tag:
    (required), name of the tag
:param str message:
    (required), tag message
:param str sha:
    (required), SHA of the git object this is tagging
:param str obj_type:
    (required), type of object being tagged, e.g., 'commit', 'tree',
    'blob'
:param dict tagger:
    (required), containing the name, email of the
    tagger and optionally the date it was tagged
:param bool lightweight:
    (optional), if False, create an annotated
    tag, otherwise create a lightweight tag (a Reference).
:returns:
    if creating a lightweight tag, this will return a
    :class:`~github3.git.Reference`, otherwise it will return a
    :class:`~github3.git.Tag`
:rtype:
    :class:`~github3.git.Tag` or :class:`~github3.git.Reference`
z
refs/tags/Nr   )r   rI  objecttypetaggerr   tagsr   r   r   r   )
r?  lenr   rX   r   r   r;  r   r   Tag)
rs   r   rI  r   obj_typer  lightweightr   r   r+   s
             ru   
create_tag_Repository.create_tag  s    N 33??<##5s;;7sxCK14D"  D //%$))/DC::djjj8#>Ds 2DHHUOD%%cggt44rx   c                    SnU(       a^  [        U[        5      (       aI  SU0nU(       a  X$S'   U R                  SSU R                  S9nU R	                  U R                  XTS9S5      nU R                  [        R                  U5      $ )	aj  Create a tree on this repository.

:param list tree:
    (required), specifies the tree structure.
    Format: [{'path': 'path/file', 'mode':
    'filemode', 'type': 'blob or tree', 'sha': '44bfc6d...'}]
:param str base_tree:
    (optional), SHA1 of the tree you want to update with new data
:returns:
    the created tree
:rtype:
    :class:`~github3.git.Tree`
NrJ  	base_treer   treesr   r   r   )	rM  r   r   rX   r   r   r   r   Tree)rs   rJ  r  r   r   r+   s         ru   create_tree_Repository.create_treeX  sv     JtT**D>D$-[!//%499/EC::djjj8#>D%%chh55rx   c                 Z    U R                  U R                  U R                  5      SS5      $ )z\Delete this repository.

:returns:
    True if successful, False otherwise
:rtype:
    bool
   r   )r   _deleterX   r}   s    ru   delete_Repository.deletep  s$     }}T\\$))4c3??rx   c                     [        U5      S::  a  gU R                  S[        U5      U R                  S9nU R	                  U R                  U5      SS5      $ )zDelete the key with the specified id from your deploy keys list.

:returns:
    True if successful, False otherwise
:rtype:
    bool
r   Fr|  r   r  r   )r   r   r   rX   r   r  )rs   key_idr+   s      ru   
delete_key_Repository.delete_key{  sK     v;!oofc&kDIIoF}}T\\#.S99rx   c                 z    U R                  SU R                  S9nU R                  U R                  U5      SS5      $ )zwDelete the user's subscription to this repository.

:returns:
    True if successful, False otherwise
:rtype:
    bool
subscriptionr   r  r   )r   rX   r   r  )rs   r+   s     ru   delete_subscription_Repository.delete_subscription  s6     oontyyoA}}T\\#.S99rx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zRetrieve the deployment identified by ``id``.

:param int id:
    (required), id for deployments.
:returns:
    the deployment
:rtype:
    :class:`~github3.repos.deployment.Deployment`
Nr   rR  r   r   )	r   r   r   rX   r   r   r   r	   rW  rs   rB   r   r+   s       ru   r	   _Repository.deployment  sa     r7Q;//-R499/MC::diinc2D%%j&;&;TBBrx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9nU$ )aY  Iterate over deployments for this repository.

:param int number:
    (optional), number of deployments to return.
    Default: -1, returns all available deployments
:param str etag:
    (optional), ETag from a previous request for all deployments
:returns:
    generator of deployments
:rtype:
    :class:`~github3.repos.deployment.Deployment`
rR  r   r   )r   rX   r   r   r	   rW  )rs   r   r   r+   is        ru   rR  _Repository.deployments  s?     oomdiio@JJs6{C)>)>TJJrx   c                 :  ^  T R                  SUT R                  S9nT R                  T R                  USU0S9S5      =(       d    / n[	        U[
        5      (       a  [        S U 5       5      (       d  [        R                  " SU5      eU" U 4S jU 5       5      $ )	a  Get the contents of each file in ``directory_path``.

If the path provided is actually a directory, you will receive a
list back of the form::

    [('filename.md', Contents(...)),
     ('github.py', Contents(...)),
     # ...
     ('fiz.py', Contents(...))]

You can either then transform it into a dictionary::

    contents = dict(repo.directory_contents('path/to/dir/'))

Or you can use the ``return_as`` parameter to have it return a
dictionary for you::

    contents = repo.directory_contents('path/to/dir/', return_as=dict)

:param str path:
    (required), path to file, e.g.  github3/repos/repo.py
:param str ref:
    (optional), the string name of a commit/branch/tag.
    Default: master
:param return_as:
    (optional), how to return the directory's contents.
    Default: :class:`list`
:returns:
    list of tuples of the filename and the Contents returned
:rtype:
    [(str, :class:`~github3.repos.contents.Contents`)]
:raises github3.exceptions.UnprocessableResponseBody:
    When the requested directory is not actually a directory
r   r   r   r  r   c              3   B   #    U  H  n[        U[        5      v   M     g 7fr   )rM  r   ).0js     ru   	<genexpr>1_Repository.directory_contents.<locals>.<genexpr>  s     *M1:a+>+>s   z^The contents returned do not appear to be a directory. You may have requested a non-directory.c              3   r   >#    U  H,  oR                  S 5      [        R                  " UT5      4v   M.     g7f)rK   N)r;  r   r_  )r  r  rs   s     ru   r  r    s,      
AEAUU6]H--a67s   47)	r   rX   r   r   rM  r   r   r   UnprocessableResponseBody)rs   directory_pathr   	return_asr+   r   s   `     ru   directory_contents_Repository.directory_contents  s    F ooj.499oMzz$))C)=sCIrtT""s*M*M'M'M66: 
  
AE
 
 	
rx   c                     UUUUUUUUU	UU
UUUS.nU R                  U5        SnU(       aP  U R                  U R                  U R                  [        R
                  " U5      S9S5      nU R                  U5        gg)a	  Edit this repository.

:param str name:
    (required), name of the repository
:param str description:
    (optional), If not ``None``, change the
    description for this repository. API default: ``None`` - leave
    value unchanged.
:param str homepage:
    (optional), If not ``None``, change the homepage
    for this repository. API default: ``None`` - leave value unchanged.
:param bool private:
    (optional), If ``True``, make the repository
    private. If ``False``, make the repository public. API default:
    ``None`` - leave value unchanged.
:param bool has_issues:
    (optional), If ``True``, enable issues for
    this repository. If ``False``, disable issues for this repository.
    API default: ``None`` - leave value unchanged.
:param bool has_wiki:
    (optional), If ``True``, enable the wiki for
    this repository. If ``False``, disable the wiki for this
    repository. API default: ``None`` - leave value unchanged.
:param bool has_downloads:
    (optional), If ``True``, enable downloads
    for this repository. If ``False``, disable downloads for this
    repository. API default: ``None`` - leave value unchanged.
:param str default_branch:
    (optional), If not ``None``, change the
    default branch for this repository. API default: ``None`` - leave
    value unchanged.
:param bool archived:
    (optional), If not ``None``, toggle the archived
    attribute on the repository to control whether it is archived or
    not.
:param bool allow_rebase_merge:
    (optional), If not ``None``, change whether the merge strategy
    that allows adding all commits from the head branch onto the base
    branch individually is enabled for this repository.  API default:
    ``None`` - leave value unchanged.
:param bool allow_squash_merge:
    (optional), If not ``None``, change whether combining all commits
    from the head branch into a single commit in the base branch is
    allowed. API default: ``None`` - leave value unchanged.
:param bool allow_merge_commit:
    (optional), If not ``None``, change whether adding all commits
    from the head branch to the base branch with a merge commit is
    allowed. API default: ``None`` - leave value unchanged.
:param bool has_projects:
    (optional), If ``True``, enable projects for this repository.
    If ``False``, disable projects projects for this repository.
    API default: ``None`` - leave value unchanged.
:returns:
    True if successful, False otherwise
:rtype:
    bool
)rK   r7   homepagerN   
has_issueshas_wikihas_downloadsdefault_brancharchivedr  allow_merge_commitallow_squash_mergeallow_rebase_mergehas_projectsNr   r   TF)r   r   _patchrX   r   r   rv   )rs   rK   r7   r  rN   r  r  r  r  r  r  r  r  r  editr   s                   ru   r  _Repository.edit  s    V & $ *, ,"4"4"4(
  	$::DIIGMM$,?@#D ##D)rx   c                     U R                  SSU R                  S9nSS0nU R                  U R                  UU[        R
                  " SXS./05      S9S	S
S9nU(       a  UR                  S5      (       a  US	 U$ )a  Change preferences for automatic creation of check suites.

.. versionadded:: 1.3.0

Enable/disable the automatic flow when creating check suites.
By default, the check suite is automatically created each time code
is pushed. When the automatic creation is disable they can be created
manually.

:param int app_id:
    (required), the id of the GitHub App
:param bool enabled:
    (optional), enable automatic creation of check suites
    Default: True
:returns:
    the check suite settings for this repository
:rtype:
    dict
r   preferencesr   r(   z+application/vnd.github.antiope-preview+jsonauto_trigger_checks)app_idsettingr.  r   F)include_cache_info
repository)r   rX   r   r  r   r   r;  )rs   r  enabledr+   r   r   s         ru   r  _Repository.auto_trigger_checksK  s    * ooMDII  
 JKzzKK]]-'-B0  
 $  
 DHH\**\"rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )a9  Iterate over events on this repository.

:param int number:
    (optional), number of events to return. Default: -1
    returns all available events
:param str etag:
    (optional), ETag from a previous request to the same
    endpoint
:returns:
    generator of events
:rtype:
    :class:`~github3.events.Event`
r   r   r   )r   rX   r   r   r   Eventr   s       ru   r   _Repository.eventsw  s9     ooho;zz#f+sFLLtzDDrx   c                     U R                  SXR                  S9nU R                  U R                  USU0S9S5      nU R	                  [
        R                  U5      $ )aD  Get the contents of the file pointed to by ``path``.

:param str path:
    (required), path to file, e.g.  github3/repos/repo.py
:param str ref:
    (optional), the string name of a commit/branch/tag.
    Default: master
:returns:
    the contents of the file requested
:rtype:
    :class:`~github3.repos.contents.Contents`
r   r   r   r  r   r   rX   r   r   r   r   r_  )rs   r   r   r+   r   s        ru   file_contents_Repository.file_contents  sT     ooj$oCzz$))C)=sC%%h&7&7>>rx   c                     U R                  SU R                  S9n0 nUS;   a  SU0nU R                  [        U5      U[        XS5      $ )a  Iterate over forks of this repository.

:param str sort:
    (optional), accepted values:
    ('newest', 'oldest', 'stargazers'), API default: 'newest'
:param int number:
    (optional), number of forks to return. Default: -1
    returns all forks
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of forks of this repository
:rtype:
    :class:`~github3.repos.repo.ShortRepository`
rc  r   )newestoldest
stargazerssort)r   rX   r   r   ShortRepository)rs   r  r   r   r+   r   s         ru   rc  _Repository.forks  sJ      oog		o:55d^Fzz#f+sOVJJrx   c                     0 nU(       a<  U R                  SSXR                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet a single (git) commit.

:param str sha:
    (required), sha of the commit
:returns:
    the single commit data from git
:rtype:
    :class:`~github3.git.Commit`
r   r   r   r   )r   rX   r   r   r   r   rN  rs   r   r   r+   s       ru   
git_commit_Repository.git_commit  sS     //%C))/LC::diinc2D%%cjj$77rx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zGet a single hook.

:param int hook_id:
    (required), id of the hook
:returns:
    the hook
:rtype:
    :class:`~github3.repos.hook.Hook`
Nr   rk  r   r   )	r   r   r   rX   r   r   r   r
   rn  )rs   hook_idr   r+   s       ru   r
   _Repository.hook  s`     w<!//'3w<$))/LC::diinc2D%%dii66rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )a4  Iterate over hooks registered on this repository.

:param int number:
    (optional), number of hoks to return. Default: -1
    returns all hooks
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of hooks
:rtype:
    :class:`~github3.repos.hook.Hook`
rk  r   r   )r   rX   r   r   r
   rn  r   s       ru   rk  _Repository.hooks  s9     oog		o:zz#f+sDIIDzAArx   c           	          U R                  SU R                  S9nU R                  U R                  U[        R
                  " SS05      S9S5      nU R                  [        R                  U5      $ )zIgnore notifications from this repository for the user.

.. versionadded:: 1.0

This replaces ``Repository#set_subscription``.

:returns:
    the new repository subscription
:rtype:
    :class:~github3.notifications.RepositorySubscription`
r  r   ignoredTr   r   	r   rX   r   r   r   r   r   r   RepositorySubscriptionrs   r+   r   s      ru   ignore_Repository.ignore  sh     oontyyoAzzIIcy$.? @IA3
 %%00$
 	
rx   c                     U R                  SXR                  S9nU R                  U[        R                  R
                  S9nU R                  US5      nU R                  [        R                  U5      $ )zRetrieve imported issue specified by imported issue id.

:param int imported_issue_id:
    (required) id of imported issue
:returns:
    the imported issue
:rtype:
    :class:`~github3.repos.issue_import.ImportedIssue`
import/issuesr   r   r   )r   rX   r   r   ImportedIssueIMPORT_CUSTOM_HEADERSr   r   )rs   imported_issue_idr+   r   r   s        ru   imported_issue_Repository.imported_issue  sr     oo.  
 yy33II  
 zz$$%%l&@&@$GGrx   c           	         S[         R                  " U5      0nU R                  U5        U R                  SU R                  S9nU R                  [        U5      U[        R                  UU[        R                  R                  S9$ )a  Retrieve the collection of imported issues via the API.

See also: https://gist.github.com/jonmagic/5282384165e0f86ef105

:param int number:
    (optional), number of imported issues to return.
    Default: -1 returns all branches
:param since:
    (optional), Only imported issues after this date will
    be returned. This can be a ``datetime`` instance, ISO8601
    formatted date string, or a string formatted like so:
    ``2016-02-04`` i.e. ``%Y-%m-%d``
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of imported issues
:rtype:
    :class:`~github3.repos.issue_import.ImportedIssue`
r   r  r   )r   r   r   )
r!   r   r   r   rX   r   r   r   r  r  )rs   r   r   r   r   r+   s         ru   imported_issues_Repository.imported_issues
  s{    * 2259:$ooo		oBzzK&& ..DD  
 	
rx   c	                 x   UU[         R                  " U5      UUUUS.US.n	U R                  U	5        U R                  U	S   5        U R                  SU R                  S9n
U R                  U
U	[        R                  R                  S9nU R                  US5      nU R                  [        R                  U5      $ )a  Import an issue into the repository.

See also: https://gist.github.com/jonmagic/5282384165e0f86ef105

:param string title:
    (required) Title of issue
:param string body:
    (required) Body of issue
:param created_at:
    (required) Creation timestamp
:type created_at:
    :class:`~datetime.datetime` or str
:param string assignee:
    (optional) Username to assign issue to
:param int milestone:
    (optional) Milestone ID
:param boolean closed:
    (optional) Status of issue is Closed if True
:param list labels:
    (optional) List of labels containing string names
:param list comments:
    (optional) List of dictionaries which contain
    created_at and body attributes
:returns:
    the imported issue
:rtype:
    :class:`~github3.repos.issue_import.ImportedIssue`
)rr  rC  
created_atrs  r$   r  rt  )rv  r   rv  r  r   r2  re  )r!   r   r   r   rX   r   r   r  r  r   r   )rs   rr  rC  r#  rs  r$   r  rt  r   rv  r+   r   r   s                ru   import_issue_Repository.import_issue-  s    T #77
C$&   !
 	% %.)ooo		oBzz ..DD  
 zz$$%%l&@&@$GGrx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )an  Iterate over the invitations to this repository.

:param int number:
    (optional), number of invitations to return. Default: -1 returns
    all available invitations
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of repository invitation objects
:rtype:
    :class:`~github3.repos.invitation.Invitation`
invitationsr   r   )r   rX   r   r   r   
Invitationr   s       ru   r'  _Repository.invitationso  s;     oomdiio@zz#f+sJ,A,AzMMrx   c                     U(       d  gU R                  S[        U5      U R                  S9nU R                  U R	                  U5      SS5      $ )zCheck if the user can be assigned an issue on this repository.

:param username:
    name of the user to check
:type username:
    str or :class:`~github3.users.User`
:returns:
    bool
Fr   r   r  r   r   r   rX   r   r   rs   r   r+   s      ru   is_assignee_Repository.is_assignee  sA     ook3x=499oM}}TYYs^S#66rx   c                     U(       d  gU R                  S[        U5      U R                  S9nU R                  U R	                  U5      SS5      $ )zCheck to see if ``username`` is a collaborator on this repository.

:param username:
    (required), login for the user
:type username:
    str or :class:`~github3.users.User`
:returns:
    True if successful, False otherwise
:rtype:
    bool
Fr   r   r  r   r+  r,  s      ru   is_collaborator_Repository.is_collaborator  sI     ooS]TYY  
 }}TYYs^S#66rx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zGet the issue specified by ``number``.

:param int number:
    (required), number of the issue on this repository
:returns:
    the issue
:rtype:
    :class:`~github3.issues.issue.Issue`
Nr   r   r   r   )	r   r   r   rX   r   r   r   r   Issuers   r   r   r+   s       ru   rv  _Repository.issue  s_     v;?//(CK$))/LC::diinc2D%%fllD99rx   c                     U R                  SSU R                  S9nU R                  [        U5      U[        R
                  US9$ )aP  Iterate over issue events on this repository.

:param int number:
    (optional), number of events to return. Default: -1
    returns all available events
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of events on issues
:rtype:
    :class:`~github3.issues.event.IssueEvent`
r   r   r   r   )r   rX   r   r   ieventRepositoryIssueEventr   s       ru   issue_events_Repository.issue_events  sE     ooh499oEzzKf99  
 	
rx   c           
          U R                  SU R                  S9n[        UUUUUUUU5      nU R                  [	        U	5      U[
        R                  X5      $ )a  Iterate over issues on this repo based upon parameters passed.

.. versionchanged:: 0.9.0

    The ``state`` parameter now accepts 'all' in addition to 'open'
    and 'closed'.

:param int milestone:
    (optional), 'none', or '*'
:param str state:
    (optional), accepted values: ('all', 'open', 'closed')
:param str assignee:
    (optional), 'none', '*', or login name
:param str mentioned:
    (optional), user's login name
:param str labels:
    (optional), comma-separated list of labels, e.g.  'bug,ui,@high'
:param sort:
    (optional), accepted values:
    ('created', 'updated', 'comments', 'created')
:param str direction:
    (optional), accepted values: ('asc', 'desc')
:param since:
    (optional), Only issues after this date will
    be returned. This can be a ``datetime`` or an ``ISO8601`` formatted
    date string, e.g., 2012-05-20T23:10:27Z
:type since:
    :class:`~datetime.datetime` or str
:param int number:
    (optional), Number of issues to return.
    By default all issues are returned
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of issues
:rtype:
    :class:`~github3.issues.ShortIssue`
r   r   )r   rX   repo_issue_paramsr   r   r   ru  )rs   r$   r  rs  	mentionedrt  r  	directionr   r   r   r+   r   s                ru   r   _Repository.issues  s^    f ooho;"	
 zz#f+sF,=,=vLLrx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU(       a  [        R                  " X 5      $ S$ )zGet the specified deploy key.

:param int id_num:
    (required), id of the key
:returns:
    the deploy key
:rtype:
    :class:`~github3.users.Key`
Nr   r|  r   r   )r   r   r   rX   r   r   r    r}  )rs   id_numr   r+   s       ru   rz  _Repository.key  s^     v;?//&#f+		/JC::diinc2D(,uyy$6$6rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )a5  Iterate over deploy keys on this repository.

:param int number:
    (optional), number of keys to return. Default: -1
    returns all available keys
:param str etag:
    (optional), ETag from a previous request to the same
    endpoint
:returns:
    generator of keys
:rtype:
    :class:`~github3.users.Key`
r|  r   r   )r   rX   r   r   r    r}  r   s       ru   r|  _Repository.keys  s9     ooftyyo9zz#f+sEIIDzAArx   c                     SnU(       aT  U R                  SXR                  S9nU R                  U[        R                  R
                  S9nU R                  US5      nU R                  [        R                  U5      $ )zGet the label specified by ``name``.

:param str name:
    (required), name of the label
:returns:
    the label
:rtype:
    :class:`~github3.issues.label.Label`
Nrt  r   r   r   )r   rX   r   r#   r  r  r   r   )rs   rK   r   r+   r   s        ru   r#   _Repository.label*  sm     //(D99/EC99U[[AA  D ::dC(D%%ekk488rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  U[        R
                  R                  S9$ )a;  Iterate over labels on this repository.

:param int number:
    (optional), number of labels to return. Default: -1
    returns all available labels
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of labels
:rtype:
    :class:`~github3.issues.label.Label`
rt  r   r   )r   rX   r   r   r#   r  r  r   s       ru   rt  _Repository.labels=  sQ     ooho;zzKKKKK88  
 	
rx   c                 t    U R                  SU R                  S9nU R                  [        U5      U[        US9$ )a4  Iterate over the programming languages used in the repository.

:param int number:
    (optional), number of languages to return. Default:
    -1 returns all used languages
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of tuples
:rtype:
    tuple
	languagesr   r   )r   rX   r   r   tupler   s       ru   rJ  _Repository.languagesS  s5     ookDIIo>zz#f+sEz==rx   c                     U R                  SSSU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet the build information for the most recent Pages build.

:returns:
    the information for the most recent build
:rtype:
    :class:`~github3.repos.pages.PagesBuild`
r   buildslatestr   r   )r   rX   r   r   r   r   
PagesBuildr  s      ru   latest_pages_build_Repository.latest_pages_buildc  sO     oogxDIIoNzz$))C.#.%%e&6&6==rx   c                     U R                  SSU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet the latest release.

Draft releases and prereleases are not returned by this endpoint.

:returns:
    the release
:rtype:
    :class:`~github3.repos.release.Release`
r   rO  r   r   r   rX   r   r   r   r   r  r  s      ru   latest_release_Repository.latest_releasep  sK     ooj(TYYoGzz$))C.#.%%goot<<rx   c                     U R                  SU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet the contents of a license for the repo.

:returns:
    the license
:rtype:
    :class:`~github3.licenses.RepositoryLicense`
licenser   r   )r   rX   r   r   r   r   RepositoryLicenser  s      ru   rX  _Repository.license~  sK     ooi$))o<zz$))C.#.%%h&@&@$GGrx   c                     U R                  SU R                  S9nSS0nU(       a  XS'   U R                  U R                  U[        R
                  " U5      S9SS5      $ )	a  Mark all notifications in this repository as read.

:param str last_read:
    (optional), Describes the last point that
    notifications were checked. Anything updated since this time will
    not be updated. Default: Now. Expected in ISO 8601 format:
    ``YYYY-MM-DDTHH:MM:SSZ``. Example: "2012-10-09T23:39:01Z".
:returns:
    True if successful, False otherwise
:rtype:
    bool
r   r   readTlast_read_atr      r   )r   rX   r   r   r   r   )rs   	last_readr+   marks       ru   mark_notifications_Repository.mark_notifications  s\     ooo		oB~#, }}IIcd 3I4c3
 	
rx   c                     U R                  SU R                  S9nXS.nU(       a  X5S'   U R                  U R                  XES9S5      nU R	                  [
        R                  U5      $ )aR  Perform a merge from ``head`` into ``base``.

:param str base:
    (required), where you're merging into
:param str head:
    (required), where you're merging from
:param str message:
    (optional), message to be used for the commit
:returns:
    the commit resulting from the merge
:rtype:
    :class:`~github3.repos.commit.RepoCommit`
mergesr   )r  r  commit_messager   r   )r   rX   r   r   r   r   r  )rs   r  r  rI  r+   r   r   s          ru   merge_Repository.merge  sb     ooho;+%,!"zz$**S*4c:%%f&8&8$??rx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zGet the milestone indicated by ``number``.

:param int number:
    (required), unique id number of the milestone
:returns:
    the milestone
:rtype:
    :class:`~github3.issues.milestone.Milestone`
Nr   r  r   r   )	r   r   r   rX   r   r   r   r$   r  r4  s       ru   r$   _Repository.milestone  si     v;?//c&kDII " C ::diinc2D%%i&9&94@@rx   c                    U R                  SU R                  S9nSSSS.nXUS.n[        UR                  5       5       H  u  pU
(       a
  XU	   ;   a  M  X	 M     U(       d  SnU R	                  [        U5      U[        R                  X5      $ )a  Iterate over the milestones on this repository.

:param str state:
    (optional), state of the milestones, accepted
    values: ('open', 'closed')
:param str sort:
    (optional), how to sort the milestones, accepted
    values: ('due_date', 'completeness')
:param str direction:
    (optional), direction to sort the milestones,
    accepted values: ('asc', 'desc')
:param int number:
    (optional), number of milestones to return.
    Default: -1 returns all milestones
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of milestones
:rtype:
    :class:`~github3.issues.milestone.Milestone`
r  r   )r  r  r   )due_datecompleteness)ascdesc)r  r  r>  N)r   rX   r   itemsr   r   r$   r  )rs   r  r  r>  r   r   r+   acceptedr   kvs              ru   r  _Repository.milestones  s    0 oolTYYo?.0(

 !YG(DA1+I ) Fzz#f+sI,?,?NNrx   c                     U R                   R                  SSS5      nU R                  SUS9nU R                  [	        U5      U[
        R                  U5      $ )aC  Iterate over events on a network of repositories.

:param int number:
    (optional), number of events to return. Default: -1
    returns all available events
:param str etag:
    (optional), ETag from a previous request to the same
    endpoint
:returns:
    generator of events
:rtype:
    :class:`~github3.events.Event`
reposnetworksr   r   r   )rX   replacer   r   r   r   r  )rs   r   r   r  r+   s        ru   network_events_Repository.network_events  sK     yy  *a8ooho6zz#f+sFLL$??rx   c                 >   U R                  SU R                  S9n[        U5      R                  5       [        U5      R                  5       [        R
                  " U5      S.nU R                  U5        U R                  [        U5      U[        R                  Xu5      $ )a  Iterate over the notifications for this repository.

:param bool all:
    (optional), show all notifications, including ones
    marked as read
:param bool participating:
    (optional), show only the notifications the
    user is participating in directly
:param since:
    (optional), filters out any notifications updated
    before the given time. This can be a `datetime` or an `ISO8601`
    formatted date string, e.g., 2012-05-20T23:10:27Z
:type since:
    :class:`~datetime.datetime` or str
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of notification threads
:rtype:
    :class:`~github3.notifications.Thread`
r   r   )r   participatingr   )r   rX   r   lowerr!   r   r   r   r   r   Thread)rs   r   r{  r   r   r   r+   r   s           ru   r   _Repository.notifications 	  s    2 ooo		oBs8>># /557..u5

 	&!zzKm22F
 	
rx   c                     U R                  SU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet information about this repository's pages site.

:returns:
    information about this repository's GitHub pages site
:rtype:
    :class:`~github3.repos.pages.PagesInfo`
r   r   r   )r   rX   r   r   r   r   	PagesInfor  s      ru   r   _Repository.pages$	  sI     oog		o:zz$))C.#.%%eoot<<rx   c                     U R                  SSU R                  S9nU R                  [        U5      U[        R
                  US9$ )a  Iterate over pages builds of this repository.

:param int number:
    (optional) the number of builds to return
:param str etag:
    (optional), ETag value from a previous request
:returns:
    generator of builds
:rtype:
    :class:`~github3.repos.pages.PagesBuild`
r   rN  r   r   )r   rX   r   r   r   rP  r   s       ru   pages_builds_Repository.pages_builds1	  s=     oogx$))oDzz#f+sE,<,<4zHHrx   c                     U R                  SU5      nU R                  U R                  U[        R                  R
                  S9S5      nU R                  [        R                  U5      $ )zReturn the organization project with the given ID.

:param int id:
    (required), ID number of the project
:returns:
    the project
:rtype:
    :class:`~github3.projects.Project`
r   r   r   )r   r   r   r   r  r   r   )rs   rB   r   r+   r   s        ru   project_Repository.projectA	  s[     ooj"-zzIIc8#3#3#B#BICS
 %%h&6&6==rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  U[        R
                  R                  S9$ )a?  Iterate over projects for this organization.

:param int number:
    (optional), number of members to return. Default:
    -1 will return all available.
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of projects
:rtype:
    :class:`~github3.projects.Project`
r   r   r   )r   rX   r   r   r   r  r   r   s       ru   r   _Repository.projectsQ	  sU     ooj499o=zzK$$33  
 	
rx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zGet the pull request indicated by ``number``.

:param int number:
    (required), number of the pull request.
:returns:
    the pull request
:rtype:
    :class:`~github3.pulls.PullRequest`
Nr   r   r   r   )	r   r   r   rX   r   r   r   r   PullRequestr4  s       ru   pull_request_Repository.pull_requestg	  sa     v;?//'3v;/KC::diinc2D%%e&7&7>>rx   c                    U R                  SU R                  S9n0 n	U(       a  UR                  5       nUS;   a  XS'   U	R                  X#XES9  U R	                  U	5        U R                  [        U5      U[        R                  X5      $ )aX  List pull requests on repository.

.. versionchanged:: 0.9.0

    - The ``state`` parameter now accepts 'all' in addition to 'open'
      and 'closed'.

    - The ``sort`` parameter was added.

    - The ``direction`` parameter was added.

:param str state:
    (optional), accepted values: ('all', 'open', 'closed')
:param str head:
    (optional), filters pulls by head user and branch
    name in the format ``user:ref-name``, e.g., ``seveas:debian``
:param str base:
    (optional), filter pulls by base branch name.
    Example: ``develop``.
:param str sort:
    (optional), Sort pull requests by ``created``,
    ``updated``, ``popularity``, ``long-running``. Default: 'created'
:param str direction:
    (optional), Choose the direction to list pull
    requests. Accepted values: ('desc', 'asc'). Default: 'desc'
:param int number:
    (optional), number of pulls to return. Default: -1
    returns all available pull requests
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of pull requests
:rtype:
    :class:`~github3.pulls.ShortPullRequest`
r   r   )r   r  r  r  )r  r  r  r>  )	r   rX   r|  r  r   r   r   r   r   )
rs   r  r  r  r  r>  r   r   r+   r   s
             ru   pull_requests_Repository.pull_requestsw	  s    Z oog		o:KKME11"'w4K&!zzKe44f
 	
rx   c                     U R                  SU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet the README for this repository.

:returns:
    this repository's readme
:rtype:
    :class:`Contents <github3.repos.contents.Contents>`
readmer   r   r  r  s      ru   r  _Repository.readme	  sK     ooho;zz$))C.#.%%h&7&7>>rx   c                     SnU(       a<  U R                  SSXR                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )a  Get a reference pointed to by ``ref``.

The most common will be branches and tags. For a branch, you must
specify 'heads/branchname' and for a tag, 'tags/tagname'. Essentially,
the system should return any reference you provide it in the namespace,
including notes and stashes (provided they exist on the server).

:param str ref:
    (required)
:returns:
    the reference
:rtype:
    :class:`~github3.git.Reference`
Nr   r   r   r   )r   rX   r   r   r   r   r  )rs   r   r   r+   s       ru   r   _Repository.ref	  sS     //%ii/HC::diinc2D%%cmmT::rx   c                     U(       a  SSU4nOSnU R                   " USU R                  06nU R                  [        U5      U[        R
                  US9$ )a  Iterate over references for this repository.

:param str subspace:
    (optional), e.g. 'tags', 'stashes', 'notes'
:param int number:
    (optional), number of refs to return. Default: -1
    returns all available refs
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of references
:rtype:
    :class:`~github3.git.Reference`
r   r  )r   r  r   r   )r   rX   r   r   r   r  )rs   subspacer   r   argsr+   s         ru   r  _Repository.refs	  sN     68,D"Doot8dii8zz#f+sCMMzEErx   c                     Sn[        U5      S:  aE  U R                  S[        U5      U R                  S9nU R	                  U R                  U5      S5      nU R                  [        R                  U5      $ )zGet a single release.

:param int id:
    (required), id of release
:returns:
    the release
:rtype:
    :class:`~github3.repos.release.Release`
Nr   r   r   r   )	r   r   r   rX   r   r   r   r   r  r  s       ru   r   _Repository.release	  s_     r7Q;//*c"g		/JC::diinc2D%%goot<<rx   c                     U R                  SSXR                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )a  Get a release by tag name.

release_from_tag() returns a release with specified tag
while release() returns a release with specified release id

:param str tag_name:
    (required) name of tag
:returns:
    the release
:rtype:
    :class:`~github3.repos.release.Release`
r   r  r   r   rT  )rs   r  r+   r   s       ru   release_from_tag_Repository.release_from_tag	  sS     oo99  
 zz$))C.#.%%goot<<rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )a?  Iterate over releases for this repository.

:param int number:
    (optional), number of refs to return. Default: -1
    returns all available refs
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of releases
:rtype:
    :class:`~github3.repos.release.Release`
r   r   r   )r   rX   r   r   r   r  r   s       ru   r   _Repository.releases
  s9     ooj499o=zz#f+sGOO$zGGrx   c                     U(       d  gU R                  S[        U5      U R                  S9nU R                  U R	                  U5      SS5      $ )zRemove collaborator ``username`` from the repository.

:param username:
    (required), login name of the collaborator
:type username:
    str or :class:`~github3.users.User`
:returns:
    True if successful, False otherwise
:rtype:
    bool
Fr   r   r  r   )r   r   rX   r   r  r,  s      ru   remove_collaborator_Repository.remove_collaborator
  sJ     ooS]TYY  
 }}T\\#.S99rx   c                     U R                  SU R                  S9nSU0nU R                  U R                  U[        R
                  " U5      U R                  S9S5      nU R                  [        R                  U5      $ )zReplace the repository topics with ``new_topics``.

:param topics:
    (required), new topics of the repository
:type topics:
    list
:returns:
    new topics of the repository
:rtype:
    :class:`~github3.repos.topics.Topics`
r   r   namesr2  r   )
r   rX   r   r   r   r   r   r   r   Topics)rs   
new_topicsr+   r   r   s        ru   replace_topics_Repository.replace_topics1
  sw     ooho;$zzII'---t7K7K   	
 %%fmmT::rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  USS0S9$ )aE  List users who have starred this repository.

:param int number:
    (optional), number of stargazers to return.
    Default: -1 returns all subscribers available
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of users
:rtype:
    :class:`~github3.users.Stargazer`
r  r   r(   r)   r   )r   rX   r   r   r    	Stargazerr   s       ru   r  _Repository.stargazersH
  sM     oolTYYo?zzKOODE  
 	
rx   c                     SnU(       a  U R                  SXR                  S9nU R                  [        U5      U[        R
                  US9$ )a  Iterate over the statuses for a specific SHA.

.. warning::

    Deprecated in v1.0. Also deprecated upstream
    https://developer.github.com/v3/repos/statuses/

:param str sha:
    SHA of the commit to list the statuses of
:param int number:
    (optional), return up to number statuses. Default:
    -1 returns all available statuses.
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of statuses
:rtype:
    :class:`~github3.repos.status.Status`
r6  r  r   r   )r   rX   r   r   r   r  )rs   r   r   r   r+   s        ru   r  _Repository.statuses^
  sA    ( //*cII/FCzz#f+sFMMzEErx   c           	          U R                  SU R                  S9nU R                  U R                  U[        R
                  " SS05      S9S5      nU R                  [        R                  U5      $ )zSubscribe the user to this repository's notifications.

.. versionadded:: 1.0

This replaces ``Repository#set_subscription``

:returns:
    the new repository subscription
:rtype:
    :class:`~github3.notifications.RepositorySubscription`
r  r   
subscribedTr   r   r  r  s      ru   	subscribe_Repository.subscribew
  sh     oontyyoAzzIIc|T.B CIDc
 %%00$
 	
rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )ai  Iterate over users subscribed to this repository.

:param int number:
    (optional), number of subscribers to return.
    Default: -1 returns all subscribers available
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of users subscribed to this repository
:rtype:
    :class:`~github3.users.ShortUser`
subscribersr   r   r   r   s       ru   r  _Repository.subscribers
  s9     oomdiio@zz#f+sEOO$zGGrx   c                     U R                  SU R                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zReturn subscription for this Repository.

:returns:
    the user's subscription to this repository
:rtype:
    :class:`~github3.notifications.RepositorySubscription`
r  r   r   )r   rX   r   r   r   r   r  r  s      ru   r  _Repository.subscription
  sP     oontyyoAzz$))C.#.%%00$
 	
rx   c                     SnU(       a<  U R                  SSXR                  S9nU R                  U R                  U5      S5      nU R	                  [
        R                  U5      $ )zGet an annotated tag.

http://learn.github.com/p/tagging.html

:param str sha:
    (required), sha of the object for this tag
:returns:
    the annotated tag
:rtype:
    :class:`~github3.git.Tag`
Nr   r  r   r   )r   rX   r   r   r   r   r  r	  s       ru   r   _Repository.tag
  sS     //%yy/IC::diinc2D%%cggt44rx   c                     U R                  SU R                  S9nU R                  [        U5      U[        R
                  US9$ )ag  Iterate over tags on this repository.

:param int number:
    (optional), return up to at most number tags.
    Default: -1 returns all available tags.
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of tags with GitHub repository specific information
:rtype:
    :class:`~github3.repos.tag.RepoTag`
r  r   r   )r   rX   r   r   r   RepoTagr   s       ru   r  _Repository.tags
  s9     ooftyyo9zz#f+sCKKdzCCrx   c                     SSK Jn  U R                  SU R                  S9nU R	                  [        U5      XCR                  US9$ )a1  Iterate over teams with access to this repository.

:param int number:
    (optional), return up to number Teams. Default: -1
    returns all Teams.
:param str etag:
    (optional), ETag from a previous request to the same endpoint
:returns:
    generator of teams
:rtype:
    :class:`~github3.orgs.Team`
r   )orgsteamsr   r   )r6  r  r   rX   r   r   	ShortTeam)rs   r   r   r  r+   s        ru   r  _Repository.teams
  s:     	oog		o:zz#f+sNNzFFrx   c                     U R                  SU R                  S9nU R                  U R                  XR                  S9S5      nU R                  [        R                  U5      $ )z}Get the topics of this repository.

:returns:
    this repository's topics
:rtype:
    :class:`~github3.repos.topics.Topics`
r   r   r   r   )r   rX   r   r   r   r   r   r  r  s      ru   r   _Repository.topics
  sR     ooho;zz$))C1E1E)FL%%fmmT::rx   c                     SnU(       aG  U R                  SSXR                  S9nU(       a  SS0OSnU R                  U R                  XES9S5      nU R	                  [
        R                  U5      $ )	zGet a tree.

:param str sha:
    (required), sha of the object for this tree
:param bool recursive:
    (optional), whether to fetch the tree recursively
:returns:
    the tree
:rtype:
    :class:`~github3.git.Tree`
Nr   r  r   	recursiver   r  r   )r   rX   r   r   r   r   r  )rs   r   r  r   r+   r   s         ru   rJ  _Repository.tree
  sd     //%#		/JC)2k1%F::diii;SAD%%chh55rx   c           	          U R                  SU R                  S9nU R                  U R                  U[        R
                  " SS05      S9S5      nU R                  [        R                  U5      $ )zUnignore notifications from this repository for the user.

.. versionadded:: 1.3

This replaces ``Repository#set_subscription``.

:returns:
    the new repository subscription
:rtype:
    :class:~github3.notifications.RepositorySubscription`
r  r   r  Fr   r   r  r  s      ru   unignore_Repository.unignore
  sh     oontyyoAzzIIcy%.@ AIBC
 %%00$
 	
rx   c           	          U R                  SU R                  S9nU R                  U R                  U[        R
                  " SS05      S9S5      nU R                  [        R                  U5      $ )zUnsubscribe the user to this repository's notifications.

.. versionadded:: 1.3

This replaces ``Repository#set_subscription``

:returns:
    the new repository subscription
:rtype:
    :class:`~github3.notifications.RepositorySubscription`
r  r   r  Fr   r   r  r  s      ru   unsubscribe_Repository.unsubscribe  sh     oontyyoAzzIIc|U.C DIEs
 %%00$
 	
rx   c                 4   U R                  SSU R                  S9nU R                  U5      nU(       a  UR                  S:X  a  0 $ U R	                  US5      nU(       a  UR                  S5      (       a  US	 U(       a  UR                  S5      (       a  US	 U$ )a\  Retrieve the total commit counts.

.. note::

    All statistics methods may return a 202. If github3.py
    receives a 202 in this case, it will return an emtpy dictionary.
    You should give the API a moment to compose the data and then re
    -request it via this method.

..versionadded:: 0.7

The dictionary returned has two entries: ``all`` and ``owner``. Each
has a fifty-two element long list of commit counts. (Note: ``all``
includes the owner.) ``d['all'][0]`` will be the oldest week,
``d['all'][51]`` will be the most recent.

:returns:
    the commit count as a dictionary
:rtype:
    dict
r   participationr   re  r   ETagzLast-Modified)r   rX   r   status_coder   r;  )rs   r+   r   r   s       ru   weekly_commit_count_Repository.weekly_commit_count)  s    , oogoKyy~D$$+Izz$$DHHV$$VDHH_--_%rx   ).rX   r[   r\   r]   r^   r_   r`   ra   rb   rc   r5   r6   r7   r8   r9   r:   r;   r<   rd   re   rf   r@   rA   rB   rg   rh   ri   rj   rk   rH   rI   rl   rK   rm   rM   rN   ro   rp   rQ   rq   rS   rT   rU   rV   rr   r+   r   )r6  master)N)r  FN)r   r  N)NNNr  NNNN)Fr  N)r  )NNNNNNNN)NNr   )NN)Nr6  Fr6  N)NNN)NNNNN)F)NNNFF)NNdefault)NNNNNNNNNNNN)T)r6  r  N)r  NN
NNNNNNNNr  N)r6  )NNNr  N)FFNr  N)NNNcreatedrn  r  N)}__name__
__module____qualname____firstlineno____doc__r   STAR_HEADERSr|   rv   r~   r   r   r   requires_authr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r"  requires_app_installation_authr/  r3  r<  r@  rF  rO  rX  r`  rg  ro  rw  r~  r  r  r  r  r  r?  r  r  r  r  r  r  r  r	   rR  r   r  r  r  r   r  rc  r
  r
   rk  r  r  r   r$  r'  r-  r0  rv  r9  r   rz  r|  r#   rt  rJ  rQ  rU  rX  ra  rf  r$   r  rx  r   r   r  r  r   r  r  r  r   r  r   r  r   r  r  r  r  r  r  r  r   r  r  r   rJ  r  r  r  __static_attributes__ rx   ru   r&   r&   .   s     !LMOCDLJ->^/D - -8>;$H 6;$
6=(?(=8
<L ? =6A  7NrC$O6M*@6A6 ..
 J= /J=X ..? /?2  * ) )$ A AB =A(8 (8T  0C 0Cd JN3 3j 8 8& 06x 7 78  2? 2?h 7 7* 9 96 :> A  AD > >2 BF' '4  & ; ;.  )= )=V EN!; !;F ?D65 65p 6 6. @ @ : : 	: 	:C " 6:T /
b  a aF ) )VE"?"K,8  7 7  B B  
 
( H H&  
  
D  ?H ?HB N N 7 7 7&: 
( @MD 7 7  B B"9&
,>  
> 
>=
H 
 
* @ @*A& FJ$OL@$ JN!
 !
F 
= 
= I I> 
,?$ 9
v
?;*F,= =&H  : :( ; ;,
,F2 
 
(H  
 
5$D  G G$
;6& 
 
( 
 
(rx   r&   c                   0   ^  \ rS rSrSrS rU 4S jrSrU =r$ )rf  iK  a  This organizes the full representation of a single Repository.

The full representation of a Repository is not returned in collections but
instead in individual requests, e.g.,
:meth:`~github3.github.GitHub.repository`.

This object has all the same attributes as
:class:`~github3.repos.repo.ShortRepository` as well as:

.. attribute:: allow_merge_commit

    .. note::

        This attribute is not guaranteed to be present.

    Whether the repository allows creating a merge commit when merging
    when a pull request.

.. attribute:: allow_rebase_merge

    .. note::

        This attribute is not guaranteed to be present.

    Whether the repository allows rebasing when merging a pull request.

.. attribute:: allow_squash_merge

    .. note::

        This attribute is not guaranteed to be present.

    Whether the repository allows squashing commits when merging a pull
    request.

.. attribute:: archived

    A boolean attribute that describes whether the current repository has
    been archived or not.

.. attribute:: clone_url

    This is the URL that can be used to clone the repository via HTTPS,
    e.g., ``https://github.com/sigmavirus24/github3.py.git``.

.. attribute:: created_at

    A parsed :class:`~datetime.datetime` object representing the date the
    repository was created.

.. attribute:: default_branch

    This is the default branch of the repository as configured by its
    administrator(s).

.. attribute:: forks_count

    This is the number of forks of the repository.

.. attribute:: git_url

    This is the URL that can be used to clone the repository via the Git
    protocol, e.g., ``git://github.com/sigmavirus24/github3.py``.

.. attribute:: has_downloads

    This is a boolean attribute that conveys whether or not the repository
    has downloads.

.. attribute:: has_issues

    This is a boolean attribute that conveys whether or not the repository
    has issues.

.. attribute:: has_pages

    This is a boolean attribute that conveys whether or not the repository
    has pages.

.. attribute:: has_wiki

    This is a boolean attribute that conveys whether or not the repository
    has a wiki.

.. attribute:: homepage

    This is the administrator set homepage URL for the project. This may
    not be provided.

.. attribute:: language

    This is the language GitHub has detected for the repository.

.. attribute:: original_license

    .. note::

        When used with a Github Enterprise instance <= 2.12.7, this
        attribute will not be returned. To handle these situations
        sensitively, the attribute will be set to ``None``.
        Repositories may still have a license associated with them
        in these cases.

    This is the :class:`~github3.license.ShortLicense` returned as part of
    the repository. To retrieve the most recent license, see the
    :meth:`~github3.repos.repo.Repository.license` method.

.. attribute:: mirror_url

    The URL that GitHub is mirroring the repository from.

.. attribute:: network_count

    The size of the repository's "network".

.. attribute:: open_issues_count

    The number of issues currently open on the repository.

.. attribute:: parent

    A representation of the parent repository as
    :class:`~github3.repos.repo.ShortRepository`. If this Repository has
    no parent then this will be ``None``.

.. attribute:: pushed_at

    A parsed :class:`~datetime.datetime` object representing the date a
    push was last made to the repository.

.. attribute:: size

    The size of the repository.

.. attribute:: source

    A representation of the source repository as
    :class:`~github3.repos.repo.ShortRepository`. If this Repository has
    no source then this will be ``None``.

.. attribute:: ssh_url

    This is the URL that can be used to clone the repository via the SSH
    protocol, e.g., ``ssh@github.com:sigmavirus24/github3.py.git``.

.. attribute:: stargazers_count

    The number of people who have starred this repository.

.. attribute:: subscribers_count

    The number of people watching (or who have subscribed to notifications
    about) this repository.

.. attribute:: svn_url

    This is the URL that can be used to clone the repository via SVN,
    e.g., ``ssh@github.com:sigmavirus24/github3.py.git``.

.. attribute:: updated_at

    A parsed :class:`~datetime.datetime` object representing the date a
    the repository was last updated by its administrator(s).

.. attribute:: watchers_count

    The number of people watching this repository.


See also: http://developer.github.com/v3/repos/
c                   > [         TU ]  U5        UR                  S5      U l        UR                  S5      U l        UR                  S5      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 R                  U l        US	   U l        US
   U l        US   U l        US   U l        US   U l        US   U l        US   U l        US   U l        UR                  S5      U l        U R*                  b&  [,        R.                  " U R*                  U 5      U l        US   U l        US   U l        US   U l        UR                  S5      U l        U R6                  b  [9        U R6                  U 5      U l        U R                  US   5      U l        US   U l        UR                  S5      U l        U R>                  b  [9        U R>                  U 5      U l        US   U l         US   U l!        US   U l"        US   U l#        U R                  US   5      U l$        US   =U l%        U l&        g )Nr  r  r  r  	clone_urlr#  r  forks_countgit_urlr  r  	has_pagesr  r  r  languagerX  
mirror_urlnetwork_countopen_issues_countparent	pushed_atsizesourcessh_urlstargazers_countsubscribers_countsvn_url
updated_atwatchers_count)'superrv   r;  r  r  r  r  r  	_strptimer#  r  r  
fork_countr  r  r  r  r  r  r  r  original_licenser   ShortLicenser  r  r  r  r  r  r  r  r  r  r  r  r  r  watchers)rs   rt   	__class__s     ru   rv   Repository._update_attributes  s4   "4("&((+?"@"&((+?"@"&((+?"@Z(k*..l);<"#34.**I!/2|,k* 0Z(Z(Z( $ 3  ,$,$9$9%%t%D! |,!/2!%&9!:hhx(;;")$++t<DK[(9:L	hhx(;;")$++t<DKI $%7 8!%&9!:I..l);<.23C.DDdmrx   ) r  r  r  r  r  r#  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  )	r  r  r  r  r  r|   rv   r  __classcell__)r  s   @ru   rf  rf  K  s    jX J(E (Erx   rf  c                        \ rS rSrSrS r\rSrg)r  i%  a{!  This represents a Repository object returned in collections.

GitHub's API returns different amounts of information about repositories
based upon how that information is retrieved. This object exists to
represent the full amount of information returned for a specific
repository. For example, you would receive this class when calling
:meth:`~github3.github.GitHub.repository`. To provide a clear distinction
between the types of repositories, github3.py uses different classes with
different sets of attributes.

This object only has the following attributes:

.. attribute:: url

    The GitHub API URL for this repository, e.g.,
    ``https://api.github.com/repos/sigmavirus24/github3.py``.

.. attribute:: archive_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``archive_urlt.variables`` for the list of variables that can
    be passed to ``archive_urlt.expand()``.

.. attribute:: assignees_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``assignees_urlt.variables`` for the list of variables that can
    be passed to ``assignees_urlt.expand()``.

.. attribute:: blobs_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``blobs_urlt.variables`` for the list of variables that can
    be passed to ``blobs_urlt.expand()``.

.. attribute:: branches_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``branches_urlt.variables`` for the list of variables that can
    be passed to ``branches_urlt.expand()``.

.. attribute:: collaborators_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``collaborators_urlt.variables`` for the list of variables that can
    be passed to ``collaborators_urlt.expand()``.

.. attribute:: comments_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``comments_urlt.variables`` for the list of variables that can
    be passed to ``comments_urlt.expand()``.

.. attribute:: commits_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``commits_urlt.variables`` for the list of variables that can
    be passed to ``commits_urlt.expand()``.

.. attribute:: compare_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``compare_urlt.variables`` for the list of variables that can
    be passed to ``compare_urlt.expand()``.

.. attribute:: contents_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``contents_urlt.variables`` for the list of variables that can
    be passed to ``contents_urlt.expand()``.

.. attribute:: contributors_url

    The URL to retrieve this repository's list of contributors.

.. attribute:: deployments_url

    The URL to retrieve this repository's list of deployments.

.. attribute:: description

    The administrator created description of the repository.

.. attribute:: downloads_url

    The URL to retrieve this repository's list of downloads.

.. attribute:: events_url

    The URL to retrieve this repository's list of events.

.. attribute:: fork

    Whether or not this repository is a fork of another.

.. attribute:: forks_url

    The URL to retrieve this repository's list of forks.

.. attribute:: full_name

    The full name of this repository, e.g., ``sigmavirus24/github3.py``.

.. attribute:: git_commits_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``git_commits_urlt.variables`` for the list of variables that can
    be passed to ``git_commits_urlt.expand()``.

.. attribute:: git_refs_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``git_refs_urlt.variables`` for the list of variables that can
    be passed to ``git_refs_urlt.expand()``.

.. attribute:: git_tags_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``git_tags_urlt.variables`` for the list of variables that can
    be passed to ``git_tags_urlt.expand()``.

.. attribute:: hooks_url

    The URL to retrieve this repository's list of hooks.

.. attribute:: html_url

    The HTML URL of this repository, e.g.,
    ``https://github.com/sigmavirus24/github3.py``.

.. attribute:: id

    The unique GitHub assigned numerical id of this repository.

.. attribute:: issue_comment_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``issue_comment_urlt.variables`` for the list of variables that can
    be passed to ``issue_comment_urlt.expand()``.

.. attribute:: issue_events_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``issue_events_urlt.variables`` for the list of variables that can
    be passed to ``issue_events_urlt.expand()``.

.. attribute:: issues_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``issues_urlt.variables`` for the list of variables that can
    be passed to ``issues_urlt.expand()``.

.. attribute:: keys_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``keys_urlt.variables`` for the list of variables that can
    be passed to ``keys_urlt.expand()``.

.. attribute:: labels_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``labels_urlt.variables`` for the list of variables that can
    be passed to ``labels_urlt.expand()``.

.. attribute:: languages_url

    The URL to retrieve this repository's list of languages.

.. attribute:: merges_url

    The URL to retrieve this repository's list of merges.

.. attribute:: milestones_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``milestones_urlt.variables`` for the list of variables that can
    be passed to ``milestones_urlt.expand()``.

.. attribute:: name

    The name of the repository, e.g., ``github3.py``.

.. attribute:: notifications_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``notifications_urlt.variables`` for the list of variables that can
    be passed to ``notifications_urlt.expand()``.

.. attribute:: owner

    A :class:`~github3.users.ShortUser` object representing the owner of
    the repository.

.. attribute:: private

    Whether the repository is private or public.

.. attribute:: pulls_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``pulls_urlt.variables`` for the list of variables that can
    be passed to ``pulls_urlt.expand()``.

.. attribute:: releases_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``releases_urlt.variables`` for the list of variables that can
    be passed to ``releases_urlt.expand()``.

.. attribute:: stargazers_url

    The URL to retrieve this repository's list of stargazers.

.. attribute:: statuses_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``statuses_urlt.variables`` for the list of variables that can
    be passed to ``statuses_urlt.expand()``.

.. attribute:: subscribers_url

    The URL to retrieve this repository's list of subscribers.

.. attribute:: subscription_url

    The URL to modify subscription to this repository.

.. attribute:: tags_url

    The URL to retrieve this repository's list of tags.

.. attribute:: teams_url

    The URL to retrieve this repository's list of teams.

.. attribute:: trees_urlt

    The :class:`~uritemplate.URITemplate` object representing the
    URI template returned by GitHub's API. Check
    ``trees_urlt.variables`` for the list of variables that can
    be passed to ``trees_urlt.expand()``.

.. versionadded:: 1.0.0
r  N)	r  r  r  r  r  r|   rf  _refresh_tor  r  rx   ru   r  r  %  s    IV #JKrx   r  c                   $    \ rS rSrSrS rS rSrg)StarredRepositoryi5  aV  This object represents the data returned about a user's starred repos.

GitHub used to send back the ``starred_at`` attribute on Repositories but
then changed the structure to a new object that separates that from the
Repository representation. This consolidates the two.

Attributes:

.. attribute:: starred_at

    A parsed :class:`~datetime.datetime` object representing the date a
    the repository was starred.

.. attribute:: repository

    The :class:`Repository` that was starred by the user.

See also:
https://developer.github.com/v3/activity/starring/#list-repositories-being-starred

c                     U R                  US   5      U l        [        US   U 5      U l        U R                  U l        g )N
starred_atrt   )r  r  r  r  rt   )rs   starred_repositorys     ru   rv   $StarredRepository._update_attributesL  s7    ..);L)IJ)*<V*DdKOO	rx   c                 $    SU R                   < S3$ )Nz<StarredRepository [r{   )r  r}   s    ru   r~   StarredRepository._reprQ  s    %doo%8;;rx   )rt   r  r  N)r  r  r  r  r  rv   r~   r  r  rx   ru   r  r  5  s    ,$
<rx   r  c
           
          X#S.n
U S;   d  [        U [        5      (       a  X
S'   [        R                  U
5        U
R	                  [
        R                  " SXXVU5      5        U
$ )z9Validate and filter issue method parameters in one place.)rs  r=  )*noner$   N)rM  r   rf  r   r  r   issue_params)r$   r  rs  r=  rt  r  r>  r   r   r   r   s              ru   r<  r<  U  s]     #;FM!Z	3%?%?'{F#
MMD%%H Mrx   r  ).r  r7  r   r   uritemplaterY   r6  r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r7  r#   r$   
GitHubCorer&   rf  r  r  r<  r  rx   ru   <module>r     s                                    $  Z,&## Z,zXWE WEtMk M`<)) <B 
	
	rx   