Tentacat.Pulls
Summary
| create(owner, repo, body, client) | Create a pull request |
| filter(owner, repo, filters, client \\ %Tentacat.Client{}) | Filter pull requests |
| find(owner, repo, number, client \\ %Tentacat.Client{}) | Get a single pull request |
| list(owner, repo, client \\ %Tentacat.Client{}) | List pull requests |
| update(owner, repo, number, body, client) | Update a pull request |
Functions
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
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
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
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
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