View Source GitHub.Pulls (GitHub REST API Client v0.0.9)

Provides API endpoints related to pulls

Link to this section Summary

Functions

Check if a pull request has been merged

Create a review comment for a pull request

Delete a review comment for a pull request

Get a review comment for a pull request

List pull requests

Get all requested reviewers for a pull request

List review comments on a pull request

List review comments in a repository

List reviews for a pull request

Remove requested reviewers from a pull request

Update a review comment for a pull request

Link to this section Functions

Link to this function

check_if_merged(owner, repo, pull_number, opts \\ [])

View Source
@spec check_if_merged(String.t(), String.t(), integer(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Check if a pull request has been merged

resources

Resources

Link to this function

create(owner, repo, body, opts \\ [])

View Source
@spec create(String.t(), String.t(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.t()} | {:error, GitHub.Error.t()}

Create a pull request

resources

Resources

Link to this function

create_reply_for_review_comment(owner, repo, pull_number, comment_id, body, opts \\ [])

View Source
@spec create_reply_for_review_comment(
  String.t(),
  String.t(),
  integer(),
  integer(),
  map(),
  keyword()
) ::
  {:ok, GitHub.PullRequest.ReviewComment.t()} | {:error, GitHub.Error.t()}

Create a reply for a review comment

resources

Resources

Link to this function

create_review(owner, repo, pull_number, body, opts \\ [])

View Source
@spec create_review(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.Review.t()} | {:error, GitHub.Error.t()}

Create a review for a pull request

resources

Resources

Link to this function

create_review_comment(owner, repo, pull_number, body, opts \\ [])

View Source
@spec create_review_comment(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.ReviewComment.t()} | {:error, GitHub.Error.t()}

Create a review comment for a pull request

resources

Resources

Link to this function

delete_pending_review(owner, repo, pull_number, review_id, opts \\ [])

View Source
@spec delete_pending_review(String.t(), String.t(), integer(), integer(), keyword()) ::
  {:ok, GitHub.PullRequest.Review.t()} | {:error, GitHub.Error.t()}

Delete a pending review for a pull request

resources

Resources

Link to this function

delete_review_comment(owner, repo, comment_id, opts \\ [])

View Source
@spec delete_review_comment(String.t(), String.t(), integer(), keyword()) ::
  :ok | {:error, GitHub.Error.t()}

Delete a review comment for a pull request

resources

Resources

Link to this function

dismiss_review(owner, repo, pull_number, review_id, body, opts \\ [])

View Source
@spec dismiss_review(String.t(), String.t(), integer(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.Review.t()} | {:error, GitHub.Error.t()}

Dismiss a review for a pull request

resources

Resources

Link to this function

get(owner, repo, pull_number, opts \\ [])

View Source
@spec get(String.t(), String.t(), integer(), keyword()) ::
  {:ok, GitHub.PullRequest.t()} | {:error, GitHub.Error.t()}

Get a pull request

resources

Resources

Link to this function

get_review(owner, repo, pull_number, review_id, opts \\ [])

View Source
@spec get_review(String.t(), String.t(), integer(), integer(), keyword()) ::
  {:ok, GitHub.PullRequest.Review.t()} | {:error, GitHub.Error.t()}

Get a review for a pull request

resources

Resources

Link to this function

get_review_comment(owner, repo, comment_id, opts \\ [])

View Source
@spec get_review_comment(String.t(), String.t(), integer(), keyword()) ::
  {:ok, GitHub.PullRequest.ReviewComment.t()} | {:error, GitHub.Error.t()}

Get a review comment for a pull request

resources

Resources

Link to this function

list(owner, repo, opts \\ [])

View Source
@spec list(String.t(), String.t(), keyword()) ::
  {:ok, [GitHub.PullRequest.simple()]} | {:error, GitHub.Error.t()}

List pull requests

options

Options

  • state (String.t()): Either open, closed, or all to filter by state.
  • head (String.t()): Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name. For example: github:new-script-format or octocat:test-branch.
  • base (String.t()): Filter pulls by base branch name. Example: gh-pages.
  • sort (String.t()): What to sort results by. popularity will sort by the number of comments. long-running will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month.
  • direction (String.t()): The direction of the sort. Default: desc when sort is created or sort is not specified, otherwise asc.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_comments_for_review(owner, repo, pull_number, review_id, opts \\ [])

View Source
@spec list_comments_for_review(
  String.t(),
  String.t(),
  integer(),
  integer(),
  keyword()
) ::
  {:ok, [GitHub.ReviewComment.t()]} | {:error, GitHub.Error.t()}

List comments for a pull request review

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_commits(owner, repo, pull_number, opts \\ [])

View Source
@spec list_commits(String.t(), String.t(), integer(), keyword()) ::
  {:ok, [GitHub.Commit.t()]} | {:error, GitHub.Error.t()}

List commits on a pull request

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_files(owner, repo, pull_number, opts \\ [])

View Source
@spec list_files(String.t(), String.t(), integer(), keyword()) ::
  {:ok, [GitHub.DiffEntry.t()]} | {:error, GitHub.Error.t()}

List pull requests files

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_requested_reviewers(owner, repo, pull_number, opts \\ [])

View Source
@spec list_requested_reviewers(String.t(), String.t(), integer(), keyword()) ::
  {:ok, GitHub.PullRequest.ReviewRequest.t()} | {:error, GitHub.Error.t()}

Get all requested reviewers for a pull request

resources

Resources

Link to this function

list_review_comments(owner, repo, pull_number, opts \\ [])

View Source
@spec list_review_comments(String.t(), String.t(), integer(), keyword()) ::
  {:ok, [GitHub.PullRequest.ReviewComment.t()]} | {:error, GitHub.Error.t()}

List review comments on a pull request

options

Options

  • sort (String.t()): The property to sort the results by.
  • direction (String.t()): The direction to sort results. Ignored without sort parameter.
  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_review_comments_for_repo(owner, repo, opts \\ [])

View Source
@spec list_review_comments_for_repo(String.t(), String.t(), keyword()) ::
  {:ok, [GitHub.PullRequest.ReviewComment.t()]} | {:error, GitHub.Error.t()}

List review comments in a repository

options

Options

  • sort (String.t()):
  • direction (String.t()): The direction to sort results. Ignored without sort parameter.
  • since (String.t()): Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

list_reviews(owner, repo, pull_number, opts \\ [])

View Source
@spec list_reviews(String.t(), String.t(), integer(), keyword()) ::
  {:ok, [GitHub.PullRequest.Review.t()]} | {:error, GitHub.Error.t()}

List reviews for a pull request

options

Options

  • per_page (integer): The number of results per page (max 100).
  • page (integer): Page number of the results to fetch.

resources

Resources

Link to this function

merge(owner, repo, pull_number, body, opts \\ [])

View Source
@spec merge(String.t(), String.t(), integer(), map() | nil, keyword()) ::
  {:ok, GitHub.PullRequest.MergeResult.t()} | {:error, GitHub.Error.t()}

Merge a pull request

resources

Resources

Link to this function

remove_requested_reviewers(owner, repo, pull_number, body, opts \\ [])

View Source
@spec remove_requested_reviewers(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.simple()} | {:error, GitHub.Error.t()}

Remove requested reviewers from a pull request

resources

Resources

Link to this function

request_reviewers(owner, repo, pull_number, body, opts \\ [])

View Source
@spec request_reviewers(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.simple()} | {:error, GitHub.Error.t()}

Request reviewers for a pull request

resources

Resources

Link to this function

submit_review(owner, repo, pull_number, review_id, body, opts \\ [])

View Source
@spec submit_review(String.t(), String.t(), integer(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.Review.t()} | {:error, GitHub.Error.t()}

Submit a review for a pull request

resources

Resources

Link to this function

update(owner, repo, pull_number, body, opts \\ [])

View Source
@spec update(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.t()} | {:error, GitHub.Error.t()}

Update a pull request

resources

Resources

Link to this function

update_branch(owner, repo, pull_number, body, opts \\ [])

View Source
@spec update_branch(String.t(), String.t(), integer(), map() | nil, keyword()) ::
  {:ok, map()} | {:error, GitHub.Error.t()}

Update a pull request branch

resources

Resources

Link to this function

update_review(owner, repo, pull_number, review_id, body, opts \\ [])

View Source
@spec update_review(String.t(), String.t(), integer(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.Review.t()} | {:error, GitHub.Error.t()}

Update a review for a pull request

resources

Resources

Link to this function

update_review_comment(owner, repo, comment_id, body, opts \\ [])

View Source
@spec update_review_comment(String.t(), String.t(), integer(), map(), keyword()) ::
  {:ok, GitHub.PullRequest.ReviewComment.t()} | {:error, GitHub.Error.t()}

Update a review comment for a pull request

resources

Resources