module Octokit::Client::PullRequests
Direct including types
Defined in:
octokit/client/pull_requests.crConstant Summary
-
DEFAULTS =
{state: "open", sort: "created", direction: "desc"}
-
The default options for listing pull requests
-
DIRECTIONS =
["asc", "desc"]
-
Valid directions in which to sort PullRequests
-
FILTERS =
["all", "assigned", "created", "mentioned", "subscribed"]
-
Valid filters for PullRequests
-
SORTS =
["created", "updated", "comments"]
-
Valid sort for PullRequests
-
STATES =
["all", "open", "closed"]
-
Valid states for PullRequests
Instance Method Summary
-
#close_pull_request(repo : String, number : Int64, **options)
Close a pull request
-
#create_pull_request(repo : String, base : String, head : String, title : String, body : String, **options)
Create a pull request
-
#create_pull_request_comment(repo : String, number : Int64, body : String, commit_id : String, path : String, line : Int32, **options)
Create a comment on a pull request
-
#create_pull_request_comment_reply(repo : String, number : Int64, body : String, in_reply_to : Int64, **options)
Create a reply to a comment on a pull request
-
#create_pull_request_for_issue(repo : String, base : String, head : String, issue : Int32, **options)
Create a pull request for an issue
-
#delete_pull_request_comment(repo : String, comment_id : Int64, **options)
Delete a comment on a pull request
-
#merge_pull_request(repo : String, number : Int64, commit_message : String, **options)
Merge a pull request
-
#pull_merged?(repo : String, number : Int64, **options) : Bool
Check if a pull request has been merged
-
#pull_request_comment(repo : String, comment_id : Int64, **options)
Get a single comment on a pull request
-
#pull_request_comments(repo : String, number : Int64, **options) : Paginator(PullRequestComment)
List comments on a pull request
-
#pull_request_commits(repo : String, number : Int64, **options) : Paginator(Commit)
List commits on a pull request
-
#pull_request_files(repo : String, number : Int64, **options) : Paginator(CommitFile)
List files on a pull request
-
#pull_requests(repo : String, **options) : Paginator(PullRequest)
List pull requests for a repository
-
#pull_requests_comments(repo : String, number : Int64, **options) : Paginator(PullRequestComment)
List review comments on a pull request
-
#update_pull_request(repo : String, number : Int64, **options)
Update a pull request
-
#update_pull_request_branch(repo : String, number : Int64, **options) : Bool
Update a pull request branch
-
#update_pull_request_comment(repo : String, comment_id : Int64, body : String, **options)
Update a comment on a pull request
Instance Method Detail
Close a pull request
See Also:
Examples:
Octokit.close_pull_request("crystal-lang/crystal", 123)
Create a pull request
See Also:
Examples:
Octokit.create_pull_request("crystal-lang/crystal", "master", "new-branch", "Title", "Body")
Create a comment on a pull request
This method applies to pull request review comments. Pull request review comments are NOT the same as standard comments left on PRs - those are issue comments.
See Also:
-
https://developer.github.com/v3/pulls/comments/#create-a-comment
-
repo (String) — A GitHub repository
-
number (Integer) — Pull request number
-
body (String) — Comment content
-
commit_id (String) — Sha of the commit to comment on
-
path (String) — Relative path of the file to comment on
-
line (Integer) — Line number in the diff to comment on
-
side (String) — Side of the diff that the comment applies to (LEFT or RIGHT)
-
start_line (Integer) — Start line for multi-line comments
-
start_side (String) — Start side for multi-line comments (LEFT or RIGHT)
-
in_reply_to (Integer) — ID of the review comment to reply to
-
subject_type (String) — Level at which the comment is targeted (line or file)
Examples:
Octokit.create_pull_request_comment("crystal-lang/crystal", 123, "Comment body", "commit_id", "path/to/file.txt", 1, side: "RIGHT")
Create a reply to a comment on a pull request
See Also:
Examples:
Octokit.create_pull_request_comment_reply("crystal-lang/crystal", 123, "Comment body", 456)
Create a pull request for an issue
See Also:
Examples:
Octokit.create_pull_request_for_issue("crystal-lang/crystal", "master", "new-branch", 123)
Delete a comment on a pull request
See Also:
Examples:
Octokit.delete_pull_request_comment("crystal-lang/crystal", 456)
Merge a pull request
See Also:
Examples:
Octokit.merge_pull_request("crystal-lang/crystal", 123, "Commit message")
Check if a pull request has been merged
See Also:
Examples:
Octokit.pull_merged?("crystal-lang/crystal", 123)
Get a single comment on a pull request
This method applies to pull request review comments. Pull request review comments are NOT the same as standard comments left on PRs - those are issue comments.
See Also:
Examples:
Octokit.pull_request_comment("crystal-lang/crystal", 456)
List comments on a pull request
This method applies to pull request review comments. Pull request review comments are NOT the same as standard comments left on PRs - those are issue comments.
See Also:
Examples:
Octokit.pull_request_comments("crystal-lang/crystal", 123)
List commits on a pull request
See Also:
Examples:
Octokit.pull_request_commits("crystal-lang/crystal", 123)
List files on a pull request
See Also:
Examples:
Octokit.pull_request_files("crystal-lang/crystal", 123)
List pull requests for a repository
See Also:
Examples:
Octokit.pull_requests("crystal-lang/crystal")
Octokit.pull_requests("crystal-lang/crystal", state: "closed")
List review comments on a pull request
This method applies to pull request review comments. Pull request review comments are NOT the same as standard comments left on PRs - those are issue comments.
See Also:
Examples:
Octokit.pull_requests_comments("crystal-lang/crystal", 123)
Update a pull request
See Also:
Examples:
Octokit.update_pull_request("crystal-lang/crystal", 123, title: "New Title", body: "New Body")
Update a pull request branch
See Also:
Examples:
Octokit.update_pull_request_branch("crystal-lang/crystal", 123)
Update a comment on a pull request
See Also:
Examples:
Octokit.update_pull_request_comment("crystal-lang/crystal", 456, "New comment body")