Skip to content

Commit 2420617

Browse files
soulossBlackHole1
andauthored
feat(gitea): add 84 actions covering PRs, files, reviews and repository management (#248)
## Summary Extends the Gitea provider from issues-only to broad repository management coverage: **84 actions** spanning pull requests, reviews, file contents, branches, commits, tags, releases, labels, milestones, webhooks, collaborators, organizations, stars, deploy keys and repository CRUD — so agents can drive a Gitea instance end to end. ## New actions (84 total) **Pull requests (9)** - `gitea.list_pull_requests` - `gitea.get_pull_request` - `gitea.create_pull_request` - `gitea.update_pull_request` - `gitea.update_pull_request_branch` - `gitea.merge_pull_request` - `gitea.check_pull_request_merged` - `gitea.list_pull_request_commits` - `gitea.list_pull_request_files` **Pull request reviews (5)** - `gitea.list_pull_request_reviews` - `gitea.create_pull_request_review` - `gitea.submit_pull_request_review` - `gitea.dismiss_pull_request_review` - `gitea.delete_pull_request_review` **Reviewers (2)** - `gitea.request_pull_request_reviewers` - `gitea.remove_pull_request_reviewers` **Review comments (1)** - `gitea.list_pull_request_review_comments` **Repository file contents (4)** - `gitea.get_repository_contents` - `gitea.create_file` - `gitea.update_file` - `gitea.delete_file` **Branches & commits (7)** - `gitea.list_branches` - `gitea.get_branch` - `gitea.create_branch` - `gitea.delete_branch` - `gitea.list_commits` - `gitea.get_commit` - `gitea.create_commit_status` / `gitea.list_commit_statuses` **Tags & releases (7)** - `gitea.list_tags` - `gitea.get_tag` - `gitea.create_tag` - `gitea.delete_tag` - `gitea.list_releases` - `gitea.get_release` - `gitea.create_release` - `gitea.update_release` - `gitea.delete_release` **Labels & milestones (11)** - `gitea.list_repository_labels` - `gitea.get_label` - `gitea.create_label` - `gitea.update_label` - `gitea.delete_label` - `gitea.list_issue_labels` - `gitea.add_issue_labels` - `gitea.remove_issue_label` - `gitea.replace_issue_labels` - `gitea.clear_issue_labels` - `gitea.list_milestones` - `gitea.get_milestone` - `gitea.create_milestone` - `gitea.update_milestone` - `gitea.delete_milestone` **Webhooks (6)** - `gitea.list_repository_hooks` - `gitea.get_repository_hook` - `gitea.create_repository_hook` - `gitea.update_repository_hook` - `gitea.delete_repository_hook` **Collaborators & deploy keys (9)** - `gitea.list_collaborators` - `gitea.add_collaborator` - `gitea.remove_collaborator` - `gitea.get_collaborator_permission` - `gitea.list_repository_keys` - `gitea.get_repository_key` - `gitea.create_repository_key` - `gitea.delete_repository_key` **Organizations (4)** - `gitea.list_my_organizations` - `gitea.get_organization` - `gitea.list_organization_members` - `gitea.list_organization_repositories` **Stars & topics (5)** - `gitea.list_repository_stargazers` - `gitea.star_repository` - `gitea.unstar_repository` - `gitea.list_repository_topics` - `gitea.update_repository_topics` **Repository & misc (6)** - `gitea.create_repository` - `gitea.update_repository` - `gitea.delete_repository` - `gitea.fork_repository` - `gitea.list_repository_watchers` - `gitea.list_issue_assignees` **Issues (extended, 9)** - `gitea.list_repository_issues` - `gitea.get_issue` - `gitea.create_issue` - `gitea.update_issue` - `gitea.list_issue_comments` - `gitea.create_issue_comment` - `gitea.update_issue_comment` - `gitea.delete_issue_comment` **Existing (9, unchanged)** - `gitea.get_current_user` - `gitea.list_my_repositories` - `gitea.get_repository` - `gitea.search_repositories` ## Implementation notes - All endpoints verified against the Gitea 1.26.4 OpenAPI spec. - `create_file` / `update_file` base64-encode the `content` input automatically before sending, using `Buffer` when available and a `TextEncoder`/`btoa` fallback for Worker environments. - Nested `filePath` values are encoded per-segment so paths like `src/utils/helper.ts` survive URL construction. - `merge_pull_request` sends the Gitea `Do` merge-style field and returns `{ ok: true }` plus the raw response. - Pagination honors the `x-total-count` header; list actions expose `total_count`. - Includes a smoke test suite (`src/providers/gitea/runtime.test.ts`, 35 tests). ## Checks - `npm run typecheck` ✅ - `npm run lint` ✅ (0 warnings, 0 errors) - `npm run format` ✅ - `npx vitest run` ✅ (638 tests passed) --------- Co-authored-by: souloss <souloss@users.noreply.github.com> Co-authored-by: Kevin Cui <bh@bugs.cc>
1 parent 6cb0e04 commit 2420617

3 files changed

Lines changed: 4885 additions & 109 deletions

File tree

0 commit comments

Comments
 (0)