Files
headquarter/openspec/changes/git-connection-model/specs/git-provider-adapter/spec.md
T
alex 024278a3d2 docs(openspec): add FN-007 Git Connection Model change
- 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
2026-05-16 13:43:49 +02:00

35 lines
1.3 KiB
Markdown

## ADDED Requirements
### Requirement: GitHub adapter implements provider interface
The system SHALL provide a GitHub adapter that implements the GitProvider interface.
#### Scenario: List repositories
- **WHEN** the adapter lists repositories for an authenticated user
- **THEN** it returns a list of repository objects with name, url, and default_branch
#### Scenario: Create deploy key
- **WHEN** the adapter creates a deploy key for a repository
- **THEN** it registers the SSH public key with GitHub
- **AND** returns the key ID
#### Scenario: Validate connection
- **WHEN** the adapter validates a token
- **THEN** it verifies the token with GitHub API
- **AND** returns user information
### Requirement: GitLab adapter implements provider interface
The system SHALL provide a GitLab adapter that implements the GitProvider interface.
#### Scenario: List repositories
- **WHEN** the adapter lists repositories for an authenticated user
- **THEN** it returns a list of repository objects with name, url, and default_branch
#### Scenario: Create deploy key
- **WHEN** the adapter creates a deploy key for a repository
- **THEN** it registers the SSH public key with GitLab
- **AND** returns the key ID
#### Scenario: Validate connection
- **WHEN** the adapter validates a token
- **THEN** it verifies the token with GitLab API
- **AND** returns user information