Tentacat v0.7.2 Tentacat.Pulls

Summary

Functions

create(owner, repo, body, client)

Specs

create(binary, binary, list | map, Tentacat.Client.t) :: Tentacat.response

Create a pull request

Pull Request body example:

%{
  "title" => "Amazing new feature",
  "body"  => "Please pull this in!",
  "head"  => "octocat:new-feature",
  "base"  => "master"
 }

Alternative input (using an existing issue):

%{
  "issue" => "5",
  "head"  => "octocat:new-feature",
  "base"  => "master"
 }

Example

Tentacat.Pulls.create "elixir-lang", "elixir", body, client

More info at: https://developer.github.com/v3/pulls/#create-a-pull-request

filter(owner, repo, filters, client \\ %Tentacat.Client{})

Specs

filter(binary, binary, map, Tentacat.Client.t) :: Tentacat.response

Filter pull requests

Example

Tentacat.Pulls.filter "elixir-lang", "elixir", %{state: "open"}
Tentacat.Pulls.filter "elixir-lang", "elixir", %{state: "open"}, client

More info at: https://developer.github.com/v3/pulls/#parameters

find(owner, repo, number, client \\ %Tentacat.Client{})

Specs

find(binary, binary, binary | integer, Tentacat.Client.t) :: Tentacat.response

Get a single pull request

Example

Tentacat.Pulls.find "elixir-lang", "elixir", "2974"
Tentacat.Pulls.find "elixir-lang", "elixir", "2974", client

More info at: https://developer.github.com/v3/pulls/#get-a-single-pull-request

has_been_merged(owner, repo, number, client)

Specs

has_been_merged(binary, binary, binary | integer, Tentacat.Client.t) :: Tentacat.response

Get if a pull request has been merged

Example

Tentacat.Pulls.has_been_merged "elixir-lang", "elixir", "4876", client

More info at: https://developer.github.com/v3/pulls/#get-if-a-pull-request-has-been-merged

list(owner, repo, client \\ %Tentacat.Client{})

Specs

list(binary, binary, Tentacat.Client.t) :: Tentacat.response

List pull requests

Example

Tentacat.Pulls.list "elixir-lang", "elixir"
Tentacat.Pulls.list "elixir-lang", "elixir", client

More info at: https://developer.github.com/v3/pulls/#list-pull-requests

merge(owner, repo, number, body, client)

Specs

merge(binary, binary, binary | integer, list | map, Tentacat.Client.t) :: Tentacat.response

Merge a pull request (Merge Button)

Pull Request Merge body example:

%{
  "commit_message" => "not the default commit_message",
  "sha"  => "8e50d79f2ba0d665b9966908cbf22c6f463228d6"
 }

Example

Tentacat.Pulls.merge "elixir-lang", "elixir", "4876", body, client

More info at: https://developer.github.com/v3/pulls/#merge-a-pull-request-merge-button

update(owner, repo, number, body, client)

Specs

update(binary, binary, binary | integer, list | map, Tentacat.Client.t) :: Tentacat.response

Update a pull request

Pull Request body example:

%{
  "title" => "new title",
  "body"  => "updated body",
  "state" => "open"
 }

Example

Tentacat.Pulls.update "elixir-lang", "elixir", "2974", body, client

More info at: https://developer.github.com/v3/pulls/#update-a-pull-request