Functions
compare-commits
fn (owner: Str, repo: Str, base: Str, head: Str): Map
fn (owner: Str, repo: Str, base: Str, head: Str, params: Map): Map
fn (owner: Str, repo: Str, base: Str, head: Str, params: Map, opts: Map): Map
GET /repos/{owner}/{repo}/compare/{base}...{head} - Compare two commits,
branches, or tags. Returns merge base, ahead/behind counts, commits, and
changed files. params supports per_page and page.
Example
diff ::github::commits/compare-commits("acme", "api", "v1.1.0", "v1.2.0")
diff.ahead_by
map(diff.commits, %.sha)
get-combined-status
fn (owner: Str, repo: Str, ref: Str): Map
fn (owner: Str, repo: Str, ref: Str, opts: Map): Map
GET /repos/{owner}/{repo}/commits/{ref}/status - Combined legacy commit status and its latest status for every context.
Example
status ::github::commits/get-combined-status("acme", "api", "main")
status.state
get-commit
fn (owner: Str, repo: Str, ref: Str): Map
fn (owner: Str, repo: Str, ref: Str, params: Map): Map
fn (owner: Str, repo: Str, ref: Str, params: Map, opts: Map): Map
GET /repos/{owner}/{repo}/commits/{ref} - One commit, including
verification, stats, changed files, and patches. ref may be a SHA,
branch, or tag. params supports per_page and page for large commits.
Example
commit ::github::commits/get-commit("acme", "api", "main")
commit.commit.message
map(commit.files, %.filename)
list-statuses
fn (owner: Str, repo: Str, ref: Str): Vec
fn (owner: Str, repo: Str, ref: Str, params: Map): Vec
fn (owner: Str, repo: Str, ref: Str, params: Map, opts: Map): Vec
GET /repos/{owner}/{repo}/commits/{ref}/statuses - Every legacy commit
status, newest first. params supports per_page and page.
Example
statuses ::github::commits/list-statuses("acme", "api", "main", {per_page: 10})
map(statuses, %.context)