Skip to main content

Github

@dataverket/githubv2026.10.05.1· 1d agoMODELS
01README

GitHub repositories, releases, pull requests and repository settings for swamp, over the REST API. One model type, @dataverket/github. Forked from @goodcraft/github 2026.06.14.1 (MIT, copyright GoodCraft) and merged with the former @dataverket/github add-on, so one package owns the type. The upstream methods keep their names: sync lists the owner's repositories and proves the token; ensureRepo, ensureRelease and openPr are idempotent, find existing state first and default to dryRun: true, so a run plans before it writes. The merged add-on supplies what ensureRepo does not reach: branches_list reports the branches a repository has and which one is default, default_branch_ensure converges the default branch and refuses to point at a branch the repository does not have, and repo_delete removes a repository verify-first, a no-op when it is already absent, with expectMirrorOf refusing one whose description does not mention the given text. This is what a push mirror needs: GitHub rejects a mirror push from a repository whose default branch is not the one being pushed, and the fix is to converge GitHub's default first. A live pre-flight check proves the token is still accepted and can see the model's owner. The token comes from a vault expression and is never recorded or logged.

02Models1
@dataverket/githubv2026.10.05.1github.ts

Global Arguments

ArgumentTypeDescription
tokenstring
ownerstring
isOrg?boolean
baseUrl?string
fn sync()
List the repositories owned by `owner` (read-only; proves the token)
fn ensureRepo(name: string, description?: string, private?: boolean, autoInit?: boolean, licenseTemplate?: string, gitignoreTemplate?: string, homepage?: string, topics?: array, dryRun?: boolean)
Idempotently ensure a repository exists (create it if missing). dryRun=true (default) plans without creating.
ArgumentTypeDescription
namestring
description?string
private?boolean
autoInit?boolean
licenseTemplate?string
gitignoreTemplate?string
homepage?string
topics?array
dryRun?boolean
fn ensureRelease(repo: string, tagName: string, targetCommitish?: string, name?: string, body?: string, draft?: boolean, prerelease?: boolean, dryRun?: boolean)
Idempotently ensure a release+tag exists (skip if a release with the tag is already present). dryRun=true (default) plans without creating.
ArgumentTypeDescription
repostring
tagNamestring
targetCommitish?string
name?string
body?string
draft?boolean
prerelease?boolean
dryRun?boolean
fn openPr(repo: string, head: string, base?: string, title: string, body?: string, draft?: boolean, dryRun?: boolean)
Idempotently open a pull request (skip if an open PR for the same head→base already exists). dryRun=true (default) plans without creating.
ArgumentTypeDescription
repostring
headstring
base?string
titlestring
body?string
draft?boolean
dryRun?boolean

Resources

repos(infinite)— Snapshot of the repositories owned by `owner`
repoEnsure(infinite)— Result of the last ensureRepo call
release(infinite)— Result of the last ensureRelease call
pull(infinite)— Result of the last openPr call
03Previous Versions2
2026.09.29.2
2026.09.29.1
04Stats
A
100 / 100
Downloads
14
Archive size
43.8 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels