summaryrefslogtreecommitdiffstats
path: root/modules/setting/setting.go
diff options
context:
space:
mode:
authorLanre Adelowo <adelowomailbox@gmail.com>2019-02-10 20:27:19 +0100
committerLauris BH <lauris@nix.lv>2019-02-10 21:27:19 +0200
commit9d8178b3ac5f86a64f67ab7b5dea99347a5afe72 (patch)
treeed560142815927211f7d52db859728b88f0d9734 /modules/setting/setting.go
parentc0adb5ea8bd0b2551a8c414b54ef5bc67882de55 (diff)
downloadgitea-9d8178b3ac5f86a64f67ab7b5dea99347a5afe72.tar.gz
gitea-9d8178b3ac5f86a64f67ab7b5dea99347a5afe72.zip
Add option to close issues via commit on a non master branch (#5992)
* fixes #5957 * add tests to make sure config option is respected * use already defined struct * - use migration to make the flag repo wide not for the entire gitea instance Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created - fix copy/paste error in copyright header year and rearrange import - use repo config instead of server config value to determine if a commit should close an issue - update testsuite * use global config only when creating a new repository * allow repo admin toggle feature via UI * fix typo and improve testcase * fix fixtures * add DEFAULT prefix to config value * fix test
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r--modules/setting/setting.go42
1 files changed, 22 insertions, 20 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 0e3dc46882..d3b45ec29d 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -190,16 +190,17 @@ var (
// Repository settings
Repository = struct {
- AnsiCharset string
- ForcePrivate bool
- DefaultPrivate string
- MaxCreationLimit int
- MirrorQueueLength int
- PullRequestQueueLength int
- PreferredLicenses []string
- DisableHTTPGit bool
- AccessControlAllowOrigin string
- UseCompatSSHURI bool
+ AnsiCharset string
+ ForcePrivate bool
+ DefaultPrivate string
+ MaxCreationLimit int
+ MirrorQueueLength int
+ PullRequestQueueLength int
+ PreferredLicenses []string
+ DisableHTTPGit bool
+ AccessControlAllowOrigin string
+ UseCompatSSHURI bool
+ DefaultCloseIssuesViaCommitsInAnyBranch bool
// Repository editor settings
Editor struct {
@@ -227,16 +228,17 @@ var (
WorkInProgressPrefixes []string
} `ini:"repository.pull-request"`
}{
- AnsiCharset: "",
- ForcePrivate: false,
- DefaultPrivate: RepoCreatingLastUserVisibility,
- MaxCreationLimit: -1,
- MirrorQueueLength: 1000,
- PullRequestQueueLength: 1000,
- PreferredLicenses: []string{"Apache License 2.0,MIT License"},
- DisableHTTPGit: false,
- AccessControlAllowOrigin: "",
- UseCompatSSHURI: false,
+ AnsiCharset: "",
+ ForcePrivate: false,
+ DefaultPrivate: RepoCreatingLastUserVisibility,
+ MaxCreationLimit: -1,
+ MirrorQueueLength: 1000,
+ PullRequestQueueLength: 1000,
+ PreferredLicenses: []string{"Apache License 2.0,MIT License"},
+ DisableHTTPGit: false,
+ AccessControlAllowOrigin: "",
+ UseCompatSSHURI: false,
+ DefaultCloseIssuesViaCommitsInAnyBranch: false,
// Repository editor settings
Editor: struct {