Skip to content

Inject release repo slug at build time via GITHUB_REPOSITORY - #92

Merged
neteinstein merged 1 commit into
mainfrom
claude/update-latest-release-url-gbr819
Sep 4, 2026
Merged

neteinstein merged 1 commit into
mainfrom
claude/update-latest-release-url-gbr819

Conversation

@neteinstein

Copy link
Copy Markdown
Owner

Summary

  • Adds a GITHUB_REPO_SLUG buildConfigField in app/build.gradle, sourced from the GITHUB_REPOSITORY env var that GitHub Actions sets automatically on every run (owner/repo), falling back to neteinstein/CompareApp for local builds outside CI.
  • UpdateRepositoryImpl.LATEST_RELEASE_URL now builds the GitHub Releases API URL from BuildConfig.GITHUB_REPO_SLUG instead of a hardcoded repo, so an APK always checks for updates against the repo that actually built it.

Why

Follow-up to a previous request to update the hardcoded release URL. Instead of hardcoding a repo name that can drift, this makes it build-time configurable so it's automatically correct for whichever repo/fork produces the release.

Test plan

  • Reviewed the diff for correctness (repo import order, buildConfigField syntax matching the existing BUILD_NUMBER pattern)
  • CI build/lint/tests (this sandbox's network policy blocks dl.google.com, so a full Gradle build could not be run locally)

🤖 Generated with Claude Code

https://claude.ai/code/session_013j66x6M3ZcMoXGZpQcLuPh


Generated by Claude Code

Adds a GITHUB_REPO_SLUG buildConfigField sourced from the GITHUB_REPOSITORY
env var GitHub Actions sets on every run, so UpdateRepositoryImpl's
LATEST_RELEASE_URL always targets the repo that actually built the APK
instead of a hardcoded one. Falls back to neteinstein/CompareApp for local
builds outside CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013j66x6M3ZcMoXGZpQcLuPh
@neteinstein
neteinstein merged commit 3bbe216 into main Sep 4, 2026
1 check passed
@neteinstein
neteinstein deleted the claude/update-latest-release-url-gbr819 branch September 4, 2026 09:27
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