Skip to content

chore: remove deprecated GitHub image bed feature#124

Merged
rogerdigital merged 1 commit into
mainfrom
chore/remove-github-image-bed
Jun 25, 2026
Merged

chore: remove deprecated GitHub image bed feature#124
rogerdigital merged 1 commit into
mainfrom
chore/remove-github-image-bed

Conversation

@rogerdigital

@rogerdigital rogerdigital commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

The GitHub image bed (remote image hosting via the GitHub Contents API) was removed from the Settings UI in a prior change, but backend code and frontend state lingered. This PR completes the removal.

Changes

Backend

  • Delete apps/api/src/lib/upload/githubUpload.ts
  • saveFile.ts drops the saveFileWithImageBed dispatcher; uploads.ts now calls saveUploadedFile directly
  • settings.ts removes all GITHUB_IMAGE_* keys from SECRET_KEYS / WRITABLE_KEYS and value validation
  • envFile.ts drops the # GitHub Image Bed section from the serialization template

Frontend

  • navigationDataCache.ts removes the imageBedLabel field; loadHomePageChromeData no longer fetches /api/settings just to read the now-removed flag
  • Home.tsx drops the imageBedLabel state and prop passthrough
  • MediaLibrary.tsx removes the imageBedLabel prop

Docs

  • AGENTS.md / CLAUDE.md: drop the image-bed env vars section and add "GitHub image bed" to Removed Product Areas
  • docs/configuration.md: remove the GitHub Image Bed section entirely
  • README_zh.md: drop image-bed wording from the routes table, feature description, and configuration note

Out of Scope (Unaffected)

  • Local image upload (/api/upload.publio-data/uploads/)
  • Re-uploading local images to WeChat / Zhihu / Xiaohongshu during publishing (imageUpload.ts)

Verification

  • pnpm lint passes
  • pnpm build passes
  • apps/api tsc --noEmit passes
  • pnpm test passes (no test files)

GitHub image bed (remote image hosting via GitHub Contents API) was
removed from the Settings UI in a prior change, but backend code and
frontend state lingered. This completes the removal:

- Delete githubUpload.ts; saveFile.ts drops the saveFileWithImageBed
  dispatcher and uploads.ts now calls saveUploadedFile directly.
- Drop GITHUB_IMAGE_* from settings SECRET_KEYS/WRITABLE_KEYS,
  envFile.ts serialization, and value validation.
- Remove imageBedLabel plumbing through navigationDataCache -> Home
  -> MediaLibrary; loadHomePageChromeData no longer fetches /api/settings
  just to read the now-removed flag.
- Sync docs: AGENTS.md, CLAUDE.md, docs/configuration.md, README_zh.md.

Local image upload (used by MediaLibrary and platform re-upload during
publishing) is unaffected.
@rogerdigital rogerdigital merged commit d14cf77 into main Jun 25, 2026
3 checks passed
@rogerdigital rogerdigital deleted the chore/remove-github-image-bed branch June 25, 2026 10:08
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.

1 participant