use user id in noreply emails#36550
Conversation
|
The ID should not be leaked to outside of the system? |
|
I've tested it manually in UI somewhat and I didn't found any issues so far, it handles both styles and keeps track of user after name change.
It's not a secret. |
There was a problem hiding this comment.
Pull request overview
Updates Gitea’s “keep email private” noreply address format to be ID-based (name+id@NoReplyAddress) so commits remain associated with the correct account even after username changes.
Changes:
- Generate placeholder (noreply) emails as
lowername+uid@NoReplyAddress. - Extend user lookup by email to recognize both legacy
name@NoReplyAddressand newname+id@NoReplyAddressformats. - Update and expand integration/unit tests to assert the new noreply format and related lookup behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/integration/repofiles_change_test.go | Updates expected commit author/committer noreply emails to include +id. |
| tests/integration/editor_test.go | Updates web editor commit email expectation for “keep private” default to include +id. |
| models/user/user_test.go | Adds/extends test cases to cover user+id@NoReplyAddress resolution and conflicts. |
| models/user/user.go | Switches placeholder generation to +id and updates lookup logic to support ID-based aliases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* origin/main: (2555 commits) automate updating nix flakes (go-gitea#35641) Update AGENTS.md instructions (go-gitea#36627) use user id in noreply emails (go-gitea#36550) feat(db): Improve BuildCaseInsensitiveLike with lowercase (go-gitea#36598) [skip ci] Updated translations via Crowdin BUG: Fix workflow run jobs API returning null steps (go-gitea#36603) Refactor highlight and diff (go-gitea#36599) Fix bug when do LFS GC (go-gitea#36500) feature to be able to filter project boards by milestones (go-gitea#36321) Update emoji data for Unicode 16 (go-gitea#36596) Adapt monaco error matching pattern to recent webpack config change (go-gitea#36533) Fix a bug user could change another user's primary email (go-gitea#36586) fix(repo-editor): disable Monaco `editContext` to avoid bugs with lost focus (go-gitea#36585) Fine tune diff highlighting (go-gitea#36592) Add code editor setting dropdowns (go-gitea#36534) Update to go 1.26.0 and golangci-lint 2.9.0 (go-gitea#36588) Improve diff highlighting (go-gitea#36583) Fix markup code block layout (go-gitea#36578) Remove striped tables in UI (go-gitea#36509) Fix vertical alignment of `.commit-sign-badge` children (go-gitea#36570) ... # Conflicts: # custom/conf/app.example.ini # docs/content/administration/config-cheat-sheet.en-us.md # docs/content/administration/config-cheat-sheet.zh-cn.md # modules/setting/security.go # routers/common/errpage.go # services/context/api.go # services/context/context.go
|
Should this match GitHub's |
|
not github's per say but yeah. It should be a |
This implements id based hidden emails in format of
user+id@NoReplyAddressresolves: #33471
The change is not breaking however it is recommended for users to move to this newer type of no reply address