Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anshul committed Jan 29, 2025
1 parent 97e3cde commit 360fd8c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions admin/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit 360fd8c

Please sign in to comment.