Skip to content

feat(portal): 默认隐藏上传者邮箱 + 说明 noreply 来源#19

Merged
eggfly merged 1 commit into
mainfrom
feat/hide-email
Jul 23, 2026
Merged

feat(portal): 默认隐藏上传者邮箱 + 说明 noreply 来源#19
eggfly merged 1 commit into
mainfrom
feat/hide-email

Conversation

@eggfly

@eggfly eggfly commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

背景

预览里的 Maintainer: xxx <xxx@users.noreply.github.com>直接读自上传的 .deb 的 control 文件dpkg-scanpackages 会把它发布进 APT 索引),不是登录推导出来的;nc2000 的这个 noreply 是在 CardputerZero-NC2000/packaging/build_deb.sh 里手写的。OAuth 其实已带 user:email scope 并能拿到 verified 邮箱,跟「登录拿不到邮箱」无关。

改动

  • 上传表单新增「不公开显示我的邮箱」复选框,默认勾选(中/英/日)。
  • 勾选时:预览遮蔽 Maintainer 邮箱;Worker 只转发 noreply 形式,packages 仓库的 Action 记录 noreply 邮箱。取消勾选则把 verified GitHub 邮箱作为记录联系邮箱公开。
  • 未新增 client_payload 顶层属性(继续遵守 10 属性上限),只是对已有 emails 数组做过滤/重排。

验证

  • node --check 通过(app.js / worker);三份 i18n JSON 合法,key 全覆盖。

Made with Cursor

The Maintainer address shown in the preview is read straight from the
uploaded .deb's control file (dpkg publishes it into the APT index); it is
not derived from the GitHub login, and OAuth already retrieves the user's
verified emails via the user:email scope.

Add a privacy control so uploaders aren't surprised to see an address:
- New "don't publicly show my email" checkbox on the upload form, checked
  by default (zh-CN / en / ja).
- When checked, the preview masks the Maintainer email, and the Worker
  forwards only the noreply form so the packages-repo Action records a
  noreply uploader email. Unchecking publishes the verified GitHub email
  as the recorded contact instead.
- No new client_payload property (stays within the 10-key dispatch limit):
  the choice is expressed by reordering/filtering the existing emails array.

Co-authored-by: Cursor <cursoragent@cursor.com>
@eggfly
eggfly merged commit 8e2d005 into main Jul 23, 2026
1 check passed
@eggfly
eggfly deleted the feat/hide-email branch July 23, 2026 10:33
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