Create an access token for this repo.
Optionalscope: "read" | "write"
Token scope: "write" (default) or "read".
Optionalttl: number
Time-to-live in seconds (default 86400, min 60, max 31536000).
Fork this repo to a new repo.
Target repository name.
Optionalopts: { defaultBranchOnly?: boolean; description?: string; readOnly?: boolean }
Optional: description, readOnly flag, defaultBranchOnly (default true).
Retrieve current repository metadata. Each call performs a fresh lookup.
Current public repository metadata.
List tokens for this repo (metadata only, no plaintext).
List commits along the first-parent chain, newest first.
Optionalopts: { limit?: number; offset?: number; ref?: string }
History options. All fields are optional.
Optionallimit?: numberMaximum results; defaults to 50 and is capped at 1000.
Optionaloffset?: numberNumber of matching commits to skip; defaults to 0.
Optionalref?: stringBranch, tag, or commit ID; defaults to HEAD.
Commit metadata, or an empty array if the ref cannot be resolved.
Read the raw bytes of a Git blob by object ID.
Lowercase, 40-character SHA-1 object ID.
An untyped Blob, or null if the object is missing or is not a Git blob.
INVALID_INPUT for a malformed hash, MEMORY_LIMIT if the object
cannot be buffered safely, or INTERNAL_ERROR on an unexpected read failure.
ArtifactsRepo.readFile to resolve a file by ref and path.
Decode a Git commit by object ID.
Lowercase, 40-character SHA-1 commit ID.
Commit metadata, or null if the object is missing.
Resolve a file from a branch, tag, or commit ID and return its bytes with a browser-safe content type in Blob.type.
File lookup options.
Non-empty repository-relative path.
Branch, tag, or commit ID to resolve.
A MIME-typed Blob, or null if the ref or path cannot resolve to a file.
Read the immediate children of a Git tree by object ID.
Lowercase, 40-character SHA-1 tree ID.
Tree entries, or null if the object is missing.
Repository capability returned by Artifacts.get.
Metadata is available through info, not as properties on the capability. Methods may throw
ArtifactsErrorwith codeINTERNAL_ERRORif an unexpected service error occurs.The capability is an RPC stub. Dispose of it when finished, for example with
using repo = await env.ARTIFACTS.get(name);, to release it before the request ends.