Skip to content

feat: 去掉 author 邮箱限制,改为包名先到先得(按 GitHub login)#8

Merged
eggfly merged 1 commit into
mainfrom
feat/first-come-ownership
Jul 21, 2026
Merged

feat: 去掉 author 邮箱限制,改为包名先到先得(按 GitHub login)#8
eggfly merged 1 commit into
mainfrom
feat/first-come-ownership

Conversation

@eggfly

@eggfly eggfly commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

目的

dev.cardputer.cc 上传/下架此前要求 deb 的 Maintainer 邮箱在上传者的 GitHub 验证邮箱里,才认作 owner。改为:谁先上传某个包名,谁就是 owner,owner 以上传者的 GitHub login 为准,并在 release manifest 里记录 uploaded_by / uploader_email(邮箱仅用于联系/留痕)。

改动

  • Worker(worker/src/index.js/api/submit/api/unpublish 改为按 login 判所有权。Worker 只能读到 APT 索引(Maintainer),所以从 Maintainer 的 noreply 地址反推 login 做尽力而为的预检;真正权威校验在 packages 仓库的 Action 里按 uploaded_by 复核。去掉了基于邮箱包含关系的 not_owner 判断和 maskEmail
  • site/debparse.js:新增可复用/可测试的 loginFromNoreply()(兼容 login@12345+login@users.noreply.github.com),补充单测。
  • packages-workflows/process-web-submission.yml:去掉「Maintainer 邮箱必须匹配」的 Check;所有权改为按 uploaded_by login(历史包从 Maintainer noreply 反推);生成 manifest 时写入 uploaded_by + uploader_email
  • packages-workflows/process-web-unpublish.yml:下架同样按记录的 uploaded_by login 校验。

注:packages-workflows/* 是要拷进 CardputerZero/packages 的副本,需同步部署。CLI 路径(czdev publish 直接建 fork PR)由 packages 仓库的 validate-pr.yml 权威校验,见配套 PR。

Made with Cursor

Drop the requirement that a submission's Maintainer email match the
uploader's verified GitHub emails. Ownership of a package name now belongs
to the GitHub login that first uploaded it, recorded as `uploaded_by` in the
release manifest; the email is kept only for contact/audit.

- worker: submit/unpublish attribute ownership by login (derived from the
  Maintainer noreply address in the APT index as a best-effort pre-check;
  the packages Action re-checks against the recorded `uploaded_by`).
- debparse: add `loginFromNoreply` helper (+ test).
- packages-workflows: process-web-submission writes `uploaded_by`/
  `uploader_email` and enforces ownership by login; process-web-unpublish
  verifies ownership by login. No email-vs-account matching.

Co-authored-by: Cursor <cursoragent@cursor.com>
@eggfly
eggfly force-pushed the feat/first-come-ownership branch from 2ff4e51 to 973963c Compare July 21, 2026 08:55
@eggfly
eggfly merged commit 28884d8 into main Jul 21, 2026
2 checks passed
@eggfly
eggfly deleted the feat/first-come-ownership branch July 21, 2026 13:00
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