diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-29 15:08:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-29 15:08:48 +0300 |
commit | e5f2a04e9d54615fded2ca05d0d5eef464795a8f (patch) | |
tree | 5412fccdb0a63b449fba4d7998eaa05ca70091ba /doc | |
parent | ad2789aeba21edaadcbdc06523462e6fd87d4ba1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md | 17 | ||||
-rw-r--r-- | doc/api/discussions.md | 6 | ||||
-rw-r--r-- | doc/api/graphql/reference/index.md | 2 | ||||
-rw-r--r-- | doc/api/resource_access_tokens.md | 5 | ||||
-rw-r--r-- | doc/development/contributing/style_guides.md | 2 | ||||
-rw-r--r-- | doc/development/database/multiple_databases.md | 9 | ||||
-rw-r--r-- | doc/development/sidekiq_style_guide.md | 8 | ||||
-rw-r--r-- | doc/user/discussions/img/comment_type_toggle.gif | bin | 70796 -> 0 bytes | |||
-rw-r--r-- | doc/user/discussions/img/reply_to_comment.gif | bin | 508115 -> 0 bytes | |||
-rw-r--r-- | doc/user/discussions/index.md | 95 | ||||
-rw-r--r-- | doc/user/project/issues/issue_data_and_actions.md | 2 | ||||
-rw-r--r-- | doc/user/project/settings/project_access_tokens.md | 3 |
12 files changed, 90 insertions, 59 deletions
diff --git a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md index c7b3f02dc6d..11b08c76612 100644 --- a/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md +++ b/doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md @@ -279,6 +279,23 @@ p.each do |project| end ``` +### Bulk update push rules for _all_ projects + +For example, enable **Check whether the commit author is a GitLab user** and **Do not allow users to remove Git tags with `git push`** checkboxes, and create a filter for allowing commits from a specific e-mail domain only: + +``` ruby +Project.find_each do |p| + pr = p.push_rule || PushRule.new(project: p) + # Check whether the commit author is a GitLab user + pr.member_check = true + # Do not allow users to remove Git tags with `git push` + pr.deny_delete_tag = true + # Commit author's email + pr.author_email_regex = '@domain\.com$' + pr.save! +end +``` + ## Bulk update to change all the Jira integrations to Jira instance-level values To change all Jira project to use the instance-level integration settings: diff --git a/doc/api/discussions.md b/doc/api/discussions.md index d822a60a427..9e9b9dcc901 100644 --- a/doc/api/discussions.md +++ b/doc/api/discussions.md @@ -164,7 +164,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitla ### Add note to existing issue thread -Adds a new note to the thread. This can also [create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment). +Adds a new note to the thread. This can also [create a thread from a single comment](../user/discussions/#create-a-thread-by-replying-to-a-standard-comment). **WARNING** Notes can be added to other items than comments, such as system notes, making them threads. @@ -581,7 +581,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitla ### Add note to existing epic thread Adds a new note to the thread. This can also -[create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment). +[create a thread from a single comment](../user/discussions/#create-a-thread-by-replying-to-a-standard-comment). ```plaintext POST /groups/:id/epics/:epic_id/discussions/:discussion_id/notes @@ -966,7 +966,7 @@ curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab ### Add note to existing merge request thread Adds a new note to the thread. This can also -[create a thread from a single comment](../user/discussions/#start-a-thread-by-replying-to-a-standard-comment). +[create a thread from a single comment](../user/discussions/#create-a-thread-by-replying-to-a-standard-comment). ```plaintext POST /projects/:id/merge_requests/:merge_request_iid/discussions/:discussion_id/notes diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 2a1e7598033..c1ee5febbad 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -8805,6 +8805,7 @@ Relationship between an epic and an issue. | <a id="epicissuemovedto"></a>`movedTo` | [`Issue`](#issue) | Updated Issue after it got moved to another project. | | <a id="epicissuenotes"></a>`notes` | [`NoteConnection!`](#noteconnection) | All notes on this noteable. (see [Connections](#connections)) | | <a id="epicissueparticipants"></a>`participants` | [`UserCoreConnection`](#usercoreconnection) | List of participants in the issue. (see [Connections](#connections)) | +| <a id="epicissueprojectid"></a>`projectId` | [`Int!`](#int) | ID of the issue project. | | <a id="epicissuerelationpath"></a>`relationPath` | [`String`](#string) | URI path of the epic-issue relation. | | <a id="epicissuerelativeposition"></a>`relativePosition` | [`Int`](#int) | Relative position of the issue (used for positioning in epic tree and issue boards). | | <a id="epicissueseverity"></a>`severity` | [`IssuableSeverity`](#issuableseverity) | Severity level of the incident. | @@ -9853,6 +9854,7 @@ Returns [`VulnerabilitySeveritiesCount`](#vulnerabilityseveritiescount). | <a id="issuemovedto"></a>`movedTo` | [`Issue`](#issue) | Updated Issue after it got moved to another project. | | <a id="issuenotes"></a>`notes` | [`NoteConnection!`](#noteconnection) | All notes on this noteable. (see [Connections](#connections)) | | <a id="issueparticipants"></a>`participants` | [`UserCoreConnection`](#usercoreconnection) | List of participants in the issue. (see [Connections](#connections)) | +| <a id="issueprojectid"></a>`projectId` | [`Int!`](#int) | ID of the issue project. | | <a id="issuerelativeposition"></a>`relativePosition` | [`Int`](#int) | Relative position of the issue (used for positioning in epic tree and issue boards). | | <a id="issueseverity"></a>`severity` | [`IssuableSeverity`](#issuableseverity) | Severity level of the incident. | | <a id="issuesladueat"></a>`slaDueAt` | [`Time`](#time) | Timestamp of when the issue SLA expires. | diff --git a/doc/api/resource_access_tokens.md b/doc/api/resource_access_tokens.md index a134eb5adca..3532cfda47b 100644 --- a/doc/api/resource_access_tokens.md +++ b/doc/api/resource_access_tokens.md @@ -59,12 +59,13 @@ POST projects/:id/access_tokens | `id` | integer or string | yes | The ID or [URL-encoded path of the project](index.md#namespaced-path-encoding) | | `name` | String | yes | The name of the project access token | | `scopes` | `Array[String]` | yes | [List of scopes](../user/project/settings/project_access_tokens.md#limiting-scopes-of-a-project-access-token) | +| `access_level` | Integer | no | A valid access level. Default value is 40 (Maintainer). Other allowed values are 10 (Guest), 20 (Reporter), and 30 (Developer). | | `expires_at` | Date | no | The token expires at midnight UTC on that date | ```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \ --header "Content-Type:application/json" \ ---data '{ "name":"test_token", "scopes":["api", "read_repository"], "expires_at":"2021-01-31" }' \ +--data '{ "name":"test_token", "scopes":["api", "read_repository"], "expires_at":"2021-01-31", "access_level": 30 }' \ "https://gitlab.example.com/api/v4/projects/<project_id>/access_tokens" ``` @@ -82,7 +83,7 @@ curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" \ "id" : 58, "expires_at" : "2021-01-31", "token" : "D4y...Wzr", - "access_level": 40 + "access_level": 30 } ``` diff --git a/doc/development/contributing/style_guides.md b/doc/development/contributing/style_guides.md index 20f24b0fafc..8b54d3566ae 100644 --- a/doc/development/contributing/style_guides.md +++ b/doc/development/contributing/style_guides.md @@ -115,7 +115,7 @@ pre-push: skip: false ``` -For more information, check out [this Lefthook documentation section](https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md#skipping-commands). +For more information, check out [Lefthook documentation Skipping commands section](https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.md#skipping-commands). ## Ruby, Rails, RSpec diff --git a/doc/development/database/multiple_databases.md b/doc/development/database/multiple_databases.md index d8ff7ef1167..2895cef86fc 100644 --- a/doc/development/database/multiple_databases.md +++ b/doc/development/database/multiple_databases.md @@ -19,7 +19,7 @@ feature is still under development, and is not ready for production use. By default, GitLab is configured to use only one main database. To opt-in to use a main database, and CI database, modify the -`config/database.yml` file to have a `primary` and a `ci` database +`config/database.yml` file to have a `main` and a `ci` database configurations. For example, given a `config/database.yml` like below: ```yaml @@ -48,7 +48,7 @@ Edit the `config/database.yml` to look like this: ```yaml development: - primary: + main: adapter: postgresql encoding: unicode database: gitlabhq_development @@ -69,7 +69,7 @@ development: statement_timeout: 120s test: &test - primary: + main: adapter: postgresql encoding: unicode database: gitlabhq_test @@ -90,9 +90,6 @@ test: &test statement_timeout: 120s ``` -Note that we use `primary` in the `config/database.yml` to refer to the main -database. This is to match the default name Rails has. - ### Migrations Any migrations that affect `Ci::BaseModel` models diff --git a/doc/development/sidekiq_style_guide.md b/doc/development/sidekiq_style_guide.md index 4e8228f9ad0..bb61edba9a1 100644 --- a/doc/development/sidekiq_style_guide.md +++ b/doc/development/sidekiq_style_guide.md @@ -392,8 +392,12 @@ end If a large number of background jobs get scheduled at once, queueing of jobs may occur while jobs wait for a worker node to be become available. This is normal and gives the system resilience by allowing it to gracefully handle spikes in -traffic. Some jobs, however, are more sensitive to latency than others. Examples -of these jobs include: +traffic. Some jobs, however, are more sensitive to latency than others. + +In general, latency-sensitive jobs perform operations that a user could +reasonably expect to happen synchronously, rather than asynchronously in a +background worker. A common example is a write following an action. Examples of +these jobs include: 1. A job which updates a merge request following a push to a branch. 1. A job which invalidates a cache of known branches for a project after a push diff --git a/doc/user/discussions/img/comment_type_toggle.gif b/doc/user/discussions/img/comment_type_toggle.gif Binary files differdeleted file mode 100644 index b73c197b97f..00000000000 --- a/doc/user/discussions/img/comment_type_toggle.gif +++ /dev/null diff --git a/doc/user/discussions/img/reply_to_comment.gif b/doc/user/discussions/img/reply_to_comment.gif Binary files differdeleted file mode 100644 index c62f7fdb5fe..00000000000 --- a/doc/user/discussions/img/reply_to_comment.gif +++ /dev/null diff --git a/doc/user/discussions/index.md b/doc/user/discussions/index.md index 22086445c19..789cd860451 100644 --- a/doc/user/discussions/index.md +++ b/doc/user/discussions/index.md @@ -34,6 +34,50 @@ You can create comments in places like: Each object can have as many as 5,000 comments. +## Create a thread by replying to a standard comment + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/30299) in GitLab 11.9. + +When you reply to a standard comment, you create a thread. + +Prerequisites: + +- You must have at least the [Guest role](../permissions.md#project-members-permissions). +- You must be in an issue, merge request, or epic. Commits and snippets threads are not supported. + +To create a thread by replying to a comment: + +1. On the top right of the comment, select **{comment}** (**Reply to comment**). + + ![Reply to comment button](img/reply_to_comment_button.png) + + The reply area is displayed. + +1. Type your reply. +1. Select **Comment** or **Add comment now** (depending on where in the UI you are replying). + +The top comment is converted to a thread. + +## Create a thread without replying to a comment + +You can create a thread without replying to a standard comment. + +Prerequisites: + +- You must have at least the [Guest role](../permissions.md#project-members-permissions). +- You must be in an issue, commit, snippet, or merge request. + +To create a thread: + +1. Type a comment. +1. Below the comment, to the right of the **Comment** button, select the down arrow (**{chevron-down}**). +1. From the list, select **Start thread**. +1. Select **Start thread** again. + +A threaded comment is created. + +![Thread comment](img/discussion_comment.png) + ## Reply to a comment by sending email If you have ["reply by email"](../../administration/reply_by_email.md) configured, @@ -61,7 +105,7 @@ Thread resolution helps keep track of progress during planning or code review. Every thread in merge requests, commits, commit diffs, and snippets is initially displayed as unresolved. They can then be individually resolved by anyone -with at least Developer access to the project or by the author of the change being reviewed. +with at least the Developer role to the project or by the author of the change being reviewed. If the thread has been resolved and a non-member un-resolves their own response, this also unresolves the discussion thread. If the non-member then resolves this same response, this resolves the discussion thread. @@ -188,33 +232,19 @@ From now on, any threads on a diff are resolved by default if a push makes that diff section outdated. Threads on lines that don't change and top-level resolvable threads are not automatically resolved. -## Commit threads +## Add a comment to a commit + +You can add comments and threads to a particular commit. -You can add comments and threads to a particular commit under your -project's **Repository > Commits**. +1. On the top bar, select **Menu > Projects** and find your project. +1. On the left sidebar, select **Repository > Commits**. +1. Below the commits, in the **Comment** field, enter a comment. +1. Select **Comment** or select the down arrow (**{chevron-down}**) to select **Start thread**. WARNING: Threads created this way are lost if the commit ID changes after a force push. -## Threaded discussions - -While resolvable threads are only available to merge request diffs, -threads can also be added without a diff. You can start a specific -thread which looks like a thread, on issues, commits, snippets, and -merge requests. - -To start a threaded discussion, select the **Comment** button toggle dropdown, -select **Start thread**, and then select **Start thread** when you're ready to -post the comment. - -![Comment type toggle](img/comment_type_toggle.gif) - -This posts a comment with a single thread to allow you to discuss specific -comments in greater detail. - -![Thread comment](img/discussion_comment.png) - ## Image threads Sometimes a thread is revolved around an image. With image threads, @@ -320,27 +350,6 @@ After you select one of the filters in a given issue or merge request, GitLab sa your preference, so that it persists when you visit the same page again from any device you're logged into. -## Start a thread by replying to a standard comment - -> - [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/30299) in GitLab 11.9 - -To reply to a standard (non-thread) comment, you can use the **Reply to comment** button. - -![Reply to comment button](img/reply_to_comment_button.png) - -The **Reply to comment** button is only displayed if you have permissions to reply to an existing thread, or start a thread from a standard comment. - -Selecting the **Reply to comment** button brings the reply area into focus and you can type your reply. - -![Reply to comment feature](img/reply_to_comment.gif) - -Replying to a non-thread comment converts the non-thread comment to a -thread after the reply is submitted. This conversion is considered an edit -to the original comment, so a note about when it was last edited appears underneath it. - -This feature exists only for issues, merge requests, and epics. Commits, snippets, and merge request diff threads are -not supported yet. - ## Assign an issue to the commenting user > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/191455) in GitLab 13.1. diff --git a/doc/user/project/issues/issue_data_and_actions.md b/doc/user/project/issues/issue_data_and_actions.md index 1a079001af8..1c25ea9283b 100644 --- a/doc/user/project/issues/issue_data_and_actions.md +++ b/doc/user/project/issues/issue_data_and_actions.md @@ -288,7 +288,7 @@ supports [GitLab Flavored Markdown](../../markdown.md#gitlab-flavored-markdown). After you write a comment, you can: - Click **Comment** to publish your comment. -- Choose **Start thread** from the dropdown list and start a new [thread](../../discussions/index.md#threaded-discussions) +- Choose **Start thread** from the dropdown list and start a new [thread](../../discussions/index.md#create-a-thread-without-replying-to-a-comment) in that issue's main thread to discuss specific points. This invites other participants to reply directly to your thread, keeping related comments grouped together. diff --git a/doc/user/project/settings/project_access_tokens.md b/doc/user/project/settings/project_access_tokens.md index ecc027158cf..fca13556a05 100644 --- a/doc/user/project/settings/project_access_tokens.md +++ b/doc/user/project/settings/project_access_tokens.md @@ -29,6 +29,7 @@ For examples of how you can use a project access token to authenticate with the 1. Navigate to the project you would like to create an access token for. 1. In the **Settings** menu choose **Access Tokens**. 1. Choose a name and optional expiry date for the token. +1. Choose the access level the token should have in the project. 1. Choose the [desired scopes](#limiting-scopes-of-a-project-access-token). 1. Click the **Create project access token** button. 1. Save the project access token somewhere safe. Once you leave or refresh @@ -42,7 +43,7 @@ For examples of how you can use a project access token to authenticate with the Project bot users are [GitLab-created service accounts](../../../subscriptions/self_managed/index.md#billable-users) and do not count as licensed seats. For each project access token created, a bot user is created and added to the project with -[Maintainer level permissions](../../permissions.md#project-members-permissions). +the [specified level permissions](../../permissions.md#project-members-permissions). For the bot: |