Skip to content

Make repository URL configurable via REPO_URL env var#31

Merged
Xitee1 merged 3 commits intomainfrom
feat/configurable-repo-url
Mar 26, 2026
Merged

Make repository URL configurable via REPO_URL env var#31
Xitee1 merged 3 commits intomainfrom
feat/configurable-repo-url

Conversation

@Xitee1
Copy link
Copy Markdown
Owner

@Xitee1 Xitee1 commented Mar 25, 2026

Summary

  • Replace hardcoded GitHub owner/repo with a REPO_URL env var that accepts a full URL, making it work with any git forge (GitHub, GitLab, Gitea, Codeberg, Forgejo)
  • Update checker auto-detects GitHub URLs and uses the GitHub API; hidden for non-GitHub repos
  • Links card hidden entirely when REPO_URL is empty/unset
  • Removed platform-specific license link (path format differs across forges)
  • Renamed i18n key githubReposourceCode, replaced GitHub logo with generic code icon

Test plan

  • Set REPO_URL=https://github.com/Xitee1/package-tracker → links and update checker work as before
  • Set REPO_URL=https://codeberg.org/user/repo → links show, update checker hidden
  • Unset REPO_URL → defaults to upstream GitHub URL
  • Remove REPO_URL from .env entirely → links card and update checker hidden gracefully

🤖 Generated with Claude Code

Replace hardcoded GitHub owner/repo with a full REPO_URL that works with
any git forge (GitHub, GitLab, Gitea, Codeberg, Forgejo). The update
checker auto-detects GitHub URLs and hides gracefully for other hosts.
Links card and update button are hidden when no URL is configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 25, 2026 08:28
Dockerfile defaults are sufficient; no need to duplicate in compose files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR makes the repository URL configurable via a REPO_URL environment variable, updates the About page links accordingly, and gates the update checker to GitHub repositories only.

Changes:

  • Inject REPO_URL into the frontend build (__REPO_URL__) and add container/build wiring for it (Dockerfiles + compose).
  • Update About page to build links from REPO_URL, rename i18n key (githubReposourceCode), and hide the update checker for non-GitHub URLs.
  • Remove the license link from the Links card and update translations.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/vite.config.ts Defines __REPO_URL__ at build time from process.env.REPO_URL.
frontend/src/views/AboutView.vue Builds links from REPO_URL, detects GitHub repos for update checks, hides UI sections based on configuration.
frontend/src/i18n/locales/en.json Renames “GitHub Repository” label to “Source Code”; removes license label.
frontend/src/i18n/locales/de.json German translation updates for renamed/removed keys.
frontend/env.d.ts Adds TypeScript global declaration for __REPO_URL__.
frontend/Dockerfile.prod Adds REPO_URL build arg/env for frontend build.
frontend/Dockerfile Adds REPO_URL build arg/env for frontend container.
docker-compose.yaml Passes .env into the frontend dev container.
docker-compose.prod.yaml Passes REPO_URL into the production image build args.
Dockerfile.prod Adds REPO_URL build arg/env in root production build.
.env.example Documents REPO_URL configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread frontend/vite.config.ts Outdated
Comment thread frontend/src/views/AboutView.vue
Comment thread frontend/src/views/AboutView.vue
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Xitee1 Xitee1 merged commit 18884a5 into main Mar 26, 2026
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