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
-
comments¶ Type: integer
-
comments_url¶ Type: string
-
commits¶ Type: integer
-
commits_url¶ Type: string
-
created_at¶ Type: 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
-
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
-
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, path, position)¶ Calls: Parameters: - body – string
- commit –
github.Commit.Commit - path – string
- position – integer
Return type:
-
create_review_comment(body, commit, path, line=NotSet, side=NotSet, start_line=NotSet, start_side=NotSet, in_reply_to=NotSet, subject_type=NotSet, as_suggestion=False)¶ Calls: Parameters: - body – string
- commit –
github.Commit.Commit - path – string
- line – integer
- side – string
- start_line – integer
- start_side – string
- in_reply_to – integer
- subject_type – string
- as_suggestion – bool interprets the body as suggested code and modifies it accordingly
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(sort=NotSet, direction=NotSet, since=NotSet)¶ Warning: this only returns review comments. For normal conversation comments, use get_issue_comments.
Calls: Parameters: - sort – string ‘created’ or ‘updated’
- direction – string ‘asc’ or ‘desc’
- since – datetime
Return type: github.PaginatedList.PaginatedListofgithub.PullRequestComment.PullRequestComment
-
get_review_comments(*, sort=NotSet, direction=NotSet, since=NotSet)¶ Calls: Parameters: - sort – string ‘created’ or ‘updated’
- direction – string ‘asc’ or ‘desc’
- since – datetime
Return type: github.PaginatedList.PaginatedListofgithub.PullRequestComment.PullRequestComment
-
get_single_review_comments(id)¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/review/{id}/comments Parameters: id – integer Return type: github.PaginatedList.PaginatedListofgithub.PullRequestComment.PullRequestComment
-
get_commits()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/commits Return type: github.PaginatedList.PaginatedListofgithub.Commit.Commit
-
get_files()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/files Return type: github.PaginatedList.PaginatedListofgithub.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.PaginatedListofgithub.IssueComment.IssueComment
-
get_issue_events()¶ Calls: GET /repos/{owner}/{repo}/issues/{issue_number}/events Return type: github.PaginatedList.PaginatedListofgithub.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.PaginatedListofgithub.PullRequestReview.PullRequestReview
-
get_review_requests()¶ Calls: GET /repos/{owner}/{repo}/pulls/{number}/requested_reviewers Return type: tuple of github.PaginatedList.PaginatedListofgithub.NamedUser.NamedUserand ofgithub.PaginatedList.PaginatedListofgithub.Team.Team
-
get_labels()¶ Calls: GET /repos/{owner}/{repo}/issues/{number}/labels Return type: github.PaginatedList.PaginatedListofgithub.Label.Label
-
add_to_labels(*labels)¶ Calls: POST /repos/{owner}/{repo}/issues/{number}/labels Parameters: label – github.Label.Labelor 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.Labelor stringReturn type: None
-
set_labels(*labels)¶ Calls: PUT /repos/{owner}/{repo}/issues/{number}/labels Parameters: labels – list of github.Label.Labelor 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.NamedUseror stringReturn type: None
-
remove_from_assignees(*assignees)¶ Calls: DELETE /repos/{owner}/{repo}/issues/{number}/assignees Parameters: assignees – list of github.NamedUser.NamedUseror 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
-