Skip to content

feat(forgejo): add the Forgejo SDK - #550

Merged
Mkassabov merged 3 commits into
feat/google-workspace-sdkfrom
feat/forgejo-sdk
Sep 7, 2026
Merged

feat(forgejo): add the Forgejo SDK#550
Mkassabov merged 3 commits into
feat/google-workspace-sdkfrom
feat/forgejo-sdk

Conversation

@Mkassabov

Copy link
Copy Markdown
Collaborator

Adds @distilled.cloud/forgejo, generated from the Swagger 2.0 template Forgejo ships in its repository at a release tag. The spec-mirror-forgejo fetch script (stacks/distilled-submodules/spec-repos/forgejo) pins the tag (v16.0.3) and fills in the two server-side placeholders the way a root-mounted instance renders them. One service module per API tag.

import * as Forgejo from "@distilled.cloud/forgejo";

const repo = yield* Forgejo.Services.repository.repoGet({ owner: "acme", repo: "api" });
  • Credentials carry the instance URL alongside the token, since a self-hosted forge has no default API root; FORGEJO_URL / FORGEJO_TOKEN drive CredentialsFromEnv.
  • The protocol sends Forgejo's token authorization scheme and reads the { message, url } error envelope.
  • No pagination trait: list endpoints return bare arrays and signal the last page only through X-Total-Count, so page/limit stay plain inputs.

Patches type what the document leaves out:

  • OrganizationOwnsRepositories on orgDelete: Forgejo answers a 500 with user still has ownership of repositories.
  • 403 on the list endpoints (teams, members, labels, hooks, Actions secrets and variables) and 403/404 on the branch-protection list, which declares no failures at all.
  • 409 on createOrgRepo for a taken name, matching what createCurrentUserRepo already declares.
  • adminCreateOrg's path parameter renamed to owner: the body's username (the org login) collided with it and was dropped.
  • required on the always-present members of the response definitions, which the Go structs never omit, and sha1 on AccessToken marked sensitive.

The .gitmodules stanza is the inert one pnpm specs:link writes before the mirror exists; the gitlink follows in a follow-up once the stack has deployed spec-mirror-forgejo.

Consumer: alchemy-run/alchemy#1425.


Supersedes #541 (same commit, from @wyattjoh's fork) rebased onto the convert-time patch / verbNoun pipeline from #545/#548/#549. The one Smithy patch now applies in finalizeConvert and targets DeleteOrg.

@alchemy-version-bot

alchemy-version-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

Distilled

@distilled.cloud/core

bun add https://pkg.ing/@distilled.cloud/core/48f0b8e

@distilled.cloud/aws

bun add https://pkg.ing/@distilled.cloud/aws/48f0b8e

@distilled.cloud/axiom

bun add https://pkg.ing/@distilled.cloud/axiom/48f0b8e

@distilled.cloud/azure

bun add https://pkg.ing/@distilled.cloud/azure/48f0b8e

@distilled.cloud/cloudflare

bun add https://pkg.ing/@distilled.cloud/cloudflare/48f0b8e

@distilled.cloud/coinbase

bun add https://pkg.ing/@distilled.cloud/coinbase/48f0b8e

@distilled.cloud/discord

bun add https://pkg.ing/@distilled.cloud/discord/48f0b8e

@distilled.cloud/expo-eas

bun add https://pkg.ing/@distilled.cloud/expo-eas/48f0b8e

@distilled.cloud/fly-io

bun add https://pkg.ing/@distilled.cloud/fly-io/48f0b8e

@distilled.cloud/forgejo

bun add https://pkg.ing/@distilled.cloud/forgejo/48f0b8e

@distilled.cloud/gcp

bun add https://pkg.ing/@distilled.cloud/gcp/48f0b8e

@distilled.cloud/github

bun add https://pkg.ing/@distilled.cloud/github/48f0b8e

@distilled.cloud/hetzner

bun add https://pkg.ing/@distilled.cloud/hetzner/48f0b8e

@distilled.cloud/kubernetes

bun add https://pkg.ing/@distilled.cloud/kubernetes/48f0b8e

@distilled.cloud/mongodb-atlas

bun add https://pkg.ing/@distilled.cloud/mongodb-atlas/48f0b8e

