diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 15:07:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-02 15:07:57 +0300 |
commit | 988b28ec1a379d38f6ac9ed04886ee564fd447fd (patch) | |
tree | 9d93267209387e62d23ea7abf81ef9c0d64f2f0b /doc | |
parent | a325f3a104748ecc68df7c3d793940aa709a111f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/groups.md | 15 | ||||
-rw-r--r-- | doc/development/README.md | 1 | ||||
-rw-r--r-- | doc/development/database_review.md | 2 | ||||
-rw-r--r-- | doc/development/migration_style_guide.md | 4 | ||||
-rw-r--r-- | doc/development/rails_initializers.md | 16 | ||||
-rw-r--r-- | doc/user/admin_area/settings/visibility_and_access_controls.md | 2 | ||||
-rw-r--r-- | doc/user/group/index.md | 15 | ||||
-rw-r--r-- | doc/user/project/issues/csv_import.md | 8 |
8 files changed, 54 insertions, 9 deletions
diff --git a/doc/api/groups.md b/doc/api/groups.md index 3a488ca6546..e48cb78b2cc 100644 --- a/doc/api/groups.md +++ b/doc/api/groups.md @@ -42,6 +42,7 @@ GET /groups "emails_disabled": null, "mentions_disabled": null, "lfs_enabled": true, + "default_branch_protection": 2, "avatar_url": "http://localhost:3000/uploads/group/avatar/1/foo.jpg", "web_url": "http://localhost:3000/groups/foo-bar", "request_access_enabled": false, @@ -76,6 +77,7 @@ GET /groups?statistics=true "emails_disabled": null, "mentions_disabled": null, "lfs_enabled": true, + "default_branch_protection": 2, "avatar_url": "http://localhost:3000/uploads/group/avatar/1/foo.jpg", "web_url": "http://localhost:3000/groups/foo-bar", "request_access_enabled": false, @@ -148,6 +150,7 @@ GET /groups/:id/subgroups "emails_disabled": null, "mentions_disabled": null, "lfs_enabled": true, + "default_branch_protection": 2, "avatar_url": "http://gitlab.example.com/uploads/group/avatar/1/foo.jpg", "web_url": "http://gitlab.example.com/groups/foo-bar", "request_access_enabled": false, @@ -493,9 +496,20 @@ Parameters: | `lfs_enabled` | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. | | `request_access_enabled` | boolean | no | Allow users to request member access. | | `parent_id` | integer | no | The parent group ID for creating nested group. | +| `default_branch_protection` | integer | no | See [Options for `default_branch_protection`](#options-for-default_branch_protection). Default to the global level default branch protection setting. | | `shared_runners_minutes_limit` | integer | no | **(STARTER ONLY)** Pipeline minutes quota for this group. | | `extra_shared_runners_minutes_limit` | integer | no | **(STARTER ONLY)** Extra pipeline minutes quota for this group. | +### Options for `default_branch_protection` + +The `default_branch_protection` attribute determines whether developers and maintainers can push to the applicable master branch, as described in the following table: + +| Value | Description | +|-------|-------------------------------------------------------------------------------------------------------------| +| `0` | No protection. Developers and maintainers can: <br>- Push new commits<br>- Force push changes<br>- Delete the branch | +| `1` | Partial protection. Developers and maintainers can: <br>- Push new commits | +| `2` | Full protection. Only maintainers can: <br>- Push new commits | + ## Transfer project to group Transfer a project to the Group namespace. Available only to instance administrators, although an [alternative API endpoint](projects.md#transfer-a-project-to-a-new-namespace) is available which does not require instance administrator access. Transferring projects may fail when tagged packages exist in the project's repository. @@ -542,6 +556,7 @@ PUT /groups/:id | `mentions_disabled` | boolean | no | Disable the capability of a group from getting mentioned | | `lfs_enabled` (optional) | boolean | no | Enable/disable Large File Storage (LFS) for the projects in this group. | | `request_access_enabled` | boolean | no | Allow users to request member access. | +| `default_branch_protection` | integer | no | See [Options for `default_branch_protection`](#options-for-default_branch_protection). | | `file_template_project_id` | integer | no | **(PREMIUM)** The ID of a project to load custom file templates from. | | `shared_runners_minutes_limit` | integer | no | **(STARTER ONLY)** Pipeline minutes quota for this group. | | `extra_shared_runners_minutes_limit` | integer | no | **(STARTER ONLY)** Extra pipeline minutes quota for this group. | diff --git a/doc/development/README.md b/doc/development/README.md index 01dff0c2017..6121ddf3ed6 100644 --- a/doc/development/README.md +++ b/doc/development/README.md @@ -97,6 +97,7 @@ Complementary reads: - [Issue types vs first-class types](issue_types.md) - [Application limits](application_limits.md) - [Redis guidelines](redis.md) +- [Rails initializers](rails_initializers.md) ## Performance guides diff --git a/doc/development/database_review.md b/doc/development/database_review.md index 77e5060720b..4e97e5961b6 100644 --- a/doc/development/database_review.md +++ b/doc/development/database_review.md @@ -187,4 +187,4 @@ NOTE: **Note:** Keep in mind that all runtimes should be measured against GitLab |----|----|---| | Regular migrations on `db/migrate` | `3 minutes` | A valid exception are index creation as this can take a long time. | | Post migrations on `db/post_migrate` | `10 minutes` | | -| Background migrations | --- | Since these are suitable for larger tables, it's not possible to set a precise timing guideline, however, any query must stay well below `10s` of execution time. | +| Background migrations | --- | Since these are suitable for larger tables, it's not possible to set a precise timing guideline, however, any single query must stay below `1 second` execution time with cold caches. | diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index f3f46baa54f..3f202115b4c 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -432,10 +432,6 @@ default values if absolutely necessary. There is a RuboCop cop that will fail if this method is used on some tables that are very large on GitLab.com, which would cause other issues. -For a small table (such as an empty one or one with less than `1,000` records), -use `add_column` and `change_column_default` in a single-transaction migration, -combining it with other operations that don't require `disable_ddl_transaction!`. - ## Changing the column default One might think that changing a default column with `change_column_default` is an diff --git a/doc/development/rails_initializers.md b/doc/development/rails_initializers.md new file mode 100644 index 00000000000..6473baf58d4 --- /dev/null +++ b/doc/development/rails_initializers.md @@ -0,0 +1,16 @@ +# Rails initializers + +By default, Rails loads Zeitwerk after the initializers in `config/initializers` are loaded. +Autoloading before Zeitwerk is loaded is now deprecated but because we use a lot of autoloaded +constants in our initializers, we had to move the loading of Zeitwerk earlier than these +initializers. + +A side-effect of this is that in the initializers, `config.autoload_paths` is already frozen. + +To run an initializer before Zeitwerk is loaded, you need put them in `config/initializers_before_autoloader`. +Ruby files in this folder are loaded in alphabetical order just like the default Rails initializers. + +Some examples where you would need to do this are: + +1. Modifying Rails' `config.autoload_paths` +1. Changing configuration that Zeitwerk uses, e.g. inflections diff --git a/doc/user/admin_area/settings/visibility_and_access_controls.md b/doc/user/admin_area/settings/visibility_and_access_controls.md index 8f64e9207b5..704dd89ede2 100644 --- a/doc/user/admin_area/settings/visibility_and_access_controls.md +++ b/doc/user/admin_area/settings/visibility_and_access_controls.md @@ -26,6 +26,8 @@ To change the default branch protection: For more details, see [Protected branches](../../project/protected_branches.md). +To change this setting for a specific group, see [Default branch protection for groups](../../group/index.md#changing-the-default-branch-protection-of-a-group) + ## Default project creation protection Project creation protection specifies which roles can create projects. diff --git a/doc/user/group/index.md b/doc/user/group/index.md index 6b76e070c41..cca82f6a4fb 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -181,6 +181,21 @@ of a group: 1. Give a different member **Owner** permissions. 1. Have the new owner sign in and remove **Owner** permissions from you. +## Changing the default branch protection of a group + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/7583) in GitLab 12.9. + +By default, every group inherits the branch protection set at the global level. + +To change this setting for a specific group: + +1. Go to the group's **{settings}** **Settings > General** page. +1. Expand the **Permissions, LFS, 2FA** section. +1. Select the desired option in the **Default branch protection** dropdown list. +1. Click **Save changes**. + +To change this setting globally, see [Default branch protection](../admin_area/settings/visibility_and_access_controls.md#default-branch-protection). + ## Add projects to a group There are two different ways to add a new project to a group: diff --git a/doc/user/project/issues/csv_import.md b/doc/user/project/issues/csv_import.md index 56643dcee53..d67b135186f 100644 --- a/doc/user/project/issues/csv_import.md +++ b/doc/user/project/issues/csv_import.md @@ -3,7 +3,7 @@ > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/23532) in GitLab 11.7. Issues can be imported to a project by uploading a CSV file with the columns -`title` and `description`, in that order. +`title` and `description`. The user uploading the CSV file will be set as the author of the imported issues. @@ -31,9 +31,9 @@ to you once the import is complete. When importing issues from a CSV file, it must be formatted in a certain way: -- **header row:** CSV files must contain a header row where the first column header - is `title` and the second is `description`. If additional columns are present, they - will be ignored. +- **header row:** CSV files must include the following headers: +`title` and `description`. The case of the headers does not matter. +- **columns:** Data from columns beyond `title` and `description` are not imported. - **separators:** The column separator is automatically detected from the header row. Supported separator characters are: commas (`,`), semicolons (`;`), and tabs (`\t`). The row separator can be either `CRLF` or `LF`. |