Skip to content

Commit f6ba912

Browse files
zeripathtechknowlogick
authored andcommitted
Default NO_REPLY_ADDRESS to DOMAIN (#9325)
* Default NO_REPLY_ADDRESS to DOMAIN The default NO_REPLY_ADDRESS was previously noreply.example.org This PR changes this to default to the default DOMAIN for gitea. * Change default to noreply.%(DOMAIN)s * Change default to "noreply" + Domain
1 parent bfcce5f commit f6ba912

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

custom/conf/app.ini.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true
504504
; Default value for the domain part of the user's email address in the git log
505505
; if he has set KeepEmailPrivate to true. The user's email will be replaced with a
506506
; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
507-
NO_REPLY_ADDRESS = noreply.example.org
507+
NO_REPLY_ADDRESS = noreply.%(DOMAIN)s
508508
; Show Registration button
509509
SHOW_REGISTRATION_BUTTON = true
510510
; Default value for AutoWatchNewRepos

docs/content/doc/advanced/config-cheat-sheet.en-us.md

+2
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ relation to port exhaustion.
312312
- `DEFAULT_ORG_VISIBILITY`: **public**: Set default visibility mode for organisations, either "public", "limited" or "private".
313313
- `DEFAULT_ORG_MEMBER_VISIBLE`: **false** True will make the membership of the users visible when added to the organisation.
314314
- `ALLOW_ONLY_EXTERNAL_REGISTRATION`: **false** Set to true to force registration only using third-party services.
315+
- `NO_REPLY_ADDRESS`: **DOMAIN** Default value for the domain part of the user's email address in the git log if he has set KeepEmailPrivate to true.
316+
The user's email will be replaced with a concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS.
315317

316318
## Webhook (`webhook`)
317319

modules/setting/service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func newService() {
8383
Service.DefaultEnableDependencies = sec.Key("DEFAULT_ENABLE_DEPENDENCIES").MustBool(true)
8484
Service.AllowCrossRepositoryDependencies = sec.Key("ALLOW_CROSS_REPOSITORY_DEPENDENCIES").MustBool(true)
8585
Service.DefaultAllowOnlyContributorsToTrackTime = sec.Key("DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME").MustBool(true)
86-
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
86+
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply." + Domain)
8787
Service.EnableUserHeatmap = sec.Key("ENABLE_USER_HEATMAP").MustBool(true)
8888
Service.AutoWatchNewRepos = sec.Key("AUTO_WATCH_NEW_REPOS").MustBool(true)
8989
Service.AutoWatchOnChanges = sec.Key("AUTO_WATCH_ON_CHANGES").MustBool(false)

0 commit comments

Comments
 (0)