@distilled.cloud/neon

bun add https://pkg.ing/@distilled.cloud/neon/48f0b8e

@distilled.cloud/planetscale

bun add https://pkg.ing/@distilled.cloud/planetscale/48f0b8e

@distilled.cloud/posthog

bun add https://pkg.ing/@distilled.cloud/posthog/48f0b8e

@distilled.cloud/prisma-postgres

bun add https://pkg.ing/@distilled.cloud/prisma-postgres/48f0b8e

@distilled.cloud/railway

bun add https://pkg.ing/@distilled.cloud/railway/48f0b8e

@distilled.cloud/stripe

bun add https://pkg.ing/@distilled.cloud/stripe/48f0b8e

@distilled.cloud/supabase

bun add https://pkg.ing/@distilled.cloud/supabase/48f0b8e

@distilled.cloud/turso

bun add https://pkg.ing/@distilled.cloud/turso/48f0b8e

@distilled.cloud/typesense

bun add https://pkg.ing/@distilled.cloud/typesense/48f0b8e

@distilled.cloud/vercel

bun add https://pkg.ing/@distilled.cloud/vercel/48f0b8e

@distilled.cloud/workos

bun add https://pkg.ing/@distilled.cloud/workos/48f0b8e

@Mkassabov
Mkassabov changed the base branch from main to feat/google-workspace-sdk September 7, 2026 12:21
@Mkassabov
Mkassabov added this pull request to the merge queue Sep 7, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a manual request Sep 7, 2026
wyattjoh and others added 3 commits September 7, 2026 08:36
Add @distilled.cloud/forgejo: one service module per API tag, compiled
from the Swagger 2.0 template Forgejo ships at a release tag. The
spec-mirror-forgejo fetch script (stacks/distilled-submodules/spec-repos/
forgejo) pins the tag and fills in the two server-side placeholders the
way a root-mounted instance renders them. Credentials carry the instance
URL alongside the token, since a self-hosted forge has no default API
root; the protocol sends Forgejo's `token` authorization scheme.

Patches type what the document leaves out: the 500 an organization
delete answers while it still owns repositories, the 403s the list
endpoints answer for a non-member, the 409 an organization repository
create answers for a taken name, the path/body `username` clash on
adminCreateOrg, and the always-present members of the response
definitions the Go structs never omit.
Smithy-pointer patches now apply in finalizeConvert (the pipeline #545
introduced) instead of a per-slug loop in convert; the one such patch
targets the operation by its verbNoun name (DeleteOrg).
@Mkassabov
Mkassabov added this pull request to the merge queue Sep 7, 2026
Merged via the queue into main with commit 592725d Sep 7, 2026
6 of 8 checks passed
@Mkassabov
Mkassabov deleted the feat/forgejo-sdk branch September 7, 2026 12:42
wyattjoh pushed a commit to wyattjoh/distilled that referenced this pull request Sep 7, 2026
Cherry-picks alchemy-run#550. The packages/forgejo tree is identical to main's; the
spec-mirror stack entry is dropped, and .gitmodules, tsconfig.json, and
the pnpm-lock importer take this branch's layout and its resolved
catalog versions.
wyattjoh added a commit to wyattjoh/distilled that referenced this pull request Sep 7, 2026
Cherry-picks alchemy-run#550. The packages/forgejo tree is identical to main's; the
spec-mirror stack entry is dropped, and .gitmodules, tsconfig.json, and
the pnpm-lock importer take this branch's layout and its resolved
catalog versions.
wyattjoh added a commit to wyattjoh/distilled that referenced this pull request Sep 7, 2026
Cherry-picks alchemy-run#550. The packages/forgejo tree is identical to main's; the
spec-mirror stack entry is dropped, and .gitmodules, tsconfig.json, and
the pnpm-lock importer take this branch's layout and its resolved
catalog versions.
wyattjoh added a commit to wyattjoh/distilled that referenced this pull request Sep 8, 2026
Cherry-picks alchemy-run#550. The packages/forgejo tree is identical to main's; the
spec-mirror stack entry is dropped, and .gitmodules, tsconfig.json, and
the pnpm-lock importer take this branch's layout and its resolved
catalog versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants