Skip to content

Add GitHubContributorService to fetch and display contributors on AboutScreen#395

Merged
theovilardo merged 3 commits intotheovilardo:masterfrom
lostf1sh:master
Nov 26, 2025
Merged

Add GitHubContributorService to fetch and display contributors on AboutScreen#395
theovilardo merged 3 commits intotheovilardo:masterfrom
lostf1sh:master

Conversation

@lostf1sh
Copy link
Copy Markdown
Collaborator

This pull request introduces a new feature to dynamically fetch and display the list of project contributors from the GitHub API on the AboutScreen, replacing the previously hardcoded contributors. The implementation includes a new service class for GitHub API integration, UI state management for loading and error handling, and updates to the contributor display logic.

GitHub API integration:

  • Added new GitHubContributorService and GitHubContributor data class to handle fetching and parsing contributor data from the GitHub API, filtering out bots and sorting by contributions. (app/src/main/java/com/theveloper/pixelplay/data/github/GitHubContributorService.kt)

AboutScreen contributor section:

  • Replaced the hardcoded list of contributors with a dynamic fetch using GitHubContributorService, converting API results to the local Contributor model and excluding the author from the list. (app/src/main/java/com/theveloper/pixelplay/presentation/screens/AboutScreen.kt)
  • Added UI state management for loading contributors, including a loading spinner while data is being fetched and error handling fallback to an empty list. (app/src/main/java/com/theveloper/pixelplay/presentation/screens/AboutScreen.kt)

Dependency and logging updates:

  • Imported necessary dependencies for service, logging (Timber), and Hilt injection in the AboutScreen. (app/src/main/java/com/theveloper/pixelplay/presentation/screens/AboutScreen.kt)

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +43 to +44
val response = connection.inputStream.bufferedReader().use { it.readText() }
val contributors = json.decodeFromString<List<GitHubContributor>>(response)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0 Badge Import decodeFromString to restore build

GitHubContributorService won’t compile: json.decodeFromString at contributor parsing uses the reified serialization extension, but this file doesn’t import kotlinx.serialization.decodeFromString (or supply an explicit serializer), so the call is an unresolved reference and the module fails to build before any runtime behavior can be exercised.

Useful? React with 👍 / 👎.

@lostf1sh
Copy link
Copy Markdown
Collaborator Author

Yeah, I also forgot to mention that this one won't show bots like Jules, only users. It's also more efficient than having to hardcode it manually every time a new contributor comes along.

@theovilardo theovilardo merged commit 80c1629 into theovilardo:master Nov 26, 2025
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.

2 participants