Merge pull request #77 from github/lowercase-deletions

cmd/ghcs/delete: When matching repos to delete, standardize casing
This commit is contained in:
Issy Long 2021-08-18 18:33:57 +01:00 committed by GitHub
commit 9697aa3a78

View file

@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"strings"
"github.com/github/ghcs/api"
"github.com/github/ghcs/cmd/ghcs/output"
@ -124,7 +125,7 @@ func DeleteByRepo(repo string) error {
var deleted bool
for _, c := range codespaces {
if c.RepositoryNWO != repo {
if !strings.EqualFold(c.RepositoryNWO, repo) {
continue
}
deleted = true