PullRequest¶
-
class
github.PullRequest.
PullRequest
¶ This class represents PullRequests. The reference can be found here https://docs.github.com/en/rest/reference/pulls
-
additions
¶ Type: integer
-
assignee
¶ Type: github.NamedUser.NamedUser
-
assignees
¶ Type: list of github.NamedUser.NamedUser
-
base
¶ Type: github.PullRequestPart.PullRequestPart
-
body
¶ Type: string
-
changed_files
¶ Type: integer
-
closed_at
¶ Type: datetime.datetime
-
comments
¶ Type: integer
-
comments_url
¶ Type: string
-
commits
¶ Type: integer
-
commits_url
¶ Type: string
-
created_at
¶ Type: datetime.datetime
-
deletions
¶ Type: integer
-
diff_url
¶ Type: string
-
draft
¶ Type: bool
-
head
¶ Type: github.PullRequestPart.PullRequestPart
-
html_url
¶ Type: string
-
id
¶ Type: integer
-
issue_url
¶ Type: string
-
labels
¶ Type: list of github.Label.Label
-
merge_commit_sha
¶ Type: string
-
mergeable
¶ Type: bool
-
mergeable_state
¶ Type: string
-
merged
¶ Type: bool
-
merged_at
¶ Type: datetime.datetime
-
merged_by
¶ Type: github.NamedUser.NamedUser
-
milestone
¶ Type: github.Milestone.Milestone
-
number
¶ Type: integer
-
patch_url
¶ Type: string
-
rebaseable
¶ Type: bool
-
review_comment_url
¶ Type: string
-
review_comments
¶ Type: integer
-
review_comments_url
¶ Type: string
-
state
¶ Type: string
-
title
¶ Type: string
-
updated_at
¶ Type: datetime.datetime
-
url
¶ Type: string
-
user
¶ Type: github.NamedUser.NamedUser
-
maintainer_can_modify
¶ Type: bool
-
as_issue
()¶ Calls: GET /repos/{owner}/{repo}/issues/{number} Return type: github.Issue.Issue
-
create_comment
(body, commit_id, path, position)¶ Calls: Parameters: - body – string
- commit_id –
github.Commit.Commit
- path – string
- position – integer
Return type:
-
create_review_comment
(body, commit_id, path, position)¶ Calls: Parameters: - body – string
- commit_id –
github.Commit.Commit
- path – string
- position – integer
Return type:
-
create_review_comment_reply
(comment_id, body)¶ Calls: POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies
Parameters: - comment_id – int
- body – string
Return type:
-
create_issue_comment
(body)¶ Calls: POST /repos/{owner}/{repo}/issues/{number}/comments Parameters: body – string Return type: github.IssueComment.IssueComment
-
create_review
(commit=NotSet, body=NotSet, event=NotSet, comments=NotSet)¶ Calls: Parameters: - commit – github.Commit.Commit
- body – string
- event – string
- comments – list
Return type:
-
create_review_request
(reviewers=NotSet, team_reviewers=NotSet)¶ Calls: POST /repos/{owner}/{repo}/pulls/{number}/requested_reviewers
Parameters: - reviewers – list of strings
- team_reviewers – list of strings
Return type: None
-
delete_review_request
(reviewers=NotSet, team_reviewers=NotSet)¶ Calls: DELETE /repos/{owner}/{repo}/pulls/{number}/requested_reviewers
Parameters: - reviewers – list of strings
- team_reviewers – list of strings
Return type: None
-
edit
(title=NotSet, body=NotSet, state=NotSet, base=NotSet, maintainer_can_modify=NotSet)¶ Calls: Parameters: - title – string
- body – string
- state – string
- base – string
- maintainer_can_modify – bool
Return type: None
-
get_comment
(id)¶ Calls: GET /repos/{owner}/{repo}/pulls/comments/{number} Parameters: id – integer Return type: github.PullRequestComment.PullRequestComment
-
get_review_comment
(id)¶ Calls: GET /repos/{owner}/{repo}/pulls/comments/{number} Parameters: id – integer Return type: github.PullRequestComment.PullRequestComment
-
get_comments
()¶ Warning: this only returns review comments. For normal conversation comments, use get_issue_comments.
Calls: GET /repos/{owner}/{repo}/pulls/{number}/comments Return type: github.PaginatedList.PaginatedList
ofgithub.PullRequestComment.PullRequestComment
-
get_review_comments
(since=NotSet)¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/comments Parameters: since – datetime.datetime format YYYY-MM-DDTHH:MM:SSZ Return type: github.PaginatedList.PaginatedList
ofgithub.PullRequestComment.PullRequestComment
-
get_single_review_comments
(id)¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/review/{id}/comments Parameters: id – integer Return type: github.PaginatedList.PaginatedList
ofgithub.PullRequestComment.PullRequestComment
-
get_commits
()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/commits Return type: github.PaginatedList.PaginatedList
ofgithub.Commit.Commit
-
get_files
()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/files Return type: github.PaginatedList.PaginatedList
ofgithub.File.File
-
get_issue_comment
(id)¶ Calls: GET /repos/{owner}/{repo}/issues/comments/{id} Parameters: id – integer Return type: github.IssueComment.IssueComment
-
get_issue_comments
()¶ Calls: GET /repos/{owner}/{repo}/issues/{number}/comments Return type: github.PaginatedList.PaginatedList
ofgithub.IssueComment.IssueComment
-
get_issue_events
()¶ Calls: GET /repos/{owner}/{repo}/issues/{issue_number}/events Return type: github.PaginatedList.PaginatedList
ofgithub.IssueEvent.IssueEvent
-
get_review
(id)¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/reviews/{id} Parameters: id – integer Return type: github.PullRequestReview.PullRequestReview
-
get_reviews
()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/reviews Return type: github.PaginatedList.PaginatedList
ofgithub.PullRequestReview.PullRequestReview
-
get_review_requests
()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/requested_reviewers Return type: tuple of github.PaginatedList.PaginatedList
ofgithub.NamedUser.NamedUser
and ofgithub.PaginatedList.PaginatedList
ofgithub.Team.Team
-
get_labels
()¶ Calls: GET /repos/{owner}/{repo}/issues/{number}/labels Return type: github.PaginatedList.PaginatedList
ofgithub.Label.Label
-
add_to_labels
(*labels)¶ Calls: POST /repos/{owner}/{repo}/issues/{number}/labels Parameters: label – github.Label.Label
or stringReturn type: None
-
delete_labels
()¶ Calls: DELETE /repos/{owner}/{repo}/issues/{number}/labels Return type: None
-
remove_from_labels
(label)¶ Calls: DELETE /repos/{owner}/{repo}/issues/{number}/labels/{name} Parameters: label – github.Label.Label
or stringReturn type: None
-
set_labels
(*labels)¶ Calls: PUT /repos/{owner}/{repo}/issues/{number}/labels Parameters: labels – list of github.Label.Label
or stringsReturn type: None
-
is_merged
()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/merge Return type: bool
-
merge
(commit_message=NotSet, commit_title=NotSet, merge_method=NotSet, sha=NotSet)¶ Calls: Parameters: - commit_message – string
- commit_title – string
- merge_method – string
- sha – string
Return type:
-
add_to_assignees
(*assignees)¶ Calls: POST /repos/{owner}/{repo}/issues/{number}/assignees Parameters: assignees – list of github.NamedUser.NamedUser
or stringReturn type: None
-
remove_from_assignees
(*assignees)¶ Calls: DELETE /repos/{owner}/{repo}/issues/{number}/assignees Parameters: assignees – list of github.NamedUser.NamedUser
or stringReturn type: None
-
update_branch
(expected_head_sha=NotSet)¶ :calls PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch :param expected_head_sha: string :rtype: bool
-