Browse Source

Merge pull request #2505 from porter-dev/nafees/hotfixes

[hotfix] Case insensitive equality when finding environment based on repo owner and name
abelanger5 3 years ago
parent
commit
8a85529f2a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      cli/cmd/apply.go

+ 3 - 1
cli/cmd/apply.go

@@ -747,7 +747,9 @@ func (t *DeploymentHook) PreApply() error {
 	envs := *envList
 
 	for _, env := range envs {
-		if env.GitRepoOwner == t.repoOwner && env.GitRepoName == t.repoName && env.GitInstallationID == t.gitInstallationID {
+		if strings.EqualFold(env.GitRepoOwner, t.repoOwner) &&
+			strings.EqualFold(env.GitRepoName, t.repoName) &&
+			env.GitInstallationID == t.gitInstallationID {
 			t.envID = env.ID
 			break
 		}