aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/structs/repo.go')
-rw-r--r--modules/structs/repo.go29
1 files changed, 14 insertions, 15 deletions
diff --git a/modules/structs/repo.go b/modules/structs/repo.go
index aca5d9c3f4..f2e11b1542 100644
--- a/modules/structs/repo.go
+++ b/modules/structs/repo.go
@@ -48,15 +48,16 @@ type ExternalWiki struct {
// Repository represents a repository
type Repository struct {
- ID int64 `json:"id"`
- Owner *User `json:"owner"`
- Name string `json:"name"`
- FullName string `json:"full_name"`
- Description string `json:"description"`
- Empty bool `json:"empty"`
- Private bool `json:"private"`
- Fork bool `json:"fork"`
- Template bool `json:"template"`
+ ID int64 `json:"id"`
+ Owner *User `json:"owner"`
+ Name string `json:"name"`
+ FullName string `json:"full_name"`
+ Description string `json:"description"`
+ Empty bool `json:"empty"`
+ Private bool `json:"private"`
+ Fork bool `json:"fork"`
+ Template bool `json:"template"`
+ // the original repository if this repository is a fork, otherwise null
Parent *Repository `json:"parent,omitempty"`
Mirror bool `json:"mirror"`
Size int `json:"size"`
@@ -225,15 +226,13 @@ type EditRepoOption struct {
EnablePrune *bool `json:"enable_prune,omitempty"`
}
-// GenerateRepoOption options when creating repository using a template
+// GenerateRepoOption options when creating a repository using a template
// swagger:model
type GenerateRepoOption struct {
- // The organization or person who will own the new repository
+ // the organization's name or individual user's name who will own the new repository
//
// required: true
Owner string `json:"owner"`
- // Name of the repository to create
- //
// required: true
// unique: true
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(100)"`
@@ -352,9 +351,9 @@ func (gt GitServiceType) Title() string {
type MigrateRepoOptions struct {
// required: true
CloneAddr string `json:"clone_addr" binding:"Required"`
- // deprecated (only for backwards compatibility)
+ // deprecated (only for backwards compatibility, use repo_owner instead)
RepoOwnerID int64 `json:"uid"`
- // Name of User or Organisation who will own Repo after migration
+ // the organization's name or individual user's name who will own the migrated repository
RepoOwner string `json:"repo_owner"`
// required: true
RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"`