Open
jmiller
wants to merge 2 commits from
feat/org-governance-openapi into dev
pull from: feat/org-governance-openapi
merge into: :dev
:main
:feat/org-governance-openapi
:dev
:feature/738-expand-openapi-spec-mcp-tooling-for-org-
:feature/722-cleanup-and-standardization-of-issue-tem
:feature/723-feat-issue-and-pull-request-voting-upvot
:feature/725-enforce-dot-prefixed-repositories-are-al
:feature/727-org-level-branch-protection-is-stored-bu
:feature/secret-scanning
:rc
:rc/v1.26.1-moko.06.07.02
:rc/v1.26.1-moko.06.07.03
:rc/v1.26.1-moko.06.07.01
:rc/v1.26.1-moko.06.07
:rc/v1.26.1-moko.06.06.02
:rc/v1.26.1-moko.06.06.01
:rc/v1.26.1-moko.06.06
:rc/v1.26.1-moko.06.05.01
:rc/v1.26.1-moko.06.05
:rc/v1.26.1-moko.06.04
:rc/v1.26.1-moko.06.03
:rc/05.06.00
:rc/05.03.03
:rc/04.01.00
:rc/05.03.02
:rc/05.03.01
:rc/05.03.00
:rc/05.01.00
:rc/05.02.02
:rc/05.02.01
:rc/05.01.01
:rc/05.02.00
:rc/05.01.02
:rc/05.03.04
:rc/05.03.05
:rc/05.03.06
:rc/05.03.08
:rc/05.04.00
:rc/05.05.00
No Reviewers
Labels
Clear labels
breaking-change
ci-cd
config
dependencies
deploy-failure
docker
documentation
feature: wiki
good first issue
health-check
help wanted
mokostandards
push-failure
security
size/l
size/m
size/s
size/xl
size/xs
standards-drift
standards-update
sync-failure
tech-debt
upstream
upstream
work-in-progress
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
Breaking API or behavior change
CI/CD pipeline changes
Configuration changes
Dependency updates
Deployment failed
Docker/container changes
Documentation changes
Wiki system enhancements
Good for newcomers
Repo health check result
Extra attention needed
Related to MokoStandards framework
Git push operation failed
Security vulnerability or hardening
200-500 lines changed
50-200 lines changed
10-50 lines changed
500+ lines changed
< 10 lines changed
Deviates from MokoStandards
MokoStandards compliance update
Sync or mirror failed
Technical debt and TODO/FIXME items
Inherited from upstream Gitea
Draft or incomplete work
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
No labels
Priority
-
Type
-
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: MokoConsulting/MokoGitea-Fork#739
Reference in New Issue
Block a user
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.
Delete Branch "feat/org-governance-openapi"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Completes the documentation/OpenAPI surface for the org-governance series (#728–#732) so the stable
mainrelease (#733) ships a fully-described API. Resolves scope A of #738 (the item that gated the merge to main).OpenAPI / swagger (the gating work)
The five org-governance API groups were functional but undocumented — the four later handlers had zero swagger annotations and no
swagger:responsemodels were registered (even the existingbranch_protection.go$ref'd responses that were never defined). Now:swagger:responsemodels registered inrouters/api/v1/swagger/org.go:OrgBranchProtection/OrgBranchProtectionList,OrgTagProtection/OrgTagProtectionList, and singletonsOrgPushPolicy,OrgRepoDefaults,OrgEmailDomainPolicy.tag_protection.go(5),push_policy.go(3),repo_defaults.go(3),email_domain.go(3) — styled exactly like the existingbranch_protection.go, unique operationIds,orgpath param, body$refs to the correct DTOs,#/responses/emptyfor 204,notFound/validationError. No handler logic changed (annotations only).templates/swagger/v1_json.tmplandv1_openapi3_json.tmpl.Pre-existing spec blockers fixed as a prerequisite
The committed spec was stale and could not be regenerated at all. To produce a valid spec (no logic changes):
manifest.go: removed a stray comment glued to therepoUpdateManifestswagger block (broke YAML parsing), added missingowner/repopath params, registered aManifestresponse, gofmt whitespace.options.go: registered the org option DTOs + pre-existing unregistered defs (EditAccessTokenOption,IssueBulk*Option,Issue{Priority,Status,Type}Def) so there are no dangling$refs.Docs
[Unreleased]: recorded the recent build/CI fixes (#734, #735, #736, #737). (The org-governance features were already listed.)Verification (local, Go 1.26.3)
go build ./...→ clean (onlytests/integration, which is pre-existing-broken, excluded)gofmt -lon all edited.gofiles → cleanswagger validate→ valid against Swagger 2.0 (benign unused-response warnings only)v1_json.tmplRelated: #738 (tracker; B = MCP tools and C = repo-facing views remain), #727, #733.
https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT
Annotate the four previously undocumented org-governance API handlers (tag_protection, push_policy, repo_defaults, email_domain) with swagger:operation blocks, and register the swagger:response models the branch_protection operations already referenced. Register the org option DTOs in the parameterBodies hack so their definitions are emitted. Also fix pre-existing spec-generation blockers surfaced once the spec became regenerable: a stray comment glued to the repoUpdateManifest swagger block (broke YAML parsing), missing owner/repo path params on the manifest operations, a Manifest response registration, and missing definitions for EditAccessTokenOption, the IssueBulk* options, and the Issue{Priority,Status,Type}Def types. Regenerated v1_json.tmpl and v1_openapi3_json.tmpl; spec now validates cleanly against Swagger 2.0. Claude-Session: https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KTView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.