View Source Tentacat.Repositories.Branches (Tentacat v2.5.0)
Summary
Functions
@spec find(Tentacat.Client.t(), binary(), binary(), binary()) :: Tentacat.response()
Get Branch.
Example
Tentacat.Repositories.Branches.find "elixir-lang", "elixir", "feature"
Tentacat.Repositories.Branches.find client, "elixir-lang", "elixir", "feature"
More info at: https://developer.github.com/v3/repos/#get-branch
@spec list(Tentacat.Client.t(), binary(), binary()) :: Tentacat.response()
List Branches.
Example
Tentacat.Repositories.Branches.list "elixir-lang", "elixir"
Tentacat.Repositories.Branches.list client, "elixir-lang", "elixir"
More info at: https://developer.github.com/v3/repos/#list-branches
@spec update_protection(Tentacat.Client.t(), binary(), binary(), binary(), map()) :: Tentacat.response()
Update Branch Protection.
Create body example:
%{
"required_status_checks" => %{
"strict" => true,
"contexts" => [
"continuous-integration/travis-ci"
]
},
"enforce_admins" => true,
"required_pull_request_reviews" => %{
"dismissal_restrictions" => %{
"users" => [
"octocat"
],
"teams" => [
"justice-league"
]
},
"dismiss_stale_reviews" => true,
"require_code_owner_reviews" => true,
"required_approving_review_count" => 2
},
"restrictions" => %{
"users" => [
"octocat"
],
"teams" => [
"justice-league"
]
}
}
Example
Tentacat.Repositories.Branches.update_protection "elixir-lang", "elixir", "feature", body
Tentacat.Repositories.Branches.update_protection client, "elixir-lang", "elixir", "feature", body
More info at: https://developer.github.com/v3/repos/branches/#update-branch-protection