PullRequest

class github.PullRequest.PullRequest

This class represents PullRequests. The reference can be found here http://developer.github.com/v3/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
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
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
as_issue()
Calls:GET /repos/:owner/:repo/issues/:number
Return type:github.Issue.Issue
create_comment(body, commit_id, path, position)
Calls:

POST /repos/:owner/:repo/pulls/:number/comments

Parameters:
Return type:

github.PullRequestComment.PullRequestComment

create_review_comment(body, commit_id, path, position)
Calls:

POST /repos/:owner/:repo/pulls/:number/comments

Parameters:
Return type:

github.PullRequestComment.PullRequestComment

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:

POST /repos/:owner/:repo/pulls/:number/reviews

Parameters:
  • commit – github.Commit.Commit
  • body – string
  • event – string
  • comments – list
Return type:

github.PullRequestReview.PullRequestReview

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)
Calls:

PATCH /repos/:owner/:repo/pulls/:number

Parameters:
  • title – string
  • body – string
  • state – string
  • base – string
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 of github.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 of github.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 of github.PullRequestComment.PullRequestComment
get_commits()
Calls:GET /repos/:owner/:repo/pulls/:number/commits
Return type:github.PaginatedList.PaginatedList of github.Commit.Commit
get_files()
Calls:GET /repos/:owner/:repo/pulls/:number/files
Return type:github.PaginatedList.PaginatedList of github.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 of github.IssueComment.IssueComment
get_issue_events()
Calls:GET /repos/:owner/:repo/issues/:issue_number/events
Return type:github.PaginatedList.PaginatedList of github.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 of github.PullRequestReview.PullRequestReview
get_review_requests()
Calls:GET /repos/:owner/:repo/pulls/:number/requested_reviewers
Return type:tuple of github.PaginatedList.PaginatedList of github.NamedUser.NamedUser and of github.PaginatedList.PaginatedList of github.Team.Team
get_labels()
Calls:GET /repos/:owner/:repo/issues/:number/labels
Return type:github.PaginatedList.PaginatedList of github.Label.Label
add_to_labels(*labels)
Calls:POST /repos/:owner/:repo/issues/:number/labels
Parameters:labelgithub.Label.Label or string
Return 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:labelgithub.Label.Label or string
Return type:None
set_labels(*labels)
Calls:PUT /repos/:owner/:repo/issues/:number/labels
Parameters:labels – list of github.Label.Label or strings
Return 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:PUT /repos/:owner/:repo/pulls/:number/merge
Parameters:commit_message – string
Return type:github.PullRequestMergeStatus.PullRequestMergeStatus