Migrate organization endpoints from Node.js to Go nexus service#82
Merged
jeroenrinzema merged 10 commits intomainfrom Dec 1, 2025
Merged
Migrate organization endpoints from Node.js to Go nexus service#82jeroenrinzema merged 10 commits intomainfrom
jeroenrinzema merged 10 commits intomainfrom
Conversation
Copilot
AI
changed the title
[WIP] Migrate organizations endpoints to nexus service
Migrate organization endpoints from Node.js to Go nexus service
Nov 30, 2025
There was a problem hiding this comment.
Pull request overview
This PR migrates organization management endpoints from the legacy Node.js platform service to the Go-based nexus service, following established patterns for API development, database operations, and authorization.
Key Changes:
- Added organization management API endpoints (GET, PATCH, DELETE) and integrations listing endpoint
- Implemented database schema updates with migration for
username,domain, anddeleted_atcolumns - Added comprehensive integration tests using testcontainers covering all endpoints and authorization scenarios
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| services/nexus/oapi/resources.yml | Defines OpenAPI schema for organization endpoints and request/response models |
| services/nexus/oapi/resources_gen.go | Generated code from OpenAPI specification including client methods and server interfaces |
| services/nexus/internal/store/organizations.go | Implements database operations for organizations with soft delete support |
| services/nexus/internal/store/migrations/1764534650_add_organization_fields.up.sql | Adds username, domain, and deleted_at columns to organizations table |
| services/nexus/internal/store/migrations/1764534650_add_organization_fields.down.sql | Rollback migration removing added organization columns |
| services/nexus/internal/http/controllers/v1/organizations.go | HTTP handlers implementing organization CRUD operations with role-based authorization |
| services/nexus/internal/http/controllers/v1/organizations_test.go | Integration tests for all organization endpoints using testcontainers |
| services/nexus/internal/http/controllers/v1/controller.go | Registers organizations controller with main controller struct |
Contributor
|
@copilot apply changes based on the comments in this thread |
jeroenrinzema
requested changes
Nov 30, 2025
Contributor
|
@copilot apply changes based on the review comments. |
Contributor
|
@copilot Please checkout the review comments in the PR |
Copilot stopped work on behalf of
jeroenrinzema due to an error
November 30, 2025 21:45
5496abd to
3dfdc74
Compare
… initial RBAC implementation
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…ng newlines Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…providers Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
…and auth column Co-authored-by: jeroenrinzema <3440116+jeroenrinzema@users.noreply.github.com>
596c344 to
cd9d69b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates organization management endpoints from the legacy Node.js platform service to the Go-based nexus service following the established migration pattern.
Changes
Database Schema
deleted_atcolumn to organizations table via migration for soft delete supportAPI Endpoints
GET /api/admin/organizations- retrieve current organizationGET /api/admin/organizations/integrations- list provider integrations across all projectsPATCH /api/admin/organizations- update organization (tracking_deeplink_mirror_url field)DELETE /api/admin/organizations- soft delete organizationStore Layer
Code Improvements
Providerstype withOAPI()method for cleaner slice conversionCreateProvidermethod toProvidersStorefollowing repository patternupdated_attimestamp automaticallyTesting
Integration tests use testcontainers covering all endpoints and soft delete behavior.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.