Compare commits

..

No commits in common. "b2403e2569a571656f1b3df83619e02b954a4aa9" and "bc28fe186f10eac6615f4289ac250e1f1544d136" have entirely different histories.

8 changed files with 12 additions and 32 deletions

View File

@ -5,7 +5,7 @@ KERNEL?=$$(uname -s | tr '[:upper:]' '[:lower:]')
GOFMT ?= gofmt -s
VERSION = 0.14.0
VERSION = 0.13.0
test: fmt-check
go test -i $(TEST) || exit 1

View File

@ -17,7 +17,7 @@ terraform {
required_providers {
gitea = {
source = "Lerentis/gitea"
version = "0.14.0"
version = "0.13.0"
}
}
}

View File

@ -17,7 +17,7 @@ terraform {
required_providers {
gitea = {
source = "Lerentis/gitea"
version = "0.14.0"
version = "0.13.0"
}
}
}

View File

@ -41,16 +41,6 @@ resource "gitea_repository" "mirror" {
migration_service = "gitea"
migration_service_auth_token = var.gitea_mirror_token
}
resource "gitea_repository" "clone" {
username = "lerentis"
name = "terraform-provider-gitea-clone"
description = "Clone of Terraform Provider"
mirror = false
migration_clone_address = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
migration_service = "gitea"
migration_service_auth_token = var.gitea_clone_token
}
```
<!-- schema generated by tfplugindocs -->

View File

@ -2,7 +2,7 @@ terraform {
required_providers {
gitea = {
source = "terraform.local/lerentis/gitea"
version = "0.14.0"
version = "0.13.0"
}
}
}

View File

@ -2,7 +2,7 @@ terraform {
required_providers {
gitea = {
source = "Lerentis/gitea"
version = "0.14.0"
version = "0.13.0"
}
}
}

View File

@ -16,13 +16,3 @@ resource "gitea_repository" "mirror" {
migration_service = "gitea"
migration_service_auth_token = var.gitea_mirror_token
}
resource "gitea_repository" "clone" {
username = "lerentis"
name = "terraform-provider-gitea-clone"
description = "Clone of Terraform Provider"
mirror = false
migration_clone_address = "https://git.uploadfilter24.eu/lerentis/terraform-provider-gitea.git"
migration_service = "gitea"
migration_service_auth_token = var.gitea_clone_token
}

View File

@ -131,14 +131,14 @@ func resourceRepoCreate(d *schema.ResourceData, meta interface{}) (err error) {
orgRepo = true
}
var cloneAddr string
if d.Get(migrationCloneAddresse).(string) != "" {
cloneAddr = d.Get(migrationCloneAddresse).(string)
} else {
cloneAddr = d.Get(migrationCloneAddress).(string)
}
if (d.Get(repoMirror)).(bool) {
if cloneAddr != "" {
var cloneAddr string
if d.Get(migrationCloneAddresse).(string) != "" {
cloneAddr = d.Get(migrationCloneAddresse).(string)
} else {
cloneAddr = d.Get(migrationCloneAddress).(string)
}
opts := gitea.MigrateRepoOption{
RepoName: d.Get(repoName).(string),