Tentacat v1.6.0 Tentacat.Pulls View Source
Link to this section Summary
Functions
Create a pull request
Filter pull requests
Get a single pull request
Get if a pull request has been merged
List pull requests
Merge a pull request (Merge Button)
Update a pull request
Link to this section Functions
create(client, owner, repo, body)
View Source
create(Tentacat.Client.t(), binary(), binary(), list() | map()) ::
Tentacat.response()
create(Tentacat.Client.t(), binary(), binary(), list() | 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
filter(client \\ %Client{}, owner, repo, filters)
View Source
filter(Tentacat.Client.t(), binary(), binary(), map()) :: Tentacat.response()
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
find(client \\ %Client{}, owner, repo, number)
View Source
find(Tentacat.Client.t(), binary(), binary(), binary() | integer()) ::
Tentacat.response()
find(Tentacat.Client.t(), binary(), binary(), binary() | integer()) :: Tentacat.response()
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
has_been_merged(client, owner, repo, number)
View Source
has_been_merged(Tentacat.Client.t(), binary(), binary(), binary() | integer()) ::
Tentacat.response()
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
list(client \\ %Client{}, owner, repo)
View Source
list(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()
list(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()
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
merge(client, owner, repo, number, body)
View Source
merge(
Tentacat.Client.t(),
binary(),
binary(),
binary() | integer(),
list() | map()
) :: Tentacat.response()
merge( Tentacat.Client.t(), binary(), binary(), binary() | integer(), list() | 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
update(client, owner, repo, number, body)
View Source
update(
Tentacat.Client.t(),
binary(),
binary(),
binary() | integer(),
list() | map()
) :: Tentacat.response()
update( Tentacat.Client.t(), binary(), binary(), binary() | integer(), list() | 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