Providers

Gitea

Use gitea.com and self-hosted Gitea instances. It shares its implementation with the Forgejo provider.

The Gitea provider covers gitea.com and self-hosted Gitea instances. It uses the same implementation as the Forgejo provider, so the Forgejo page applies here, apart from the default instance and the webhook headers. Refs from this provider have forge: 'gitea'.

DetailValue
Importforges/gitea
Factoriesgitea(), giteaLite()
Authtoken, anonymous

Authentication

The provider accepts an access token:

import { gitea } from 'forges/gitea'

const forge = gitea({
  auth: { type: 'token', token: process.env.GITEA_TOKEN! },
}).create()

Without auth, the provider makes anonymous public reads.

Instance

The default instance is https://gitea.com. For a self-hosted instance, set baseUrl to the root of the instance. The provider appends /api/v1:

gitea({ baseUrl: 'https://gitea.example.com', auth })

refreshCapabilities() reads the instance version from /version.

Behaviour shared with Forgejo

These sections of the Forgejo page apply to Gitea:

Webhooks

Set webhookSecret to the secret configured on the hook:

const forge = gitea({
  webhookSecret: process.env.GITEA_WEBHOOK_SECRET,
}).create()

const events = await forge.webhooks.ingest({
  headers: request.headers,
  body: await request.text(),
})

Gitea sends these headers with each delivery:

HeaderContent
X-Gitea-SignatureThe hex HMAC-SHA256 of the body
X-Gitea-EventThe event name
X-Gitea-DeliveryThe delivery ID

The Gitea provider doesn't read X-Forgejo-* headers.

A label delivery doesn't say which labels were added or removed. A changed label set becomes a label event with the edited action, and removing every label becomes one with the unlabelled action.

Recording fixtures

GITEA_TOKEN=... FIXTURE_GITEA_REPO=owner/repo FIXTURE_GITEA_PULL=1 \
pnpm record-fixtures gitea

To add an issue, set FIXTURE_GITEA_ISSUE. To record a self-hosted instance, set GITEA_BASE_URL.

Capabilities

Generated by pnpm capability-matrix; do not edit by hand.

CapabilitySupport
experimental❌
sources.poll✅
sources.webhook✅
sources.subscribe❌
repos.get✅
users.get✅
repos.list✅
repos.labels✅
repos.createLabelexperimental
repos.milestones✅
repos.collaborators✅
repos.permissionForexperimental
repos.addCollaboratorexperimental
repos.assignableUsers✅
repos.reviewerCandidatesexperimental
threads.getissue, PR, commit (experimental)
threads.listissue, PR
threads.getMany✅
comments.listissue, PR
comments.editissue (experimental), PR (experimental)
comments.deleteissue (experimental), PR (experimental)
reactions.listissue, PR
notifications.list✅
notifications.markRead✅
notifications.markDoneemulated
notifications.unsubscribe✅
notifications.markAllRead✅
notifications.markAllDone❌
notifications.unreadCount✅
writes.commentissue (experimental), PR
writes.upsertCommentissue (emulated), PR (emulated)
writes.closeissue (experimental), PR
writes.reopenissue (experimental), PR
writes.createissue (experimental), PR (experimental)
writes.updateissue (experimental), PR (experimental)
writes.setLabelsissue (experimental), PR (experimental)
writes.addLabelsissue (experimental), PR (experimental)
writes.removeLabelsissue (experimental), PR (experimental)
writes.setMilestoneissue (experimental), PR (experimental)
writes.reactissue (experimental), PR (experimental)
writes.setAssigneesissue (experimental), PR (experimental)
writes.requestReviewPR (experimental)
writes.merge✅
writes.approveAndMerge✅
writes.transfer❌
writes.markDuplicate❌
subscriptions.getissue, PR
subscriptions.setissue, PR
installations❌
checks.threadPR
checks.list✅
checks.reportexperimental
checks.rerun❌
ci.runs❌
ci.run❌
ci.jobs❌
ci.log❌
contents.file✅
contents.tree✅
contents.branches✅
contents.tags✅
contents.resolveRef✅
contents.commits✅
contents.commit✅
contents.compare✅
contents.threadFiles✅
contents.threadCommits✅
reviews.list✅
reviews.createexperimental
reviews.submitexperimental
reviews.approveexperimental
reviews.resolveThread❌
releases.list✅
releases.get✅
releases.latest✅
releases.getByTag✅
releases.downloadAssetexperimental
webhooks.listexperimental
webhooks.createexperimental
webhooks.updateexperimental
webhooks.deleteexperimental
webhooks.rotateSecretexperimental
webhooks.deliveries❌
webhooks.redeliver❌
search.threads✅
search.repos✅
search.commits❌
securityAlerts❌
eventKindsnative
authtoken, anonymous
limitsunknown
Copyright © 2026