Tentacat v2.2.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 Sourcecreate(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
filter(client \\ %Client{}, owner, repo, filters)
View Sourcefilter(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 Sourcefind(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 Sourcehas_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 Sourcelist(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 Sourcemerge(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
update(client, owner, repo, number, body)
View Sourceupdate(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