fix: handle case if owner is a user, take priority over org

This commit is contained in:
2026-01-13 21:28:33 +08:00
parent 6298940adb
commit e6755bf2ba
2 changed files with 24 additions and 2 deletions

View File

@@ -131,6 +131,9 @@ func (c *HTTPClient) GetRunnerStats(
) (*RunnerStats, error) {
switch scope {
case v1alpha1.RunnerGroupScopeRepo:
if user != "" {
return c.getRunnerStatsForRepo(ctx, giteaURL, authToken, user, repo, labels)
}
return c.getRunnerStatsForRepo(ctx, giteaURL, authToken, org, repo, labels)
case v1alpha1.RunnerGroupScopeOrg:
return c.getRunnerStatsForOrg(ctx, giteaURL, authToken, org, labels)