feat(api): user-scope and org-scope project board endpoints #2

Merged
oleks merged 2 commits from user-org-project-api into main 2026-05-15 15:53:11 +03:00

2 Commits

Author SHA1 Message Date
Oleks 909bff1a52 test(api): add MoveProjectIssue integration test for repo project scope
The repo-scope POST .../projects/{id}/issues/{issue_id}/move handler had no
test coverage. Adds testAPIMoveProjectIssue with happy-path move, 422 on
non-existent target column, and 404 when the issue isn't in the project.
2026-05-15 15:47:36 +03:00
Oleks 8ae6245c19 feat(api): add user-scope and org-scope project board endpoints
Adds the missing REST surface that mirrors the existing repo-scope project
API onto user and organization namespaces, so projects at /{owner}/-/projects/
become programmatically manageable (linking issues, listing column membership,
moving cards between columns) without browser-session auth.

Routes registered under /api/v1/users/{username}/projects/... and
/api/v1/orgs/{org}/projects/..., gated by AccessTokenScopeCategoryIssue.
User-scope writes require owner==doer or site admin; org-scope writes
require org membership. Handlers copy the repo-scope shape rather than
refactoring the existing repo handlers, keeping shipping code untouched.

Integration tests cover CRUD, columns, issue add/remove/move, listing per
column, and the permission matrix (owner/non-member/admin) for both scopes.
2026-05-15 15:47:29 +03:00