Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show placeholder email in privacy popup #27770

Merged
merged 4 commits into from
Oct 25, 2023
Merged

Show placeholder email in privacy popup #27770

merged 4 commits into from
Oct 25, 2023

Conversation

hakito
Copy link
Contributor

@hakito hakito commented Oct 24, 2023

This PR will show the noreply address in the privacy popup keep_email_private_popup.

I had to look into the source code to figure out which E-Mail Adress I had to use on gitea.com to hide it from public access.

According to the contribution guidelines I only updated the en-US translation file.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 24, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 24, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 24, 2023
@silverwind silverwind added the type/enhancement An improvement of existing functionality label Oct 24, 2023
@@ -73,7 +73,7 @@

<div class="field">
<div class="ui checkbox">
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup"}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
<label data-tooltip-content="{{ctx.Locale.Tr "settings.keep_email_private_popup" .SignedUser.GetPlaceholderEmail}}"><strong>{{ctx.Locale.Tr "settings.keep_email_private"}}</strong></label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Use username@noreply.domain in commits to associate them with your account."

Does it really work this way? I am not sure it really works, this is a fake email address, I can't figure out how it could "associate"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the mapping of the noreply address to the account:

if strings.HasSuffix(email, fmt.Sprintf("@%s", setting.Service.NoReplyAddress)) {

Although it's ugly that it does not use the GetPlaceholderEmail, it works. I tried it in my commit for act runner:
https://gitea.com/hakito/act_runner/commit/f21bc49bd2d81be3ca47ca5b6210a4b05f46e073

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Oct 25, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 25, 2023
@GiteaBot
Copy link
Contributor

@hakito please fix the merge conflicts. 🍵

@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 25, 2023
@lunny lunny enabled auto-merge (squash) October 25, 2023 10:02
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 25, 2023
@lunny lunny merged commit 31f8880 into go-gitea:main Oct 25, 2023
25 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Oct 25, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 25, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 25, 2023
* giteaoffical/main:
  Fix issue not showing on default board and add test (go-gitea#27720)
  Show placeholder email in privacy popup (go-gitea#27770)
  Add word-break to organization name and description (go-gitea#26624)
  Add border to file tree 'sub-items' and add padding to 'item-file' (go-gitea#27593)
  Fix the missing repo count in new team page and edit team page (go-gitea#27743)
  Only show diff file tree when more than one file changed (go-gitea#27775)
  Add gap between diff boxes (go-gitea#27776)
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this pull request Jan 17, 2024
This PR will show the _noreply_ address in the privacy popup
_keep_email_private_popup_.

I had to look into the source code to figure out which E-Mail Adress I
had to use on gitea.com to hide it from public access.

According to the contribution guidelines I only updated the en-US
translation file.

Co-authored-by: Hakito <hakito@git.example.com>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/translation size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants