From 360fd8cb53c5d43cbdf06a0450d8729c54b5106f Mon Sep 17 00:00:00 2001 From: Anshul Khandelwal <12948312+k-anshul@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:18:02 +0100 Subject: [PATCH] lint fixes --- admin/github.go | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/admin/github.go b/admin/github.go index 597cf906589..96da0c5f57a 100644 --- a/admin/github.go +++ b/admin/github.go @@ -285,28 +285,3 @@ func (s *Service) deleteProjectsForInstallation(ctx context.Context, id int64) e } return multiErr } - -func (s *Service) deleteProjectsForRepo(ctx context.Context, repo *github.Repository) error { - // Find Rill project matching the repo that was pushed to - projects, err := s.DB.FindProjectsByGithubURL(ctx, githubURLFromRepo(repo)) - if err != nil { - return err - } - - var multiErr error - for _, p := range projects { - err := s.TeardownProject(ctx, p) - if err != nil { - multiErr = multierr.Combine(multiErr, fmt.Errorf("unable to delete project %q: %w", p.ID, err)) - continue - } - } - return multiErr -} - -func githubURLFromRepo(repo *github.Repository) string { - if repo.HTMLURL != nil { - return *repo.HTMLURL - } - return "https://github.com/" + repo.GetFullName() -}