
    #Ii                         S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SK	rS SK
rS SKrS SKrS SKrS SKrSSKJr   " S S\R"                  R$                  5      rg)    N   )Constsc                      \ rS rSrSrS r\S 5       r\S 5       r\S 5       r	\S 5       r
\S 5       r\S	 5       r\S
 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r \S 5       r!\S 5       r"\S  5       r#\S! 5       r$\S" 5       r%\S# 5       r&\S$ 5       r'\S% 5       r(\S& 5       r)\S' 5       r*\S( 5       r+\S) 5       r,\S* 5       r-\S+ 5       r.\S, 5       r/S- r0S. r1\2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  S/4S0 jr5S1 r6S2 r7\2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  4S3 jr8\2Rf                  Rh                  \2Rf                  Rh                  4S4 jr9\2Rf                  Rh                  \2Rf                  Rh                  4S5 jr:\2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  4S6 jr;S7 r<S8 r=\2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  4S9 jr>\2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  S:.S; jr?S< r@S= rAS> rBS? rCS@ rDSA rESB rFSC rGSD rHSE rISF rJSG rKSH rLSI rMSJ rN\2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  \2Rf                  Rh                  4SK jrOSL rPSM rQ\2Rf                  Rh                  4SN jrRSO rSSP rTSQrUgR)SPullRequest=   zu
This class represents PullRequests. The reference can be found here https://docs.github.com/en/rest/reference/pulls
c                 z    U R                  U R                  R                  U R                  R                  S.5      $ )N)numbertitle)get__repr___numbervalue_titleselfs    8/venv/lib/python3.13/site-packages/github/PullRequest.py__repr__PullRequest.__repr__B   s1    ||))DKK4E4EF
 	
    c                 d    U R                  U R                  5        U R                  R                  $ z
:type: integer
)_completeIfNotSet
_additionsr   r   s    r   	additionsPullRequest.additionsG   &    
 	t/$$$r   c                 d    U R                  U R                  5        U R                  R                  $ z,
:type: :class:`github.NamedUser.NamedUser`
)r   	_assigneer   r   s    r   assigneePullRequest.assigneeO   &    
 	t~~.~~###r   c                 d    U R                  U R                  5        U R                  R                  $ )z4
:type: list of :class:`github.NamedUser.NamedUser`
)r   
_assigneesr   r   s    r   	assigneesPullRequest.assigneesW   r   r   c                 d    U R                  U R                  5        U R                  R                  $ z8
:type: :class:`github.PullRequestPart.PullRequestPart`
)r   _baser   r   s    r   basePullRequest.base_   &    
 	tzz*zzr   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: string
)r   _bodyr   r   s    r   bodyPullRequest.bodyg   r+   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _changed_filesr   r   s    r   changed_filesPullRequest.changed_fileso   s*    
 	t223""(((r   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: datetime.datetime
)r   
_closed_atr   r   s    r   	closed_atPullRequest.closed_atw   r   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   	_commentsr   r   s    r   commentsPullRequest.comments   r!   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _comments_urlr   r   s    r   comments_urlPullRequest.comments_url   s*    
 	t112!!'''r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _commitsr   r   s    r   commitsPullRequest.commits   s&    
 	t}}-}}"""r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _commits_urlr   r   s    r   commits_urlPullRequest.commits_url   s*    
 	t001  &&&r   c                 d    U R                  U R                  5        U R                  R                  $ r6   )r   _created_atr   r   s    r   
created_atPullRequest.created_at   *    
 	t//0%%%r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   
_deletionsr   r   s    r   	deletionsPullRequest.deletions   r   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   	_diff_urlr   r   s    r   diff_urlPullRequest.diff_url   r!   r   c                 d    U R                  U R                  5        U R                  R                  $ z
:type: bool
)r   _draftr   r   s    r   draftPullRequest.draft   &    
 	t{{+{{   r   c                 d    U R                  U R                  5        U R                  R                  $ r'   )r   _headr   r   s    r   headPullRequest.head   r+   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   	_html_urlr   r   s    r   html_urlPullRequest.html_url   r!   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _idr   r   s    r   idPullRequest.id   s$    
 	txx(xx~~r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   
_issue_urlr   r   s    r   	issue_urlPullRequest.issue_url   r   r   c                 d    U R                  U R                  5        U R                  R                  $ )z,
:type: list of :class:`github.Label.Label`
)r   _labelsr   r   s    r   labelsPullRequest.labels   &    
 	t||,||!!!r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _merge_commit_shar   r   s    r   merge_commit_shaPullRequest.merge_commit_sha   s*    
 	t556%%+++r   c                 d    U R                  U R                  5        U R                  R                  $ rX   )r   
_mergeabler   r   s    r   	mergeablePullRequest.mergeable   r   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _mergeable_stater   r   s    r   mergeable_statePullRequest.mergeable_state   *    
 	t445$$***r   c                 d    U R                  U R                  5        U R                  R                  $ rX   )r   _mergedr   r   s    r   mergedPullRequest.merged   rq   r   c                 d    U R                  U R                  5        U R                  R                  $ r6   )r   
_merged_atr   r   s    r   	merged_atPullRequest.merged_at  r   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   
_merged_byr   r   s    r   	merged_byPullRequest.merged_by  r   r   c                 d    U R                  U R                  5        U R                  R                  $ )z,
:type: :class:`github.Milestone.Milestone`
)r   
_milestoner   r   s    r   	milestonePullRequest.milestone  r   r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   r   r   r   s    r   r	   PullRequest.number  rq   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   
_patch_urlr   r   s    r   	patch_urlPullRequest.patch_url'  r   r   c                 d    U R                  U R                  5        U R                  R                  $ rX   )r   _rebaseabler   r   s    r   
rebaseablePullRequest.rebaseable/  rN   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _review_comment_urlr   r   s    r   review_comment_urlPullRequest.review_comment_url7  s*    
 	t778''---r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _review_commentsr   r   s    r   review_commentsPullRequest.review_comments?  r~   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _review_comments_urlr   r   s    r   review_comments_urlPullRequest.review_comments_urlG  s*    
 	t889((...r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _stater   r   s    r   statePullRequest.stateO  r\   r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   r   r   r   s    r   r
   PullRequest.titleW  r\   r   c                 d    U R                  U R                  5        U R                  R                  $ r6   )r   _updated_atr   r   s    r   
updated_atPullRequest.updated_at_  rN   r   c                 d    U R                  U R                  5        U R                  R                  $ N)r   _requested_reviewersr   r   s    r   requested_reviewersPullRequest.requested_reviewersg  s(    t889((...r   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _requested_teamsr   r   s    r   requested_teamsPullRequest.requested_teamsl  s(    t445$$***r   c                 d    U R                  U R                  5        U R                  R                  $ r-   )r   _urlr   r   s    r   urlPullRequest.urlq  s$    
 	tyy)yyr   c                 d    U R                  U R                  5        U R                  R                  $ r   )r   _userr   r   s    r   userPullRequest.usery  r+   r   c                 d    U R                  U R                  5        U R                  R                  $ rX   )r   _maintainer_can_modifyr   r   s    r   maintainer_can_modify!PullRequest.maintainer_can_modify  s*    
 	t::;**000r   c                     U R                   R                  SU R                  5      u  p[        R                  R	                  U R                   XSS9$ )z
:calls: `GET /repos/{owner}/{repo}/issues/{number} <https://docs.github.com/en/rest/reference/issues>`_
:rtype: :class:`github.Issue.Issue`
GETT	completed)
_requesterrequestJsonAndCheckrk   githubIssuer   headersdatas      r   as_issuePullRequest.as_issue  s@    
 ;;E4>>R||!!$//7D!QQr   c                 &    U R                  XX45      $ )a-  
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param body: string
:param commit: :class:`github.Commit.Commit`
:param path: string
:param position: integer
:rtype: :class:`github.PullRequestComment.PullRequestComment`
)create_review_comment)r   r/   commitpathpositions        r   create_commentPullRequest.create_comment  s     ))$GGr   Fc                    [        U[        5      (       d   U5       e[        U[        R                  R                  5      (       d   U5       e[        U[        5      (       d   U5       eU[        R                  R
                  L d  [        U[        5      (       d   U5       eU[        R                  R
                  L d  US;   d   U5       eU[        R                  R
                  L d  [        U[        5      (       d   U5       eU[        R                  R
                  L d  US;   d   U5       eU[        R                  R
                  L d  [        U[        5      (       d   U5       eU	[        R                  R
                  L d  U	S;   d   U	5       e[        U
[        5      (       d   U
5       eU
(       a  SU S3nUUR                  US.nU[        R                  R
                  La  XKS'   U[        R                  R
                  La  X[S'   U[        R                  R
                  La  XkS'   U[        R                  R
                  La  X{S	'   U[        R                  R
                  La  XS
'   U	[        R                  R
                  La  XS'   U R                  R                  SU R                   S3US9u  p[        R                  R                  U R                  XSS9$ )a  
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param body: string
:param commit: :class:`github.Commit.Commit`
:param path: string
:param line: integer
:param side: string
:param start_line: integer
:param start_side: string
:param in_reply_to: integer
:param subject_type: string
:param as_suggestion: bool interprets the body as suggested code and modifies it accordingly
:rtype: :class:`github.PullRequestComment.PullRequestComment`
)LEFTRIGHT)LINEFILEsidez```suggestion
z
```)r/   	commit_idr   liner   
start_line
start_sidein_reply_tosubject_typePOST	/commentsinputTr   )
isinstancestrr   CommitGithubObjectNotSetintbool	_identityr   r   r   PullRequestComment)r   r/   r   r   r   r   r   r   r   r   as_suggestionpost_parametersr   r   s                 r   r   !PullRequest.create_review_comment  s   8 $$$*d*$&&--"6"677??7$$$*d*$v**111Zc5J5JPDPJv**111T=N5NTPTTNV00777:<
 <
 		 
 V00777: J
 <
 	 	 
 f11888J=
 =
 		 
 v22999\ N
 >
 	 		 

 -..==.$TF%0D))

 v**111&*F#v**111&*F#V00777,6L)V00777,6L)f11888-8M*v22999.:N+;;txxj	*/ < 
 ((;;OOWd < 
 	
r   c                 &   [        U[        5      (       d   U5       e[        U[        5      (       d   U5       eSU0nU R                  R	                  SU R
                   SU S3US9u  pE[        R                  R                  U R                  XESS9$ )a  
:calls: `POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param comment_id: int
:param body: string
:rtype: :class:`github.PullRequestComment.PullRequestComment`
r/   r   
/comments/z/repliesr   Tr   )r   r   r   r   r   r   r   r   )r   
comment_idr/   r   r   r   s         r   create_review_comment_reply'PullRequest.create_review_comment_reply  s     *c**6J6*$$$*d*$!4.;;xxj
:,h7! < 

 ((;;OOWd < 
 	
r   c                     [        U[        5      (       d   U5       eSU0nU R                  R                  SU R                   S3US9u  p4[
        R                  R                  U R                  X4SS9$ )z
:calls: `POST /repos/{owner}/{repo}/issues/{number}/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
:param body: string
:rtype: :class:`github.IssueComment.IssueComment`
r/   r   r   r   Tr   )r   r   r   r   rk   r   IssueComment)r   r/   r   r   r   s        r   create_issue_comment PullRequest.create_issue_comment  s     $$$*d*$D
 ;;t~~&i0 < 
 ""//OOWd 0 
 	
r   c                    U[         R                  R                  L d0  [        U[         R                  R                  5      (       d   U5       eU[         R                  R                  L d  [        U[
        5      (       d   U5       eU[         R                  R                  L d  [        U[
        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       e[        5       nU[         R                  R                  La  UR                  US'   U[         R                  R                  La  X%S'   U[         R                  R                  :X  a  SOUUS'   U[         R                  R                  L a  / US'   OXES'   U R                  R                  SU R                   S3US9u  pg[         R                  R                  U R                  XgS	S
9$ )a  
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/reviews <https://docs.github.com/en/rest/reference/pulls#reviews>`_
:param commit: github.Commit.Commit
:param body: string
:param event: string
:param comments: list
:rtype: :class:`github.PullRequestReview.PullRequestReview`
r   r/   COMMENTeventr<   r   /reviewsr   Tr   )r   r   r   r   r   r   listdictshar   r   r   PullRequestReview)r   r   r/   r   r<   r   r   r   s           r   create_reviewPullRequest.create_review  s    ,,333zFMM((8
 8
 		 
 v**111Zc5J5JPDPJ++222j6L6LSeSL6..555d:
 :
 		 
 &,,333+1::OK(v**111&*F#&"5"5"<"<<I% 	  v**111*,OJ'*2J';;txxj) < 
 ''99OOWd : 
 	
r   c                 h   [        5       nU[        R                  R                  La"  [	        S U 5       5      (       d   U5       eXS'   U[        R                  R                  La"  [	        S U 5       5      (       d   U5       eX#S'   U R
                  R                  SU R                   S3US9u  pEg)	z
:calls: `POST /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review-requests>`_
:param reviewers: list of strings
:param team_reviewers: list of strings
:rtype: None
c              3   B   #    U  H  n[        U[        5      v   M     g 7fr   r   r   .0elements     r   	<genexpr>4PullRequest.create_review_request.<locals>.<genexpr>C       IyGz'3//y   	reviewersc              3   B   #    U  H  n[        U[        5      v   M     g 7fr   r	  r
  s     r   r  r  F        8FW
7C((r  team_reviewersr   /requested_reviewersr   Nr  r   r   r   allr   r   r   r   r  r  r   r   r   s         r   create_review_request!PullRequest.create_review_request6  s     &F//666IyIIIT9TI+4K(!4!4!;!;; 8F     1?,-;;txxj 45_ < 
r   c                 h   [        5       nU[        R                  R                  La"  [	        S U 5       5      (       d   U5       eXS'   U[        R                  R                  La"  [	        S U 5       5      (       d   U5       eX#S'   U R
                  R                  SU R                   S3US9u  pEg)	z
:calls: `DELETE /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review-requests>`_
:param reviewers: list of strings
:param team_reviewers: list of strings
:rtype: None
c              3   B   #    U  H  n[        U[        5      v   M     g 7fr   r	  r
  s     r   r  4PullRequest.delete_review_request.<locals>.<genexpr>[  r  r  r  c              3   B   #    U  H  n[        U[        5      v   M     g 7fr   r	  r
  s     r   r  r  ^  r  r  r  DELETEr  r   Nr  r  s         r   delete_review_request!PullRequest.delete_review_requestN  s     &F//666IyIIIT9TI+4K(!4!4!;!;; 8F     1?,-;;
"67 < 
r   c                    U[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[
        5      (       d   U5       e[        5       nU[         R                  R                  La  XS'   U[         R                  R                  La  X&S'   U[         R                  R                  La  X6S'   U[         R                  R                  La  XFS'   U[         R                  R                  La  XVS'   U R                  R                  SU R                  US9u  pxU R                  U5        g)	z
:calls: `PATCH /repos/{owner}/{repo}/pulls/{number} <https://docs.github.com/en/rest/reference/pulls>`_
:param title: string
:param body: string
:param state: string
:param base: string
:param maintainer_can_modify: bool
:rtype: None
r
   r/   r   r)   r   PATCHr   N)r   r   r   r   r   r   r  r   r   r   _useAttributes)	r   r
   r/   r   r)   r   r   r   r   s	            r   editPullRequest.editf  s   " ++222j6L6LSeSLv**111Zc5J5JPDPJ++222j6L6LSeSLv**111Zc5J5JPDPJ$(;(;(B(BBj!4G
 G
 	! 	! 
 &++222',G$v**111&*F#++222',G$v**111&*F# (;(;(B(BB7L34;;TXX_ < 
 	D!r   c                 $    U R                  U5      $ )
:calls: `GET /repos/{owner}/{repo}/pulls/comments/{number} <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param id: integer
:rtype: :class:`github.PullRequestComment.PullRequestComment`
)get_review_commentr   rg   s     r   get_commentPullRequest.get_comment  s     &&r**r   c                    [        U[        5      (       d   U5       eU R                  R                  SU R	                  U R
                  5       SU 35      u  p#[        R                  R                  U R                  X#SS9$ )r(  r   r   Tr   )r   r   r   r   
_parentUrlr   r   r   r   rg   r   r   s       r   r)  PullRequest.get_review_comment  s{     "c""&B&";;doodhh/0
2$?
 ((;;OOWd < 
 	
r   c                 "    U R                  XUS9$ )a  
Warning: this only returns review comments. For normal conversation comments, use get_issue_comments.

:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param sort: string 'created' or 'updated'
:param direction: string 'asc' or 'desc'
:param since: datetime.datetime
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
sort	directionsince)get_review_comments)r   r3  r4  r5  s       r   get_commentsPullRequest.get_comments  s     ''Te'TTr   r2  c                   U[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d&  [        U[
        R
                  5      (       d   U5       e[        5       nU[         R                  R                  La  XS'   U[         R                  R                  La  X$S'   U[         R                  R                  La  UR                  S5      US'   [         R                  R                  [         R                  R                  U R                  U R                   S3U5      $ )aa  
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/comments <https://docs.github.com/en/rest/reference/pulls#review-comments>`_
:param sort: string 'created' or 'updated'
:param direction: string 'asc' or 'desc'
:param since: datetime.datetime
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
r3  r4  z%Y-%m-%dT%H:%M:%SZr5  r   )r   r   r   r   r   datetimer  strftimePaginatedListr   r   r   )r   r3  r4  r5  url_parameterss        r   r6  PullRequest.get_review_comments  sN    v**111Zc5J5JPDPJF//666*s;
 ;
 		 
 ++222j8$$7
 7
 		 
 v**111%)6"F//666*3;'++222&+nn5I&JN7###11%%88OOxxj	"	
 	
r   c                     [        U[        5      (       d   U5       e[        R                  R                  [        R                  R                  U R
                  U R                   SU S3S5      $ )a  
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/review/{id}/comments <https://docs.github.com/en/rest/reference/pulls#reviews>`_
:param id: integer
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment`
	/reviews/r   N)r   r   r   r<  r   r   r   r*  s     r   get_single_review_comments&PullRequest.get_single_review_comments  sb     "c""&B&"##11%%88OOxxj	"Y/	
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3S5      $ )z
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/commits <https://docs.github.com/en/rest/reference/pulls>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Commit.Commit`
z/commitsN)r   r<  r   r   r   r   s    r   get_commitsPullRequest.get_commits  s?    
 ##11MM  $//dhhZx3H$
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3S5      $ )z
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/files <https://docs.github.com/en/rest/reference/pulls>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.File.File`
z/filesN)r   r<  Filer   r   r   s    r   	get_filesPullRequest.get_files  s?    
 ##11KKdoo$((6/BD
 	
r   c                    [        U[        5      (       d   U5       eU R                  R                  SU R	                  U R
                  5       SU 35      u  p#[        R                  R                  U R                  X#SS9$ )z
:calls: `GET /repos/{owner}/{repo}/issues/comments/{id} <https://docs.github.com/en/rest/reference/issues#comments>`_
:param id: integer
:rtype: :class:`github.IssueComment.IssueComment`
r   r   Tr   )r   r   r   r   r.  rk   r   r   r/  s       r   get_issue_commentPullRequest.get_issue_comment  s{     "c""&B&";;doodnn56jE
 ""//OOWd 0 
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3S5      $ )z
:calls: `GET /repos/{owner}/{repo}/issues/{number}/comments <https://docs.github.com/en/rest/reference/issues#comments>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueComment.IssueComment`
r   N)r   r<  r   r   rk   r   s    r   get_issue_commentsPullRequest.get_issue_comments  sE    
 ##11,,OO~~i(	
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3SS[
        R                  0S9$ )z
:calls: `GET /repos/{owner}/{repo}/issues/{issue_number}/events <https://docs.github.com/en/rest/reference/issues#events>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.IssueEvent.IssueEvent`
z/eventsNAccept)r   )r   r<  
IssueEventr   rk   r   mediaTypeLockReasonPreviewr   s    r   get_issue_eventsPullRequest.get_issue_events  sX    
 ##11((OO~~g&v@@A 2 
 	
r   c                     [        U[        5      (       d   U5       eU R                  R                  SU R                   SU 35      u  p#[
        R                  R                  U R                  X#SS9$ )z
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/reviews/{id} <https://docs.github.com/en/rest/reference/pulls#reviews>`_
:param id: integer
:rtype: :class:`github.PullRequestReview.PullRequestReview`
r   r@  Tr   )r   r   r   r   r   r   r  r/  s       r   
get_reviewPullRequest.get_review   sr     "c""&B&";;xxj	"&
 ''99OOWd : 
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3S5      $ )z
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/reviews <https://docs.github.com/en/rest/reference/pulls#reviews>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestReview.PullRequestReview`
r   N)r   r<  r  r   r   r   s    r   get_reviewsPullRequest.get_reviews/  sD    
 ##11$$66OOxxj!	
 	
r   c           	      B   [         R                  R                  [         R                  R                  U R                  U R                   S3SSS9[         R                  R                  [         R
                  R
                  U R                  U R                   S3SSS94$ )a?  
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/requested_reviewers <https://docs.github.com/en/rest/reference/pulls#review-requests>`_
:rtype: tuple of :class:`github.PaginatedList.PaginatedList` of :class:`github.NamedUser.NamedUser` and of :class:`github.PaginatedList.PaginatedList` of :class:`github.Team.Team`
r  Nusers)	list_itemteams)r   r<  	NamedUserr   r   Teamr   s    r   get_review_requestsPullRequest.get_review_requests;  s       ..  **88*01! /    ..  88*01! / 
 	
r   c                     [         R                  R                  [         R                  R                  U R                  U R                   S3S5      $ )z
:calls: `GET /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
:rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.Label.Label`
/labelsN)r   r<  Labelr   rk   r   s    r   
get_labelsPullRequest.get_labelsQ  s@    
 ##11LLDNN3C71KT
 	
r   c                 ,   [        S U 5       5      (       d   U5       eU Vs/ s H:  n[        U[        R                  R                  5      (       a  UR                  OUPM<     nnU R
                  R                  SU R                   S3US9u  pEgs  snf )z
:calls: `POST /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
:param label: :class:`github.Label.Label` or string
:rtype: None
c              3   v   #    U  H/  n[        U[        R                  R                  [        45      v   M1     g 7fr   r   r   rf  r   r
  s     r   r  ,PullRequest.add_to_labels.<locals>.<genexpr>`  ,      
JPwJw!3!3S 9::&   79r   re  r   Nr  r   r   rf  namer   r   rk   r   ro   labelr   r   r   s         r   add_to_labelsPullRequest.add_to_labelsZ  s      
JP
 
 
 		 

  
 %UFLL,>,>??EJJUJ 	 
 ;;t~~&g.o < 
	
   ABc                 Z    U R                   R                  SU R                   S35      u  pg)z
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
:rtype: None
r  re  N)r   r   rk   r   s      r   delete_labelsPullRequest.delete_labelsk  s-    
 ;;(0
r   c                 t   [        U[        R                  R                  [        45      (       d   U5       e[        U[        R                  R                  5      (       a  UR                  nO[
        R                  R                  U5      nU R                  R                  SU R                   SU 35      u  p#g)z
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} <https://docs.github.com/en/rest/reference/issues#labels>`_
:param label: :class:`github.Label.Label` or string
:rtype: None
r  z/labels/N)r   r   rf  r   r   urllibparsequoter   r   rk   )r   rr  r   r   s       r   remove_from_labelsPullRequest.remove_from_labelst  s     %&,,"4"4c!:;;BUB;eV\\//00OOELL&&u-E;;(8
r   c                 ,   [        S U 5       5      (       d   U5       eU Vs/ s H:  n[        U[        R                  R                  5      (       a  UR                  OUPM<     nnU R
                  R                  SU R                   S3US9u  pEgs  snf )z
:calls: `PUT /repos/{owner}/{repo}/issues/{number}/labels <https://docs.github.com/en/rest/reference/issues#labels>`_
:param labels: list of :class:`github.Label.Label` or strings
:rtype: None
c              3   v   #    U  H/  n[        U[        R                  R                  [        45      v   M1     g 7fr   rk  r
  s     r   r  )PullRequest.set_labels.<locals>.<genexpr>  rm  rn  PUTre  r   Nro  rq  s         r   
set_labelsPullRequest.set_labels  s      
JP
 
 
 		 

  
 %UFLL,>,>??EJJUJ 	 
 ;;dnn%W-_ < 
	
ru  c                 d    U R                   R                  SU R                   S35      u  pnUS:H  $ )zz
:calls: `GET /repos/{owner}/{repo}/pulls/{number}/merge <https://docs.github.com/en/rest/reference/pulls>`_
:rtype: bool
r   /merge   )r   requestJsonr   )r   statusr   r   s       r   	is_mergedPullRequest.is_merged  s4    
 !% ; ;EdhhZvCV W}r   c                    U[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       eU[         R                  R                  L d  [        U[        5      (       d   U5       e[        5       nU[         R                  R                  La  XS'   U[         R                  R                  La  X%S'   U[         R                  R                  La  X5S'   U[         R                  R                  La  XES'   U R                  R                  SU R                   S3US9u  pg[         R                  R                  U R                  XgSS	9$ )
a  
:calls: `PUT /repos/{owner}/{repo}/pulls/{number}/merge <https://docs.github.com/en/rest/reference/pulls>`_
:param commit_message: string
:param commit_title: string
:param merge_method: string
:param sha: string
:rtype: :class:`github.PullRequestMergeStatus.PullRequestMergeStatus`
commit_messagecommit_titlemerge_methodr  r  r  r   Tr   )
r   r   r   r   r   r  r   r   r   PullRequestMergeStatus)r   r  r  r  r  r   r   r   s           r   mergePullRequest.merge  s    !4!4!;!;;zC@
 @
 		 
 v22999Z#>
 >
 		 
 v22999Z#>
 >
 		 
 f))000JsC4H4HM#MH&!4!4!;!;;0>,-v22999.:N+v22999.:N+f))000%(E";;dhhZv&o < 
 ,,CCOOWd D 
 	
r   c                 ^   [        S U 5       5      (       d   U5       eSU Vs/ s H:  n[        U[        R                  R                  5      (       a  UR                  OUPM<     sn0nU R
                  R                  SU R                   S3US9u  pEU R                  SUS   05        gs  snf )z
:calls: `POST /repos/{owner}/{repo}/issues/{number}/assignees <https://docs.github.com/en/rest/reference/issues#assignees>`_
:param assignees: list of :class:`github.NamedUser.NamedUser` or string
:rtype: None
c              3   v   #    U  H/  n[        U[        R                  R                  [        45      v   M1     g 7fr   r   r   r`  r   r
  s     r   r  /PullRequest.add_to_assignees.<locals>.<genexpr>  2      
$ w!1!1!;!;S ABB$rn  r$   r   
/assigneesr   N	r  r   r   r`  loginr   r   rk   r$  r   r$   r   r   r   r   s         r   add_to_assigneesPullRequest.add_to_assignees  s      
$
 
 
 	 	 

  !*	 !*H h(8(8(B(BCC  !*	
 ;;t~~&j1 < 
 	[${*;<=   AB*c                 ^   [        S U 5       5      (       d   U5       eSU Vs/ s H:  n[        U[        R                  R                  5      (       a  UR                  OUPM<     sn0nU R
                  R                  SU R                   S3US9u  pEU R                  SUS   05        gs  snf )z
:calls: `DELETE /repos/{owner}/{repo}/issues/{number}/assignees <https://docs.github.com/en/rest/reference/issues#assignees>`_
:param assignees: list of :class:`github.NamedUser.NamedUser` or string
:rtype: None
c              3   v   #    U  H/  n[        U[        R                  R                  [        45      v   M1     g 7fr   r  r
  s     r   r  4PullRequest.remove_from_assignees.<locals>.<genexpr>  r  rn  r$   r  r  r   Nr  r  s         r   remove_from_assignees!PullRequest.remove_from_assignees  s      
$
 
 
 	 	 

  !*	 !*H h(8(8(B(BCC  !*	
 ;;(
3? < 
 	[${*;<=r  c                 <   U[         R                  R                  L d  [        U[        5      (       d   U5       e0 nU[         R                  R                  La  XS'   U R
                  R                  SU R                   S3US[        R                  0S9u  p4nUS:H  $ )z
:calls `PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch <https://docs.github.com/en/rest/reference/pulls>`_
:param expected_head_sha: string
:rtype: bool
expected_head_shar  z/update-branchrQ  )r   r      )
r   r   r   r   r   r   r  r   r   updateBranchPreview)r   r  r   r  r   r   s         r   update_branchPullRequest.update_branch  s     !F$7$7$>$>>*sC
 C
 		 
 F$7$7$>$>>3D/0 $ ; ;xxj'!v99:	 !< !
 }r   c                 	   [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l	        [         R                  R                  U l
        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l        [         R                  R                  U l         [         R                  R                  U l!        [         R                  R                  U l"        [         R                  R                  U l#        [         R                  R                  U l$        [         R                  R                  U l%        [         R                  R                  U l&        [         R                  R                  U l'        [         R                  R                  U l(        [         R                  R                  U l)        [         R                  R                  U l*        [         R                  R                  U l+        g r   ),r   r   r   r   r   r#   r(   r.   r2   r7   r;   r?   rC   rG   rK   rP   rT   rY   r^   rb   rf   rj   rn   r   rs   rw   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   s    r   _initAttributesPullRequest._initAttributes	  s    --44,,33 --44((//
((//
$1188 --44,,33#0077++22"//66!..55 --44,,33))00((//
,,33&&-- --44**11&,&9&9&@&@#!'!4!4!;!; --44 & 3 3 : :**11 --44 --44 --44**11 --44!..55#)#6#6#=#=  & 3 3 : :$*$7$7$>$>!))00))00!..55''..	((//
$*$7$7$>$>! & 3 3 : :r   c                    SU;   a  U R                  US   5      U l        SU;   a2  U R                  [        R                  R                  US   5      U l        SU;   a3  U R                  [        R                  R                  US   5      U l        OoSU;   ai  US   b4  U R                  [        R                  R                  US   /5      U l        O/U R                  [        R                  R                  / 5      U l        SU;   a2  U R                  [        R                  R                  US   5      U l	        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        S	U;   a  U R                  US	   5      U l        S
U;   a  U R                  US
   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R-                  US   5      U l        SU;   a2  U R                  [        R                  R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a2  U R                  [        R8                  R8                  US   5      U l        SU;   a  U R-                  US   5      U l        SU;   a  U R                  US   5      U l        SU;   a  U R-                  US   5      U l         SU;   a  U R                  US   5      U l!        SU;   a  U R-                  US   5      U l"        SU;   a  U R                  US   5      U l#        SU;   a2  U R                  [        R                  R                  US   5      U l$        SU;   a2  U R                  [        RJ                  RJ                  US   5      U l&        SU;   a  U R                  US   5      U l'        SU;   a  U R                  US   5      U l(        SU;   a  U R-                  US   5      U l)        S U;   a  U R                  US    5      U l*        S!U;   a  U R                  US!   5      U l+        S"U;   a  U R                  US"   5      U l,        S#U;   a  U R                  US#   5      U l-        S$U;   a  U R                  US$   5      U l.        S%U;   a  U R                  US%   5      U l/        S&U;   a  U R                  US&   5      U l0        S'U;   a2  U R                  [        R                  R                  US'   5      U l1        S(U;   a2  U R                  [        R                  R                  US(   5      U l2        S)U;   a3  U R                  [        Rf                  Rf                  US)   5      U l4        g g )*Nr   r   r$   r)   r/   r3   r8   r<   r@   rD   rH   rL   rQ   rU   rZ   r_   rc   rg   rk   ro   r   rt   rx   r|   r   r   r   r   r	   r   r   r   r   r   r   r
   r   r   r   r   r   )5_makeIntAttributer   _makeClassAttributer   r`  r   _makeListOfClassesAttributer#   PullRequestPartr(   _makeStringAttributer.   r2   _makeDatetimeAttributer7   r;   r?   rC   rG   rK   rP   rT   _makeBoolAttributerY   r^   rb   rf   rj   rf  rn   r   rs   rw   r{   r   r   r   	Milestoner   r   r   r   r   r   r   r   r   r   r   r   r   ra  r   )r   
attributess     r   r$  PullRequest._useAttributes4  sO   *$"44Z5LMDO#!55  **Jz,BDN *$">>  **J{,CDO :%*%1"&"B"B$$..J1G0H# #'"B"B$$..# Z11&&66
68JDJ Z22:f3EFDJj("&"8"8O9T"UD*$"99*[:QRDO#!33Jz4JKDNZ'!%!:!::n;U!VD
" 22:i3HIDMJ& $ 9 9*]:S TD:%#:::l;STD*$"44Z5LMDO#!66z*7MNDNj 11*W2EFDKZ11&&66
68JDJ #!66z*7MNDN:--j.>?DH*$"77
;8OPDOz!;;""Jx$8DL #j0*.*A*A23+D' +%)%>%>-.&D" *$"55j6MNDO
*$($=$=,-%D! z!22:h3GHDL*$"99*[:QRDO*$"66  **J{,CDO *$"66  **J{,CDO z!11*X2FGDL*$"77
;8OPDO:%#66z,7OPD:-'+'@'@/0(D$ 
*$($:$:,-%D! !J.(,(A(A01)D% j 33Jw4GHDKj 33Jw4GHDK:%#:::l;STDJ11*U2CDDIZ11  **Jv,>DJ !J.(,(H(H  **J7L,M)D% 
*$($D$D  *->"?%D! +r   ))r   r   r#   r(   r.   r2   r7   r;   r?   rC   rG   rK   rP   rT   rY   r^   rb   rf   rj   rn   r   rs   rw   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   N)V__name__
__module____qualname____firstlineno____doc__r   propertyr   r   r$   r)   r/   r3   r8   r<   r@   rD   rH   rL   rQ   rU   rZ   r_   rc   rg   rk   ro   rt   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   r   r   r   r  r  r   r%  r+  r)  r7  r6  rA  rD  rH  rK  rN  rT  rW  rZ  rb  rg  rs  rw  r}  r  r  r  r  r  r  r  r$  __static_attributes__ r   r   r   r   =   s   

 % % $ $ % %         ) ) % % $ $ ( ( # # ' ' & & % % $ $ ! !     $ $   % % " " , , % % + + " " % % % % % % " " % % & & . . + + / / ! ! ! ! & & / / + +       1 1R	H"   ''  ''&&--&&--''..((//J
X
&
& ""))  ''!!(($$++(
X %%,,**11
4 %%,,**11
4 !!((  ''!!((  ''$1188&"P+
    ''%%,,!!((	U*   ''%%,,!!((!
F










,

"


" **11((//((//&&'
R>0>0 /5.A.A.H.H ();V{r   r   )r:  urllib.parserz  github.Commitr   github.Filegithub.GithubObjectgithub.IssueCommentgithub.NamedUsergithub.PaginatedListgithub.PullRequestCommentgithub.PullRequestMergeStatusgithub.PullRequestPartgithub.PullRequestReviewgithub.Team r   r   CompletableGithubObjectr   r  r   r   <module>r     sL   V           $    r&%%== rr   