Skip to content

Commit 1643d5b

Browse files
yo Mayyo May
yo May
authored and
yo May
committed
Fix
1 parent d66f1b4 commit 1643d5b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

core/gh2tf_repo_mapper.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const (
2626
var falseString = "false"
2727

2828
// Replace branch protection pattern's special chars by dedicated string in order to avoid ID collision (pattern is used for TF ressource generation)
29-
// in case every special chars are replaced by the same string => "?.*", "[.]" or "?/?" would all lead to the same "---" ID for instance
30-
var patternToIdReplacer = strings.NewReplacer(
29+
// in case every special chars are replaced by the same string => "?.*", "[.]" or "?/?" would all lead to the same "---" ID for instance.
30+
var patternToIdReplacer = strings.NewReplacer(
3131
".", "_DOT_",
3232
"/", "_SLASH_",
3333
"\\", "_ESC_",

core/testdata/repo1.full.golden.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ resource "github_branch_protection" "repo1-default" {
8787
}
8888
}
8989

90-
resource "github_branch_protection" "repo1-feature-branch1" {
90+
resource "github_branch_protection" "repo1-feature_SLASH_branch1" {
9191
repository_id = github_repository.repo1.node_id
9292
pattern = "feature/branch1"
9393
enforce_admins = true
@@ -111,7 +111,7 @@ resource "github_branch_protection" "repo1-feature-branch1" {
111111
}
112112
}
113113

114-
resource "github_branch_protection" "repo1-feature-branch2" {
114+
resource "github_branch_protection" "repo1-feature_SLASH_branch2" {
115115
repository_id = github_repository.repo1.node_id
116116
pattern = "feature/branch2"
117117
enforce_admins = false

core/testdata/repo2.full.golden.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ resource "github_branch_protection" "repo2-default" {
8787
}
8888
}
8989

90-
resource "github_branch_protection" "repo2-feature-branch2" {
90+
resource "github_branch_protection" "repo2-feature_SLASH_branch2" {
9191
repository_id = github_repository.repo2.node_id
9292
pattern = "feature/branch2"
9393
enforce_admins = false
@@ -111,7 +111,7 @@ resource "github_branch_protection" "repo2-feature-branch2" {
111111
}
112112
}
113113

114-
resource "github_branch_protection" "repo2-feature-branch3" {
114+
resource "github_branch_protection" "repo2-feature_SLASH_branch3" {
115115
repository_id = github_repository.repo2.node_id
116116
pattern = "feature/branch3"
117117
enforce_admins = true

0 commit comments

Comments
 (0)