Skip to content

refactor github runner scaler#6834

Merged
zroubalik merged 4 commits intokedacore:mainfrom
stevencjy:github-runner-scaler-typed-config
Jul 21, 2025
Merged

refactor github runner scaler#6834
zroubalik merged 4 commits intokedacore:mainfrom
stevencjy:github-runner-scaler-typed-config

Conversation

@stevencjy
Copy link
Contributor

@stevencjy stevencjy commented Jun 11, 2025

Provide a description of what has been changed

Checklist

Relates to #5797

@stevencjy stevencjy requested a review from a team as a code owner June 11, 2025 05:56
@rickbrouwer
Copy link
Member

rickbrouwer commented Jun 15, 2025

/run-e2e github*
Update: You can check the progress here

Copy link
Member

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thank you

(+1 to mentioned enums improvement)

@stevencjy
Copy link
Contributor Author

hi, I've pushed a fix.

would like to request another /run-e2e github*

thanks

@rickbrouwer
Copy link
Member

rickbrouwer commented Jun 18, 2025

What about using a const githubDefaultPerPage = 30 and

if len(repos) < githubDefaultPerPage {
            break
}

And is it an idea to merge ORG and ENT since they use the same url?

switch s.metadata.RunnerScope {
case ORG, ENT:
	// Both use the same endpoint format
	url = fmt.Sprintf("%s/orgs/%s/repos?page=%s", s.metadata.GithubAPIURL, s.metadata.Owner, strconv.Itoa(page))
case REPO:
	url = fmt.Sprintf("%s/users/%s/repos?page=%s", s.metadata.GithubAPIURL, s.metadata.Owner, strconv.Itoa(page))
default:
	return nil, fmt.Errorf("runnerScope %s not supported", s.metadata.RunnerScope)

@stevencjy
Copy link
Contributor Author

nice catch, pushed a fix

What about using a const githubDefaultPerPage = 30 and

if len(repos) < githubDefaultPerPage {
            break
}

And is it an idea to merge ORG and ENT since they use the same url?

switch s.metadata.RunnerScope {
case ORG, ENT:
	// Both use the same endpoint format
	url = fmt.Sprintf("%s/orgs/%s/repos?page=%s", s.metadata.GithubAPIURL, s.metadata.Owner, strconv.Itoa(page))
case REPO:
	url = fmt.Sprintf("%s/users/%s/repos?page=%s", s.metadata.GithubAPIURL, s.metadata.Owner, strconv.Itoa(page))
default:
	return nil, fmt.Errorf("runnerScope %s not supported", s.metadata.RunnerScope)

stevencjy added 4 commits July 7, 2025 20:42
Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
… present. Address comment

Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
@wozniakjan wozniakjan force-pushed the github-runner-scaler-typed-config branch from f1a1070 to e92e05c Compare July 7, 2025 18:42
@rickbrouwer
Copy link
Member

rickbrouwer commented Jul 9, 2025

/run-e2e github*
Update: You can check the progress here

Copy link
Member

@rickbrouwer rickbrouwer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 🙌🏼

@zroubalik zroubalik merged commit 2034dbf into kedacore:main Jul 21, 2025
25 checks passed
@stevencjy stevencjy deleted the github-runner-scaler-typed-config branch July 22, 2025 03:30
dpochopsky pushed a commit to dpochopsky/keda that referenced this pull request Sep 12, 2025
Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
Signed-off-by: David Pochopsky <david.pochopsky@united.com>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Dec 22, 2025
Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
tangobango5 pushed a commit to tangobango5/keda that referenced this pull request Feb 13, 2026
Signed-off-by: Steven Chau <stevenchau1998@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants