Support migration from AWS CodeCommit (#31981)
This PR adds support for migrating repos from [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html). The access key ID and secret access key are required to get repository information and pull requests. And [HTTPS Git credentials](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) are required to clone the repository. <img src="https://github.com/user-attachments/assets/82ecb2d0-8d43-42b0-b5af-f5347a13b9d0" width="680" /> The AWS CodeCommit icon is from [AWS Architecture Icons](https://aws.amazon.com/architecture/icons/). <img src="https://github.com/user-attachments/assets/3c44d21f-d753-40f5-9eae-5d3589e0d50d" width="320" />
This commit is contained in:
parent
d9a7748cdc
commit
def1c9670b
15 changed files with 513 additions and 9 deletions
|
@ -291,15 +291,16 @@ type GitServiceType int
|
|||
|
||||
// enumerate all GitServiceType
|
||||
const (
|
||||
NotMigrated GitServiceType = iota // 0 not migrated from external sites
|
||||
PlainGitService // 1 plain git service
|
||||
GithubService // 2 github.com
|
||||
GiteaService // 3 gitea service
|
||||
GitlabService // 4 gitlab service
|
||||
GogsService // 5 gogs service
|
||||
OneDevService // 6 onedev service
|
||||
GitBucketService // 7 gitbucket service
|
||||
CodebaseService // 8 codebase service
|
||||
NotMigrated GitServiceType = iota // 0 not migrated from external sites
|
||||
PlainGitService // 1 plain git service
|
||||
GithubService // 2 github.com
|
||||
GiteaService // 3 gitea service
|
||||
GitlabService // 4 gitlab service
|
||||
GogsService // 5 gogs service
|
||||
OneDevService // 6 onedev service
|
||||
GitBucketService // 7 gitbucket service
|
||||
CodebaseService // 8 codebase service
|
||||
CodeCommitService // 9 codecommit service
|
||||
)
|
||||
|
||||
// Name represents the service type's name
|
||||
|
@ -325,6 +326,8 @@ func (gt GitServiceType) Title() string {
|
|||
return "GitBucket"
|
||||
case CodebaseService:
|
||||
return "Codebase"
|
||||
case CodeCommitService:
|
||||
return "CodeCommit"
|
||||
case PlainGitService:
|
||||
return "Git"
|
||||
}
|
||||
|
@ -361,6 +364,9 @@ type MigrateRepoOptions struct {
|
|||
PullRequests bool `json:"pull_requests"`
|
||||
Releases bool `json:"releases"`
|
||||
MirrorInterval string `json:"mirror_interval"`
|
||||
|
||||
AWSAccessKeyID string `json:"aws_access_key_id"`
|
||||
AWSSecretAccessKey string `json:"aws_secret_access_key"`
|
||||
}
|
||||
|
||||
// TokenAuth represents whether a service type supports token-based auth
|
||||
|
@ -382,6 +388,7 @@ var SupportedFullGitService = []GitServiceType{
|
|||
OneDevService,
|
||||
GitBucketService,
|
||||
CodebaseService,
|
||||
CodeCommitService,
|
||||
}
|
||||
|
||||
// RepoTransfer represents a pending repo transfer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue