024278a3d2
- Add proposal, design, specs, and tasks for git connection model - Include provider adapter, credential storage, SSH key lifecycle specs - Add repository connection API and git operations specifications
42 lines
1.6 KiB
Markdown
42 lines
1.6 KiB
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Repository connections can be created
|
|
The system SHALL allow users to create connections to Git repositories.
|
|
|
|
#### Scenario: Connect GitHub repository
|
|
- **WHEN** a user provides a GitHub repository URL and access token
|
|
- **THEN** the system validates the URL and token
|
|
- **AND** creates a RepositoryConnection record
|
|
- **AND** generates an SSH key pair
|
|
- **AND** registers the deploy key with GitHub
|
|
|
|
#### Scenario: Connect GitLab repository
|
|
- **WHEN** a user provides a GitLab repository URL and access token
|
|
- **THEN** the system validates the URL and token
|
|
- **AND** creates a RepositoryConnection record
|
|
- **AND** generates an SSH key pair
|
|
- **AND** registers the deploy key with GitLab
|
|
|
|
#### Scenario: Reject invalid URL
|
|
- **WHEN** a user provides an invalid repository URL
|
|
- **THEN** the system returns a 400 error with validation message
|
|
|
|
### Requirement: Repository connections can be listed and retrieved
|
|
The system SHALL allow users to list and view their repository connections.
|
|
|
|
#### Scenario: List connections
|
|
- **WHEN** a user requests their repository connections
|
|
- **THEN** the system returns a list with status and metadata
|
|
|
|
#### Scenario: Get connection details
|
|
- **WHEN** a user requests a specific connection
|
|
- **THEN** the system returns full details including SSH public key
|
|
|
|
### Requirement: Repository connections can be deleted
|
|
The system SHALL allow users to delete repository connections.
|
|
|
|
#### Scenario: Delete connection
|
|
- **WHEN** a user deletes a connection
|
|
- **THEN** the system removes the deploy key from the provider
|
|
- **AND** deletes the SSH key pair
|
|
- **AND** marks the connection as deleted |