Tentacat v2.2.0 Tentacat.Repositories.Branches View Source
Link to this section Summary
Link to this section Functions
Link to this function
find(client \\ %Client{}, owner, repo, branch)
View Sourcefind(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
Link to this function
list(client \\ %Client{}, owner, repo)
View Sourcelist(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
Link to this function
update_protection(client \\ %Client{}, owner, repo, branch, body)
View Sourceupdate_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