updated DeleteOrgRepos to use GetRepositoryByID

This commit is contained in:
karthik.bhandary committed 2026-03-22 19:16:48 +00:00
1 parent 348feff8d1
commit cfcbdca1f2
2 files changed
+17 -3

No files matched your search

+6
View File
@@ -21,6 +21,12 @@ func GetOrgRepositories(ctx context.Context, orgID int64) (RepositoryList, error
return orgRepos, db.GetEngine(ctx).Where("owner_id = ?", orgID).Find(&orgRepos)
}
// GetOrgRepositoryIDs get repo IDs belonging to the given organization
func GetOrgRepositoryIDs(ctx context.Context, orgID int64) ([]int64, error) {
var repoIDs []int64
return repoIDs, db.GetEngine(ctx).Table("repository").Where("owner_id = ?", orgID).Cols("id").Find(&repoIDs)
}
type SearchTeamRepoOptions struct {
db.ListOptions
TeamID int64