View Source Tentacat.Pulls (Tentacat v2.5.0)

Summary

Functions

Create a pull request.

Get if a pull request has been merged.

Merge a pull request (Merge Button).

Functions

Link to this function

create(client, owner, repo, body)

View Source
@spec create(Tentacat.Client.t(), binary(), binary(), map()) :: 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 client, "elixir-lang", "elixir", body

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

Link to this function

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

View Source
@spec filter(Tentacat.Client.t(), binary(), binary(), map()) :: Tentacat.response()

Filter pull requests.

Example

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

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

Link to this function

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

View Source

Get a single pull request.

Example

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

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

Link to this function

has_been_merged(client, owner, repo, number)

View Source
@spec has_been_merged(Tentacat.Client.t(), binary(), binary(), binary() | integer()) ::
  Tentacat.response()

Get if a pull request has been merged.

Example

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

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

Link to this function

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

View Source

List pull requests.

Example

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

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

Link to this function

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

View Source
@spec merge(Tentacat.Client.t(), binary(), binary(), binary() | integer(), map()) ::
  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 client, "elixir-lang", "elixir", "4876", body

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

Link to this function

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

View Source
@spec update(Tentacat.Client.t(), binary(), binary(), binary() | integer(), map()) ::
  Tentacat.response()

Update a pull request.

Pull Request body example:

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

Example

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

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