View Source Tentacat.Commits (Tentacat v2.4.0)

Summary

Functions

Filter commits on a repository. Parameters are sha, path, author, since, until.

List commits on a repository.

Functions

Link to this function

compare(client \\ %Client{}, base, head, owner, repo)

View Source
@spec compare(Tentacat.Client.t(), any(), any(), binary(), binary()) ::
  Tentacat.response()

Compare two commits.

Example

Tentacat.Commits.compare(client, base, head, "elixir-lang", "elixir")

More info at: https://developer.github.com/v3/repos/commits/#compare-two-commits

Link to this function

create(client \\ %Client{}, owner, repo, body)

View Source
@spec create(Tentacat.Client.t(), binary(), binary(), map()) :: Tentacat.response()

Create a commit.

Commit body example:

%{
  message: "my commit message",
  author: %{
    name: "Mona Octocat",
    email: "octocat@github.com",
    date: "2008-07-09T16:13:30+12:00"
  },
  parents: [
    "7d1b31e74ee336d15cbd21741bc88a537ed063a0"
  ],
  tree: "827efc6d56897b048c772eb4087f854f46256132",
  signature: "-----BEGIN PGP SIGNATURE-----

iQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv
7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI
DkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n
2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA
OQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k
nrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU
+NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB
jHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ
3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+
UpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr
X11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp
eSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc=
=5Io4
-----END PGP SIGNATURE-----
"
}

Example

Tentacat.Commits.create(client, "elixir-lang", "elixir", body)

More info at: https://developer.github.com/v3/git/commits/#create-a-commit

Link to this function

filter(client \\ %Client{}, owner, repo, filters)

View Source
@spec filter(Tentacat.Client.t(), binary(), binary(), Keyword.t() | map()) ::
  Tentacat.response()

Filter commits on a repository. Parameters are sha, path, author, since, until.

Example

Tentacat.Commits.filter(client, "elixir-lang", "elixir", %{sha: "my-branch"})

More info at: https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository

Link to this function

find(client \\ %Client{}, sha, owner, repo)

View Source
@spec find(Tentacat.Client.t(), any(), binary(), binary()) :: Tentacat.response()

Get a single commit.

Example

Tentacat.Commits.find(client, "6dcb09b", "elixir-lang", "elixir")

More info at: https://developer.github.com/v3/repos/commits/#get-a-commit

Link to this function

list(client \\ %Client{}, owner, repo)

View Source

List commits on a repository.

Example

Tentacat.Commits.list(client, "elixir-lang", "elixir")

More info at: https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository