Conversation
618632f to
81ff3cc
Compare
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2227070410 Status: Passed Job summariesrspec: [ee]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12511162517/artifacts/tmp/coverage/index.html rspec: [ce]Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/12511162516/artifacts/tmp/coverage/index.html rubocop723 files inspected, no offenses detected |
There was a problem hiding this comment.
Pull request overview
This PR adds a slug field to namespace projects to support URL-based identification of flows, particularly for HTTP flows. The slug is used as a URL path component to identify and route to project flows.
- Adds a required
slugcolumn to thenamespace_projectstable with uniqueness constraint - Implements automatic slug generation with collision handling when not explicitly provided
- Exposes slug via GraphQL API for both creation and updates
- Updates HTTP flow URL generation to include project slug as a path prefix
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| db/migrate/20251215200029_add_slug_to_projects.rb | Adds slug column and unique index to namespace_projects table |
| db/structure.sql | Updates schema to reflect slug column addition |
| db/schema_migrations/20251215200029 | Migration checksum for tracking |
| db/fixtures/development/06_namespace_projects.rb | Adds slug to development fixture data |
| app/models/namespace_project.rb | Adds slug validations (presence, uniqueness, format, length) |
| app/models/flow.rb | Updates to_grpc method to prepend project slug to HTTP flow URLs |
| app/services/namespaces/projects/create_service.rb | Implements automatic slug generation with collision retry logic |
| app/graphql/types/namespace_project_type.rb | Exposes slug field in GraphQL type |
| app/graphql/mutations/namespaces/projects/create.rb | Adds optional slug argument to create mutation |
| app/graphql/mutations/namespaces/projects/update.rb | Adds optional slug argument to update mutation |
| spec/models/namespace_project_spec.rb | Adds validation specs for slug field |
| spec/factories/namespace_projects.rb | Updates factory to auto-generate slug from name |
| spec/services/namespaces/projects/create_service_spec.rb | Adds tests for slug generation and collision handling |
| spec/requests/graphql/mutation/namespace/projects/create_mutation_spec.rb | Updates audit event expectations to include slug |
| spec/graphql/types/namespace_project_type_spec.rb | Adds slug to expected GraphQL fields |
| spec/models/flow_spec.rb | Updates flow tests to verify slug inclusion in HTTP URLs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1beea7a to
d9d9fc7
Compare
close #777