Test files exist for pull, issue, milestone, packages, search, wiki, repo (slim/tree), pkg/params, pkg/gitea (rest/redirect), pkg/slim, and operation top-level. But several write-heavy modules have no test file at all:
operation/user/
operation/label/
operation/timetracking/
operation/notification/
operation/actions/ (only logs_test.go — runs.go and config.go untested)
These are exactly the surfaces where a silent regression (wrong field name, broken pagination, missing required param) is most expensive.
Suggested direction
Add table-driven tests with an httptest.Server standing in for Gitea. One test per public tool method covering: happy path, missing required param, propagated SDK error. The operation/pull/pull_test.go pattern is a fine starting template.
## Problem
Test files exist for `pull`, `issue`, `milestone`, `packages`, `search`, `wiki`, `repo (slim/tree)`, `pkg/params`, `pkg/gitea (rest/redirect)`, `pkg/slim`, and `operation` top-level. But several write-heavy modules have **no** test file at all:
- `operation/user/`
- `operation/label/`
- `operation/timetracking/`
- `operation/notification/`
- `operation/actions/` (only `logs_test.go` — `runs.go` and `config.go` untested)
- `operation/repo/` write paths (`branch.go`, `tag.go`, `file.go`, `release.go`, `commit.go`, `repo.go`)
These are exactly the surfaces where a silent regression (wrong field name, broken pagination, missing required param) is most expensive.
## Suggested direction
Add table-driven tests with an `httptest.Server` standing in for Gitea. One test per public tool method covering: happy path, missing required param, propagated SDK error. The `operation/pull/pull_test.go` pattern is a fine starting template.
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.
Problem
Test files exist for
pull,issue,milestone,packages,search,wiki,repo (slim/tree),pkg/params,pkg/gitea (rest/redirect),pkg/slim, andoperationtop-level. But several write-heavy modules have no test file at all:operation/user/operation/label/operation/timetracking/operation/notification/operation/actions/(onlylogs_test.go—runs.goandconfig.gountested)operation/repo/write paths (branch.go,tag.go,file.go,release.go,commit.go,repo.go)These are exactly the surfaces where a silent regression (wrong field name, broken pagination, missing required param) is most expensive.
Suggested direction
Add table-driven tests with an
httptest.Serverstanding in for Gitea. One test per public tool method covering: happy path, missing required param, propagated SDK error. Theoperation/pull/pull_test.gopattern is a fine starting template.