Docs
View as Markdown

codeberg.issues

stable Advanced

Recent issues of a Codeberg repository.

GET /v1/codeberg/issues

What you get#

A list of Codeberg results in Onekey's unified shape, in data (an array). An empty array is a normal, successful answer and is charged like any other; a source that reports "nothing found" as an error returns a free 404 not_found instead.

What it costs#

  • Advanced · 5 credits for a fresh fetch, charged only when it succeeds.
  • Free when served from cache (0.2 credit for a cached response over 100 KB).
  • Free if the request is invalid (never charged) or the source fails or reports not found (refunded).

Parameters#

NameTypeRequiredDefaultWhat it isConstraints
ownerstringyes(required)User or organisation loginmax 100 chars; must match [a-z0-9_][a-z0-9_.-]{0,99}; trimmed, lowercased
repostringyes(required)Repository namemax 100 chars; must match [a-z0-9_-][a-z0-9_.-]{0,99}; trimmed, lowercased

Request#

curl "https://api.onekey.dev/v1/codeberg/issues?owner=forgejo&repo=forgejo" \
  -H "x-api-key: YOUR_API_KEY"

Try it

Add your key to run this call right here. No key? Get one free. The key stays in this tab.

Recorded response#

A real Codeberg response, recorded and returned in Onekey's shape. Fields the platform does not provide are null.

json
{
  "success": true,
  "data": [
    {
      "content": {
        "id": "14591",
        "title": "bug: Actions log and v4 artifact uploads to minio storage allocate ~528 MiB each (Save with size -1)",
        "text": "### Can you reproduce the bug on the Forgejo test instance?\n\nNo, I can't try it on the test instance for some reason\n\n### Description\n\nWith `[storage] STORAGE_TYPE = minio`, every finished Actions job causes a ~528 MiB allocation in the Forgejo process, and every v4 artifact upload causes two. A few jobs finishing close together exceed a typical container memory limit and the instance is OOM-killed. The `transfer_lingering_logs` cron (`@midnight`, `RunAtStart: true`) goes through the same path, so an OOM can cascade: failed final `UpdateLog` calls leave lingering logs, and the next startup or midnight run transfers them and OOMs again.\r\n\r\n**Cause:** these callers pass `size = -1` to `ObjectStorage.Save`:\r\n\r\n- `modules/actions/log.go` `TransferLogs`: `storage.Actions.Save(filename, reader, -1)` (called from `UpdateLog` with `NoMore` and from `transferLingeringLogs`)\r\n- `routers/api/actions/artifactsv4.go` (`comp=block` with `blockid`, and `comp=blocklist`): `r.fs.Save(..., ctx.Req.Body, -1)`\r\n- also `services/repository/archiver/archiver.go` (repo archives), `modules/storage/storage.go` `SaveFrom` (avatars), and raw-body release attachment uploads\r\n\r\n`MinioStorage.Save` forwards the size to `minio-go` `PutObject` without `PutObjectOptions.PartSize`. For an unknown size, minio-go's `optimalPartInfo(-1)` assumes a 5 TiB object in 10,000 parts, so the part size is 5 TiB / 10000 rounded up to a 16 MiB multiple = **528 MiB**, and `putObjectMultipartStreamNoLength` does `buf := make",
        "url": "https://codeberg.org/forgejo/forgejo/issues/14591",
        "createdAt": "2026-09-28T19:39:47Z",
        "updatedAt": "2026-09-28T19:39:47Z",
        "state": "open"
      },
      "author": {
        "username": "camcelroy"
      },
      "engagement": {
        "comments": 0
      }
    },
    {
      "content": {
        "id": "14589",
        "title": "problem: Cancelled forgejo-runner job still runs for another 3 minutes with authentication errors",
        "text": "### Does your problem still exist on the latest Forgejo version?\n\nUnknown, I can't try it for some reason (please explain)\n\n### About your usage of Forgejo\n\nWe run Forgejo on a VM and run ephemeral Forgejo Runners on a Kubernetes cluster so we can scale more easily on demand. We use KEDA for automatic scaling and it was very easy to setup: https://keda.sh/docs/2.20/scalers/forgejo/\n\nWe create a Pod template such like this (simplified)\n```yaml\napiVersion: keda.sh/v1alpha1\nkind: ScaledJob\n     ...\n      spec:\n        volumes:\n          - name: podman-socket\n            emptyDir: {}\n        initContainers:\n          - name: podman\n            command:\n            - podman\n            - system\n            - service\n            - -t\n            - \"0\"\n            - unix:///run/podman/podman.sock\n            image: /$company/forgejo-podman\n            volumeMounts:\n            - mountPath: /run/podman\n              name: podman-socket\n        containers:\n          - name: forgejo-runner\n            image: /$company/forgejo-runner\n            volumeMounts:\n            - mountPath: /run/podman\n              name: podman-socket\n```\n\nWe run a custom forgejo-runner image with our certificates + its own entrypoint:\n```bash\n#!/bin/sh\n\nforgejo-runner register \\\n  --no-interactive \\\n  --config /home/runner/config.yaml  \\\n  --name \"$(hostname)\" \\\n  --ephemeral \\\n  --instance \"$REGISTER_URL\" \\\n  --token \"$REGISTER_TOKEN\"\n\n# Run, forgejo-runner, run!\nforgejo-runner --config /home/runner/config.",
        "url": "https://codeberg.org/forgejo/forgejo/issues/14589",
        "createdAt": "2026-09-28T18:22:33Z",
        "updatedAt": "2026-09-28T19:54:01Z",
        "state": "open"
      },
      "author": {
        "username": "riemervdzee"
      },
      "engagement": {
        "comments": 2
      }
    }
  ],
  "metadata": {
    "platform": "codeberg",
    "endpoint": "issues",
    "cached": false,
    "stale": false,
    "age_s": 0,
    "fetched_at": "2026-01-01T12:00:00+00:00",
    "credits_charged": 5,
    "request_id": "7f3a9c2e5b1d4c8fa2e6d0b9c4f18e37"
  },
  "error": null
}

Field mapping#

How this endpoint's source fields become Onekey's unified schema. Fields the source lacks come back as null.

Source pathOnekey fieldTransform
numbercontent.idtoString
titlecontent.title-
bodycontent.text-
html_urlcontent.urlsafeUrl
created_atcontent.createdAttoIsoDate
updated_atcontent.updatedAttoIsoDate
statecontent.state-
user.loginauthor.username-
commentsengagement.commentstoNumber

Caching and freshness#

  • Fresh for about 2 minutes. Repeat calls in that window are served from cache and are free.
  • Between 2 minutes and 15 minutes the cached copy is still served instantly and marked stale: true while Onekey refreshes it in the background.
  • If the source is down when a refresh is needed, the last copy can be served for up to 1 hour more (marked stale).
  • A "not found" is remembered for 1 minute and is free.
  • The cache is shared across all customers, which is what keeps repeat calls cheap.

What can go wrong#

StatusCodeWhat to do
401unauthorizedCheck the x-api-key header.
402insufficient_creditsAdd credits; your balance must cover the price.
404not_foundUnknown endpoint path.
422invalid_paramsFix the parameters using the table above. Free.
429rate_limitedWait Retry-After seconds, then retry.
502upstream_errorThe source failed. Refunded; retry with backoff.

See Errors for the full list and retry guidance.

Status: stable (verified against the live source).