mirror of
https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git
synced 2024-12-04 21:08:11 +00:00
fixed faulty import of repository
This commit is contained in:
parent
e4ff32cc94
commit
c183098b7d
5 changed files with 8 additions and 7 deletions
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
|
|||
|
||||
GOFMT ?= gofmt -s
|
||||
|
||||
VERSION = 0.7.3
|
||||
VERSION = 0.7.4
|
||||
|
||||
test: fmt-check
|
||||
go test -i $(TEST) || exit 1
|
||||
|
|
|
@ -17,7 +17,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "Lerentis/gitea"
|
||||
version = "0.7.3"
|
||||
version = "0.7.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "terraform.local/lerentis/gitea"
|
||||
version = "0.8.0"
|
||||
version = "0.7.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ terraform {
|
|||
required_providers {
|
||||
gitea = {
|
||||
source = "Lerentis/gitea"
|
||||
version = "0.7.2"
|
||||
version = "0.7.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,6 +232,7 @@ func respurceRepoDelete(d *schema.ResourceData, meta interface{}) (err error) {
|
|||
|
||||
func setRepoResourceData(repo *gitea.Repository, d *schema.ResourceData) (err error) {
|
||||
d.SetId(fmt.Sprintf("%d", repo.ID))
|
||||
d.Set("username", repo.Owner.UserName)
|
||||
d.Set("name", repo.Name)
|
||||
d.Set("description", repo.Description)
|
||||
d.Set("full_name", repo.FullName)
|
||||
|
@ -248,8 +249,8 @@ func setRepoResourceData(repo *gitea.Repository, d *schema.ResourceData) (err er
|
|||
d.Set("watchers", repo.Watchers)
|
||||
d.Set("open_issue_count", repo.OpenIssues)
|
||||
d.Set("default_branch", repo.DefaultBranch)
|
||||
d.Set("created", repo.Created)
|
||||
d.Set("updated", repo.Updated)
|
||||
d.Set("created", repo.Created.String())
|
||||
d.Set("updated", repo.Updated.String())
|
||||
d.Set("permission_admin", repo.Permissions.Admin)
|
||||
d.Set("permission_push", repo.Permissions.Push)
|
||||
d.Set("permission_pull", repo.Permissions.Pull)
|
||||
|
@ -264,7 +265,7 @@ func resourceGiteaRepository() *schema.Resource {
|
|||
Update: resourceRepoUpdate,
|
||||
Delete: respurceRepoDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
StateContext: schema.ImportStatePassthroughContext,
|
||||
},
|
||||
Schema: map[string]*schema.Schema{
|
||||
"username": {
|
||||
|
|
Loading…
Reference in a new issue