Exgit.CloudflareArtifacts.Repo (exgit v0.1.0)

Copy Markdown View Source

Cloudflare Artifacts repository.

Field names mirror the upstream RepoInfo / RepoWithRemote / CreateRepoResult shapes verbatim — default_branch, created_at, last_push_at, read_only, etc. are kept as-is rather than Elixirified, so the struct can be cross-referenced against the Cloudflare REST docs directly.

Not every field is populated by every endpoint:

  • POST /repos, POST /repos/:name/fork, POST /repos/:name/import return a CreateRepoResult — fills id, name, description, default_branch, remote, token. The list/get-only fields (created_at, updated_at, etc.) stay nil.
  • GET /repos, GET /repos/:name return RepoWithRemote — fills id, name, description, default_branch, created_at, updated_at, last_push_at, source, read_only, remote. token is nil (those routes don't mint one).
  • Fork additionally returns objects (object count copied).

Summary

Types

t()

@type t() :: %Exgit.CloudflareArtifacts.Repo{
  created_at: String.t() | nil,
  default_branch: String.t() | nil,
  description: String.t() | nil,
  id: String.t() | nil,
  last_push_at: String.t() | nil,
  name: String.t() | nil,
  objects: integer() | nil,
  read_only: boolean() | nil,
  remote: String.t() | nil,
  source: String.t() | nil,
  token: String.t() | nil,
  updated_at: String.t() | nil
}

Functions

from_map(map)

@spec from_map(map()) :: t()