Skip to content

refactor: make IsCodeRepo testable using GitHub client #110

Merged
eddie-knight merged 3 commits intoossf:mainfrom
zohayb23:refactor/isCodeRepo-ghclient
Sep 3, 2025
Merged

refactor: make IsCodeRepo testable using GitHub client #110
eddie-knight merged 3 commits intoossf:mainfrom
zohayb23:refactor/isCodeRepo-ghclient

Conversation

@zohayb23
Copy link
Copy Markdown
Contributor

Summary

Refactored IsCodeRepo to use GitHub client and added tests.

Changes

  • Replace MakeApiCall() with ghClient.Repositories.ListLanguages()
  • Add 3 test cases (success, no languages, error)
  • Use mock testing with mock.GetReposLanguagesByOwnerByRepo

@eddie-knight eddie-knight marked this pull request as ready for review August 14, 2025 22:40
@eddie-knight eddie-knight requested a review from a team as a code owner August 14, 2025 22:40
@eddie-knight eddie-knight marked this pull request as draft August 14, 2025 22:41
Comment thread data/rest-data.go
Comment thread data/rest-data_test.go
Signed-off-by: Zohayb Bhatti <zohayb23@gmail.com>
@zohayb23 zohayb23 marked this pull request as ready for review September 3, 2025 14:43
@github-actions github-actions Bot added the enhancement New feature or request label Sep 3, 2025
@eddie-knight eddie-knight merged commit 687463e into ossf:main Sep 3, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants