Back to Skills

go-sdk

verified

Use when writing Go code to interact with Gitea API - automation, bots, integrations, migrations, or programmatic git forge operations

View on GitHub

Marketplace

dev-skills

gaarutyunov/dev-skills

Plugin

gitea

Repository

gaarutyunov/dev-skills

gitea/skills/go-sdk/SKILL.md

Last Verified

January 21, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/gaarutyunov/dev-skills/blob/main/gitea/skills/go-sdk/SKILL.md -a claude-code --skill go-sdk

Installation paths:

Claude
.claude/skills/go-sdk/
Powered by add-skill CLI

Instructions

# Gitea Go SDK

## Overview

The official Go SDK for Gitea provides 332+ API methods with full type safety. Use it for bots, automation, integrations, and complex workflows. For quick CLI operations, use `gitea:tea-cli` instead.

## Quick Setup

```go
import "code.gitea.io/sdk/gitea"

// Create client
client, err := gitea.NewClient(
    "https://gitea.example.com",
    gitea.SetToken("your-token"),
)
```

```bash
go get code.gitea.io/sdk/gitea
```

See `references/authentication.md` in tea-cli for token creation.

## Quick Reference

| Task | Method |
|------|--------|
| **Repos** | |
| List my repos | `client.ListMyRepos(ListReposOptions{})` |
| Get repo | `client.GetRepo(owner, repo)` |
| Create repo | `client.CreateRepo(CreateRepoOption{})` |
| **Issues** | |
| List issues | `client.ListRepoIssues(owner, repo, ListIssueOption{})` |
| Create issue | `client.CreateIssue(owner, repo, CreateIssueOption{})` |
| Edit issue | `client.EditIssue(owner, repo, index, EditIssueOption{})` |
| **PRs** | |
| List PRs | `client.ListRepoPullRequests(owner, repo, ListPullRequestsOptions{})` |
| Create PR | `client.CreatePullRequest(owner, repo, CreatePullRequestOption{})` |
| Merge PR | `client.MergePullRequest(owner, repo, index, MergePullRequestOption{})` |
| **Releases** | |
| List releases | `client.ListReleases(owner, repo, ListReleasesOptions{})` |
| Create release | `client.CreateRelease(owner, repo, CreateReleaseOption{})` |

## API Categories

See `references/api-reference.md` for complete method list:
- Repositories (70+ methods)
- Issues & comments (50+ methods)
- Pull requests & reviews (40+ methods)
- Releases & attachments
- Organizations & teams
- Users, webhooks, actions

## Common Types

See `references/types.md` for struct definitions:
- `Repository`, `Issue`, `PullRequest`, `Release`
- `User`, `Organization`, `Team`
- `ListOptions` for pagination
- Option structs for create/edit

## Patterns

See `references/examples.md` for idiomatic patterns:
- Error handling

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3131 chars