Skip to main content

Github

@dataverket/githubv2026.11.12.1· AGPL-3.0-only· 9d agoBEHAVIORSEXTENDS
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. Their records are stored under portable data names, branches-<repo>, default-branch-<repo> and delete-<repo>, so they hold on Windows too; before 2026.11.08.1 the names used :, which Windows refuses. Data under an old name is left where it is; the README says how to remove it. 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.

02Behaviors1
@dataverket/githubv2026.11.12.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
03Extends1
@dataverket/githubrepo_settings.ts
fn repo_delete(name: string, expectMirrorOf?: string)
Delete a repository under the model's owner (no-op when absent). Verify-first; with expectMirrorOf the
ArgumentTypeDescription
namestringRepository name under the model's owner.
expectMirrorOf?stringRefuse unless the repository's description or homepage mentions this, e.g. the forge URL of a stale twin.
fn branches_list(name: string)
List a repository's branches and its default branch. Read-only.
ArgumentTypeDescription
namestringRepository name under the model's owner.
fn default_branch_ensure(name: string, defaultBranch: string)
Make a branch the repository's default (unchanged when it already is). Refuses a branch the repository
ArgumentTypeDescription
namestringRepository name under the model's owner.
defaultBranchstringBranch that should be the default.

Resources

repoDelete(infinite)— A repository deletion under the model's owner.
branches(infinite)— A repository's branches and its default branch.
defaultBranch(infinite)— A default-branch convergence: which branch is now the default and whether it changed.
04Previous Versions5
2026.11.08.1AGPL-3.0-only
2026.10.27.1AGPL-3.0-only(was none)
2026.10.05.1

Added 1 behaviors. updated labels

2026.09.29.2
2026.09.29.1
05Stats
A
100 / 100
Downloads
84
Archive size
58.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
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License2/2earned
  • Verified public repository2/2earned
06Platforms
07Labels