🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/RayLabsHQ/gitea-mirror/pull/224
**Author:** [@arunavo4](https://github.com/arunavo4)
**Created:** 3/14/2026
**Status:** ✅ Merged
**Merged:** 3/15/2026
**Merged by:** [@arunavo4](https://github.com/arunavo4)
**Base:** `main` ← **Head:** `codex/issue-222-topics-description`
---
### 📝 Commits (2)
- [`dd87ddf`](https://github.com/RayLabsHQ/gitea-mirror/commit/dd87ddfa3de252ef3d2b1da549cf93b8e0324c42) lib: sync repo topics and descriptions
- [`62c97ca`](https://github.com/RayLabsHQ/gitea-mirror/commit/62c97ca04c8a1661bae2916e1b4ae8f17a8cbc67) lib: harden metadata sync for existing repos
### 📊 Changes
**1 file changed** (+290 additions, -56 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/gitea.ts` (+290 -56)
</details>
### 📄 Description
## Summary
- sync repository descriptions to Gitea after mirroring
- sync repository topics from GitHub to Gitea
- apply metadata sync in both mirror creation paths (personal + org)
- backfill metadata when the destination repository already exists
- add description to the org migration payload for parity
## Implementation Details
- Added a shared metadata sync helper in `src/lib/gitea.ts`.
- Description is synced via `PATCH /api/v1/repos/{owner}/{repo}`.
- Topics are fetched from GitHub (`GET /repos/{owner}/{repo}/topics`) and applied in Gitea via `PUT /api/v1/repos/{owner}/{repo}/topics`.
- Topics are sanitized for Gitea compatibility, de-duplicated, and optional `topicPrefix` is applied.
- Topic sync respects `giteaConfig.addTopics` (disabled when set to `false`).
- Metadata sync is best-effort and will not fail the mirror job if metadata endpoints fail.
## Validation
- `bun test src/lib/gitea.test.ts src/lib/gitea-enhanced.test.ts src/lib/gitea-starred-repos.test.ts`
- `bun run build`
Closes #222
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/RayLabsHQ/gitea-mirror/pull/224
Author: @arunavo4
Created: 3/14/2026
Status: ✅ Merged
Merged: 3/15/2026
Merged by: @arunavo4
Base:
main← Head:codex/issue-222-topics-description📝 Commits (2)
dd87ddflib: sync repo topics and descriptions62c97calib: harden metadata sync for existing repos📊 Changes
1 file changed (+290 additions, -56 deletions)
View changed files
📝
src/lib/gitea.ts(+290 -56)📄 Description
Summary
Implementation Details
src/lib/gitea.ts.PATCH /api/v1/repos/{owner}/{repo}.GET /repos/{owner}/{repo}/topics) and applied in Gitea viaPUT /api/v1/repos/{owner}/{repo}/topics.topicPrefixis applied.giteaConfig.addTopics(disabled when set tofalse).Validation
bun test src/lib/gitea.test.ts src/lib/gitea-enhanced.test.ts src/lib/gitea-starred-repos.test.tsbun run buildCloses #222
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.