> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13086) in GitLab 12.7.
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/13086) in GitLab 12.7.
GitLab uses `Apply suggestion to %{file_path}` by default as commit messages
GitLab uses a default commit message
when applying Suggestions. This commit message can be customized to
when applying Suggestions: `Apply %{suggestions_count} suggestion(s) to %{files_count} file(s)`
follow any guidelines you might have. To do so, expand the **Merge requests**
For example, consider that a user applied 3 suggestions to 2 different files, the default commit message will be: **Apply 3 suggestion(s) to 2 file(s)**
These commit messages can be customized to follow any guidelines you might have. To do so, expand the **Merge requests**
tab within your project's **General** settings and change the
tab within your project's **General** settings and change the
**Merge suggestions** text:
**Merge suggestions** text:
![Custom commit message for applied Suggestions](img/suggestions_custom_commit_messages_v12_7.png)
![Custom commit message for applied Suggestions](img/suggestions_custom_commit_messages_v13_1.jpg)
You can also use following variables besides static text:
You can also use following variables besides static text:
| Variable | Description | Output example |
| Variable | Description | Output example |
|---|---|---|
|---|---|---|
| `%{branch_name}` | The name of the branch the Suggestion(s) was(were) applied to. | `my-feature-branch` |
| `%{files_count}` | The number of file(s) to which Suggestion(s) was(were) applied.| **2** |
| `%{file_paths}` | The path(s) of the file(s) Suggestion(s) was(were) applied to. Paths are separated by commas.| `docs/index.md, docs/about.md` |
| `%{project_path}` | The project path. | `my-group/my-project` |
| `%{project_path}` | The project path. | `my-group/my-project` |
| `%{project_name}` | The human-readable name of the project. | **My Project** |
| `%{project_name}` | The human-readable name of the project. | **My Project** |
| `%{file_path}` | The path of the file the Suggestion is applied to. | `docs/index.md` |
| `%{suggestions_count}` | The number of Suggestions applied.| **3** |
| `%{branch_name}` | The name of the branch the Suggestion is applied on. | `my-feature-branch` |
| `%{username}` | The username of the user applying Suggestion(s). | `user_1` |
| `%{username}` | The username of the user applying the Suggestion. | `user_1` |
| `%{user_full_name}` | The full name of the user applying Suggestion(s). | **User 1** |
| `%{user_full_name}` | The full name of the user applying the Suggestion. | **User 1** |
For example, to customize the commit message to output
For example, to customize the commit message to output
**Addresses user_1's review**, set the custom text to
**Addresses user_1's review**, set the custom text to
`Addresses %{username}'s review`.
`Addresses %{username}'s review`.
NOTE: **Note:**
NOTE: **Note:**
Custom commit messages for each applied Suggestion will be
Custom commit messages for each applied Suggestion (and for batch Suggestions) will be
introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381).
introduced by [#25381](https://gitlab.com/gitlab-org/gitlab/issues/25381).
### Batch Suggestions
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/25486) in GitLab 13.1.
You can apply multiple suggestions at once to reduce the number of commits added
to your branch to address your reviewers' requests.
1. To start a batch of suggestions that will be applied with a single commit, click **Add suggestion to batch**:
![A code change suggestion displayed, with the button to add the suggestion to a batch highlighted.](img/add_first_suggestion_to_batch_v13_1.jpg"Add a suggestion to a batch")
1. Add as many additional suggestions to the batch as you wish:
![A code change suggestion displayed, with the button to add an additional suggestion to a batch highlighted.](img/add_another_suggestion_to_batch_v13_1.jpg"Add another suggestion to a batch")
1. To remove suggestions, click **Remove from batch**:
![A code change suggestion displayed, with the button to remove that suggestion from its batch highlighted.](img/remove_suggestion_from_batch_v13_1.jpg"Remove a suggestion from a batch")
1. Having added all the suggestions to your liking, when ready, click **Apply suggestions**:
![A code change suggestion displayed, with the button to apply the batch of suggestions highlighted.](img/apply_batch_of_suggestions_v13_1.jpg"Apply a batch of suggestions")
## Start a thread by replying to a standard comment
## Start a thread by replying to a standard comment
msgid "A file with '%{file_name}' already exists in %{branch} branch"
msgid "A file with '%{file_name}' already exists in %{branch} branch"
msgstr ""
msgstr ""
...
@@ -1007,6 +1013,9 @@ msgstr ""
...
@@ -1007,6 +1013,9 @@ msgstr ""
msgid "A subscription will trigger a new pipeline on the default branch of this project when a pipeline successfully completes for a new tag on the %{default_branch_docs} of the subscribed project."
msgid "A subscription will trigger a new pipeline on the default branch of this project when a pipeline successfully completes for a new tag on the %{default_branch_docs} of the subscribed project."
msgstr ""
msgstr ""
msgid "A suggestion is not applicable."
msgstr ""
msgid "A terraform report was generated in your pipelines."
msgid "A terraform report was generated in your pipelines."
msgstr ""
msgstr ""
...
@@ -1366,6 +1375,9 @@ msgstr ""
...
@@ -1366,6 +1375,9 @@ msgstr ""
msgid "Add strikethrough text"
msgid "Add strikethrough text"
msgstr ""
msgstr ""
msgid "Add suggestion to batch"
msgstr ""
msgid "Add system hook"
msgid "Add system hook"
msgstr ""
msgstr ""
...
@@ -2568,6 +2580,9 @@ msgstr ""
...
@@ -2568,6 +2580,9 @@ msgstr ""
msgid "Apply suggestion"
msgid "Apply suggestion"
msgstr ""
msgstr ""
msgid "Apply suggestions"
msgstr ""
msgid "Apply template"
msgid "Apply template"
msgstr ""
msgstr ""
...
@@ -2586,7 +2601,10 @@ msgstr ""
...
@@ -2586,7 +2601,10 @@ msgstr ""
msgid "Applying multiple commands"
msgid "Applying multiple commands"
msgstr ""
msgstr ""
msgid "Applying suggestion"
msgid "Applying suggestion..."
msgstr ""
msgid "Applying suggestions..."
msgstr ""
msgstr ""
msgid "Approval rules"
msgid "Approval rules"
...
@@ -18265,6 +18283,9 @@ msgstr ""
...
@@ -18265,6 +18283,9 @@ msgstr ""
msgid "Remove fork relationship"
msgid "Remove fork relationship"
msgstr ""
msgstr ""
msgid "Remove from batch"
msgstr ""
msgid "Remove from board"
msgid "Remove from board"
msgstr ""
msgstr ""
...
@@ -20502,6 +20523,9 @@ msgstr ""
...
@@ -20502,6 +20523,9 @@ msgstr ""
msgid "Something went wrong while adding your award. Please try again."
msgid "Something went wrong while adding your award. Please try again."
msgstr ""
msgstr ""
msgid "Something went wrong while applying the batch of suggestions. Please try again."
msgstr ""
msgid "Something went wrong while applying the suggestion. Please try again."
msgid "Something went wrong while applying the suggestion. Please try again."
msgstr ""
msgstr ""
...
@@ -21459,6 +21483,18 @@ msgstr ""
...
@@ -21459,6 +21483,18 @@ msgstr ""
msgid "SuggestedColors|Very pale orange"
msgid "SuggestedColors|Very pale orange"
msgstr ""
msgstr ""
msgid "Suggestion is not applicable as the suggestion was not found."
msgstr ""
msgid "Suggestions are not applicable as one or more suggestions were not found."
msgstr ""
msgid "Suggestions are not applicable as their lines cannot overlap."
msgstr ""
msgid "Suggestions must all be on the same branch."
msgstr ""
msgid "Suggestions:"
msgid "Suggestions:"
msgstr ""
msgstr ""
...
@@ -22428,7 +22464,10 @@ msgstr ""
...
@@ -22428,7 +22464,10 @@ msgstr ""
msgid "This action can lead to data loss. To prevent accidental actions we ask you to confirm your intention."
msgid "This action can lead to data loss. To prevent accidental actions we ask you to confirm your intention."
msgstr ""
msgstr ""
msgid "This also resolves the discussion"
msgid "This also resolves all related threads"
msgstr ""
msgid "This also resolves the thread"
msgstr ""
msgstr ""
msgid "This application was created by %{link_to_owner}."
msgid "This application was created by %{link_to_owner}."