refactor(env): unify env var prefixes under FORGEJO_ and FORGEJO_MCP_ #64

Merged
Claude-Run merged 1 commit from feat/FJ-49-unify-env-var-prefixes into main 2026-07-03 13:35:40 +02:00
Member

Rename the build-metadata FJ_* variables to FORGEJO_* and the bare, un-namespaced MCP runtime MCP_* variables to FORGEJO_MCP_* so every environment variable the fj binary reads lives under a single FORGEJO_ namespace. The bare MCP_* prefix could collide with any other MCP server sharing the process environment; FORGEJO_MCP_* removes that hazard.

Build metadata (baked outputs in build.rs, read via option_env! in version.rs): FJ_GIT_SHA/FJ_BUILD_DATE/FJ_COMMIT_DATE/FJ_TRAIN -> FORGEJO_; the un-prefixed build-arg inputs GIT_SHA/COMMIT_DATE/BUILD_DATE are unchanged. Runtime FJ_FALLBACK_HOST -> FORGEJO_FALLBACK_HOST in repo.rs. MCP runtime MCP_TRANSPORT/MCP_HTTP_ADDR/MCP_HTTP_TOKEN/MCP_ALLOW_EDIT/MCP_ALLOW_DELETE/MCP_ALLOW_GLOBAL_WRITE/MCP_ENDPOINT -> FORGEJO_MCP_ across fj-mcp and fj, including render_unit's baked systemd Environment= lines and its unit-file tests.

Also updates the workflows, Dockerfiles, localization .ftl files, README.md, and CLAUDE.md, and documents the breaking change (a systemd unit written by an older fj still names MCP_* and must be regenerated with fj mcp service install) in the README release note and the fj mcp service install help text.

#FJ-49

Rename the build-metadata `FJ_*` variables to `FORGEJO_*` and the bare, un-namespaced MCP runtime `MCP_*` variables to `FORGEJO_MCP_*` so every environment variable the `fj` binary reads lives under a single `FORGEJO_` namespace. The bare `MCP_*` prefix could collide with any other MCP server sharing the process environment; `FORGEJO_MCP_*` removes that hazard. Build metadata (baked outputs in build.rs, read via option_env! in version.rs): FJ_GIT_SHA/FJ_BUILD_DATE/FJ_COMMIT_DATE/FJ_TRAIN -> FORGEJO_*; the un-prefixed build-arg inputs GIT_SHA/COMMIT_DATE/BUILD_DATE are unchanged. Runtime FJ_FALLBACK_HOST -> FORGEJO_FALLBACK_HOST in repo.rs. MCP runtime MCP_TRANSPORT/MCP_HTTP_ADDR/MCP_HTTP_TOKEN/MCP_ALLOW_EDIT/MCP_ALLOW_DELETE/MCP_ALLOW_GLOBAL_WRITE/MCP_ENDPOINT -> FORGEJO_MCP_* across fj-mcp and fj, including render_unit's baked systemd Environment= lines and its unit-file tests. Also updates the workflows, Dockerfiles, localization .ftl files, README.md, and CLAUDE.md, and documents the breaking change (a systemd unit written by an older `fj` still names MCP_* and must be regenerated with `fj mcp service install`) in the README release note and the `fj mcp service install` help text. #FJ-49
refactor(env): unify env var prefixes under FORGEJO_ and FORGEJO_MCP_
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 24s
Create release / Create release from merged PR (pull_request) Has been skipped
040479f974
Rename the build-metadata `FJ_*` variables to `FORGEJO_*` and the bare, un-namespaced MCP runtime `MCP_*` variables to `FORGEJO_MCP_*` so every environment variable the `fj` binary reads lives under a single `FORGEJO_` namespace. The bare `MCP_*` prefix could collide with any other MCP server sharing the process environment; `FORGEJO_MCP_*` removes that hazard.

Build metadata (baked outputs in build.rs, read via option_env! in version.rs): FJ_GIT_SHA/FJ_BUILD_DATE/FJ_COMMIT_DATE/FJ_TRAIN -> FORGEJO_*; the un-prefixed build-arg inputs GIT_SHA/COMMIT_DATE/BUILD_DATE are unchanged. Runtime FJ_FALLBACK_HOST -> FORGEJO_FALLBACK_HOST in repo.rs. MCP runtime MCP_TRANSPORT/MCP_HTTP_ADDR/MCP_HTTP_TOKEN/MCP_ALLOW_EDIT/MCP_ALLOW_DELETE/MCP_ALLOW_GLOBAL_WRITE/MCP_ENDPOINT -> FORGEJO_MCP_* across fj-mcp and fj, including render_unit's baked systemd Environment= lines and its unit-file tests.

Also updates the workflows, Dockerfiles, localization .ftl files, README.md, and CLAUDE.md, and documents the breaking change (a systemd unit written by an older `fj` still names MCP_* and must be regenerated with `fj mcp service install`) in the README release note and the `fj mcp service install` help text.

#FJ-49
Claude-Run deleted branch feat/FJ-49-unify-env-var-prefixes 2026-07-03 13:35:40 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/forgejo-cli!64
No description provided.