started with documentation
This commit is contained in:
@ -139,24 +139,28 @@ func resourceGiteaOrg() *schema.Resource {
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The name of the organisation without spaces.",
|
||||
},
|
||||
"full_name": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Description: "The display name of the organisation. Defaults to the value of `name`.",
|
||||
},
|
||||
"description": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Description: "A description of this organisation.",
|
||||
},
|
||||
"website": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Description: "A link to a website with more information about this organisation.",
|
||||
},
|
||||
"location": {
|
||||
Type: schema.TypeString,
|
||||
@ -175,12 +179,14 @@ func resourceGiteaOrg() *schema.Resource {
|
||||
Computed: true,
|
||||
},
|
||||
"visibility": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "public",
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "public",
|
||||
Description: "Flag is this organisation should be publicly visible or not.",
|
||||
},
|
||||
},
|
||||
Description: "Handling Ogranisation resources",
|
||||
Description: "`gitea_org` manages a gitea organisation.\n\n" +
|
||||
"Organisations are a way to group repositories and abstract permission management in a gitea instance.",
|
||||
}
|
||||
}
|
||||
|
@ -259,20 +259,23 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"username": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The Owner of the repository",
|
||||
},
|
||||
"name": {
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
Description: "The Name of the repository",
|
||||
},
|
||||
"auto_init": {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "Flag if the repository should be initiated with the configured values",
|
||||
},
|
||||
"repo_template": {
|
||||
Type: schema.TypeBool,
|
||||
@ -285,18 +288,25 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "Default",
|
||||
Description: "The Issue Label configuration to be used in this repository.\n" +
|
||||
"Need to exist in the gitea instance",
|
||||
},
|
||||
"gitignores": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "",
|
||||
Description: "A specific gitignore that should be commited to the repository" +
|
||||
"on creation if `auto_init` is set to `true`\n" +
|
||||
"Need to exist in the gitea instance",
|
||||
},
|
||||
"license": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "",
|
||||
Description: "The license under which the source code of this repository should be.\n" +
|
||||
"Need to exist in the gitea instance",
|
||||
},
|
||||
"readme": {
|
||||
Type: schema.TypeString,
|
||||
@ -305,22 +315,25 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Default: "",
|
||||
},
|
||||
"description": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "",
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "",
|
||||
Description: "The description of the repository.",
|
||||
},
|
||||
"private": {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "Flag if the repository should be private or not.",
|
||||
},
|
||||
"default_branch": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "main",
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "main",
|
||||
Description: "The default branch of the repository. Defaults to `main`",
|
||||
},
|
||||
"created": {
|
||||
Type: schema.TypeString,
|
||||
@ -343,34 +356,39 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Computed: true,
|
||||
},
|
||||
"website": {
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "",
|
||||
Type: schema.TypeString,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: "",
|
||||
Description: "A link to a website with more information.",
|
||||
},
|
||||
"has_issues": {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "A flag if the repository should have issue management enabled or not.",
|
||||
},
|
||||
"has_wiki": {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "A flag if the repository should have the native wiki enabled or not.",
|
||||
},
|
||||
"has_pull_requests": {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "A flag if the repository should acceppt pull requests or not.",
|
||||
},
|
||||
"has_projects": {
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Type: schema.TypeBool,
|
||||
Required: false,
|
||||
Optional: true,
|
||||
Default: true,
|
||||
Description: "A flag if the repository should have the native project management enabled or not.",
|
||||
},
|
||||
"ignore_whitespace_conflicts": {
|
||||
Type: schema.TypeBool,
|
||||
@ -496,6 +514,10 @@ func resourceGiteaRepository() *schema.Resource {
|
||||
Default: "",
|
||||
},
|
||||
},
|
||||
Description: "Handling Repository resources",
|
||||
Description: "`gitea_repository` manages a gitea repository.\n\n" +
|
||||
"Per default this repository will be initializiled with the provided configuration (gitignore, License etc.).\n" +
|
||||
"If the `username` property is set to a organisation name, the provider will try to look if this organisation exists " +
|
||||
"and create the repository under the organisation scope.\n\n" +
|
||||
"Repository migrations have some properties that are not available to regular repositories. These are all prefixed with `migration_`.",
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user