Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
68db0ade
Commit
68db0ade
authored
Jul 01, 2020
by
Kerri Miller
Committed by
Robert Speicher
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend `ApplicationSettings` to support `default_branch_name`
parent
c9f2c7df
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
0 deletions
+15
-0
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-0
app/helpers/application_settings_helper.rb
app/helpers/application_settings_helper.rb
+1
-0
app/models/application_setting_implementation.rb
app/models/application_setting_implementation.rb
+1
-0
changelogs/unreleased/225258-extend-applicationsettings-to-support-default_branch_name.yml
...nd-applicationsettings-to-support-default_branch_name.yml
+5
-0
spec/controllers/admin/application_settings_controller_spec.rb
...controllers/admin/application_settings_controller_spec.rb
+7
-0
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
68db0ade
...
...
@@ -227,6 +227,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:raw_blob_request_limit
,
:namespace_storage_size_limit
,
:issues_create_limit
,
:default_branch_name
,
disabled_oauth_sign_in_sources:
[],
import_sources:
[],
repository_storages:
[],
...
...
app/helpers/application_settings_helper.rb
View file @
68db0ade
...
...
@@ -190,6 +190,7 @@ module ApplicationSettingsHelper
:container_expiration_policies_enable_historic_entries
,
:container_registry_token_expire_delay
,
:default_artifacts_expire_in
,
:default_branch_name
,
:default_branch_protection
,
:default_ci_config_path
,
:default_group_visibility
,
...
...
app/models/application_setting_implementation.rb
View file @
68db0ade
...
...
@@ -50,6 +50,7 @@ module ApplicationSettingImplementation
default_artifacts_expire_in:
'30 days'
,
default_branch_protection:
Settings
.
gitlab
[
'default_branch_protection'
],
default_ci_config_path:
nil
,
default_branch_name:
nil
,
default_group_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
default_project_creation:
Settings
.
gitlab
[
'default_project_creation'
],
default_project_visibility:
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
...
...
changelogs/unreleased/225258-extend-applicationsettings-to-support-default_branch_name.yml
0 → 100644
View file @
68db0ade
---
title
:
Add default_branch_name to ApplicationSettings visible attrs
merge_request
:
35681
author
:
type
:
other
spec/controllers/admin/application_settings_controller_spec.rb
View file @
68db0ade
...
...
@@ -128,6 +128,13 @@ RSpec.describe Admin::ApplicationSettingsController do
expect
(
ApplicationSetting
.
current
.
repository_storages_weighted_default
).
to
eq
(
75
)
end
it
"updates default_branch_name setting"
do
put
:update
,
params:
{
application_setting:
{
default_branch_name:
"example_branch_name"
}
}
expect
(
response
).
to
redirect_to
(
general_admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
default_branch_name
).
to
eq
(
"example_branch_name"
)
end
context
'external policy classification settings'
do
let
(
:settings
)
do
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment