- Added owner and team members relationships to the Project entity. - Updated ProjectRepository to find projects based on user ownership or team membership. - Enhanced ProjectVoter to manage view, edit, and delete permissions based on ownership and team membership. - Created ProjectAccessExtension to filter projects based on user access. - Updated ProjectManagement.vue to include owner and team member selection in the UI. - Implemented API endpoints for managing Git repositories with proper access control. - Added migration to update the database schema for project ownership and team members.
66 lines
1.5 KiB
Plaintext
66 lines
1.5 KiB
Plaintext
meta {
|
|
name: Create Repository
|
|
type: http
|
|
seq: 7
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/api/git_repositories
|
|
body: json
|
|
auth: none
|
|
}
|
|
|
|
headers {
|
|
Accept: application/json
|
|
Content-Type: application/json
|
|
Cookie: {{sessionCookie}}
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"name": "My Project Repository",
|
|
"provider": "github",
|
|
"owner": "username",
|
|
"repo": "repository-name",
|
|
"branch": "main",
|
|
"project": "/api/projects/1",
|
|
"personalAccessToken": "ghp_xxxxxxxxxxxx"
|
|
}
|
|
}
|
|
|
|
docs {
|
|
# Create Repository
|
|
|
|
Creates a new Git repository entry.
|
|
|
|
## Body Parameters
|
|
- `name`: Display name for the repository
|
|
- `provider`: One of 'github', 'gitea', 'local'
|
|
- `owner`: Repository owner/organization
|
|
- `repo`: Repository name
|
|
- `branch`: Default branch (usually 'main' or 'master')
|
|
- `project`: IRI reference to project (e.g., "/api/projects/1")
|
|
- `personalAccessToken`: Optional access token for private repos
|
|
|
|
## Provider-Specific Settings
|
|
|
|
### GitHub
|
|
- `owner`: GitHub username or organization
|
|
- `repo`: Repository name
|
|
- `personalAccessToken`: GitHub Personal Access Token (optional for public repos)
|
|
|
|
### Gitea
|
|
- `owner`: Gitea username or organization
|
|
- `repo`: Repository name
|
|
- `personalAccessToken`: Gitea API token
|
|
- Requires `giteaUrl` in environment
|
|
|
|
### Local
|
|
- `localPath`: Absolute path to local Git repository
|
|
- No owner/repo needed
|
|
|
|
## Security
|
|
- Requires authentication
|
|
- Token is stored encrypted in database
|
|
}
|