提交 40a64978 编写于 作者: Lab机器人's avatar Lab机器人

markdown

上级 d97ea852
......@@ -12,6 +12,7 @@
<link rel="stylesheet" href="gitbook/style.css">
......@@ -33,6 +34,14 @@
<link rel="stylesheet" href="gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-advanced-emoji/emoji-website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
......@@ -62,6 +71,9 @@
......@@ -1258,12 +1270,13 @@
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"首页","level":"1.1","depth":1,"next":{"title":"概览","level":"1.2","depth":1,"path":"docs/overview.md","ref":"docs/overview.md","articles":[]},"dir":"ltr"},"config":{"plugins":["favicon","back-to-top-button","popup","theme-fexa","-sharing","sharing-plus","tbfed-pagefooter","chapter-fold","-lunr","-search","search-pro","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy CODECHINA 2020","modify_label":"该文件修订时间:","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"livereload":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"theme-fexa":{"search-placeholder":"输入关键字搜索","logo":"/docs/img/logo.png","favicon":"","url":"/"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"favicon":{"shortcut":"/docs/img/logo-s.png","bookmark":"/docs/img/logo-s.png","appleTouch":"/docs/img/logo-s.png","appleTouchMore":{"120x120":"","180x180":"/docs/img/logo-s.png"}},"back-to-top-button":{},"sharing":{"douban":true,"facebook":false,"google":false,"qq":true,"qzone":true,"twitter":false,"weibo":true,"all":["douban","facebook","google","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","whatsapp"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Miykael","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeFexa":{"nav":[{"url":"/","target":"_blank","name":"开始使用"}]}},"title":"CODEChina帮助文档","language":"zh-hans","links":{"sidebar":{}},"gitbook":"*","description":"CODEChina开源社区用户使用及帮助文档"},"file":{"path":"README.md","mtime":"2020-09-01T02:50:43.664Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2020-09-03T02:42:22.263Z"},"basePath":".","book":{"language":""}});
gitbook.page.hasChanged({"page":{"title":"首页","level":"1.1","depth":1,"next":{"title":"概览","level":"1.2","depth":1,"path":"docs/overview.md","ref":"docs/overview.md","articles":[]},"dir":"ltr"},"config":{"plugins":["favicon","back-to-top-button","popup","theme-fexa","-sharing","sharing-plus","tbfed-pagefooter","chapter-fold","-lunr","-search","search-pro","mermaid-gb3","advanced-emoji","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy CODECHINA 2020","modify_label":"该文件修订时间:","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"livereload":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"theme-fexa":{"search-placeholder":"输入关键字搜索","logo":"/docs/img/logo.png","favicon":"","url":"/"},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"mermaid-gb3":{},"favicon":{"shortcut":"/docs/img/logo-s.png","bookmark":"/docs/img/logo-s.png","appleTouch":"/docs/img/logo-s.png","appleTouchMore":{"120x120":"","180x180":"/docs/img/logo-s.png"}},"back-to-top-button":{},"advanced-emoji":{"embedEmojis":false},"sharing":{"douban":true,"facebook":false,"google":false,"qq":true,"qzone":true,"twitter":false,"weibo":true,"all":["douban","facebook","google","instapaper","linkedin","twitter","weibo","messenger","qq","qzone","viber","whatsapp"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Miykael","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeFexa":{"nav":[{"url":"/","target":"_blank","name":"开始使用"}]}},"title":"CODEChina帮助文档","language":"zh-hans","links":{"sidebar":{}},"gitbook":"*","description":"CODEChina开源社区用户使用及帮助文档"},"file":{"path":"README.md","mtime":"2020-09-01T02:50:43.664Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2020-09-04T05:47:40.539Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
......@@ -1288,6 +1301,10 @@
<script src="gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
<script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
......@@ -1300,6 +1317,8 @@
<script src="gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
</body>
</html>
......@@ -19,7 +19,9 @@
"chapter-fold",
"-lunr",
"-search",
"search-pro"
"search-pro",
"mermaid-gb3",
"advanced-emoji"
],
"variables": {
"themeFexa":{
......
......@@ -149,185 +149,3 @@
您可以在评论中使用[快速操作](../project/quick_actions.html) , 评论也将会显示提交评论后即将执行的操作。
要向评论添加更多评论,请照常开始写评论,然后单击**添加到评论**按钮,这会将评论添加到评论中。
### 提交评审[](#submitting-a-review "Permalink")
If you have any comments that have not been submitted, you will see a bar at the bottom of the screen with two buttons:
* **舍弃****舍弃**所有尚未提交的评论.
* **完成审阅** :打开准备提交审阅的评论列表. 单击**提交评论**将发布所有评论. 此时将执行所有提交的快速操作.
另外,要通过待审核的评论完成整个审核,请执行以下操作:
* 单击**评论**上的" **完成审阅"**按钮.
* 在非评论注释的文本中使用`/submit_review` [快速操作](../project/quick_actions.html) .
[![Review submission](img/c6daa1e81d653cfd0b476144f1f71874.png)](img/review_preview.png)
提交审阅将向合并请求的每个应通知用户发送一封电子邮件,其中包含与之相关的所有注释.
因此,回复此电子邮件将在关联的合并请求上创建一个新注释.
## Filtering notes[](#filtering-notes "Permalink")
在 GitLab 11.5 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/26723) .
对于活动注释和用户注释等具有许多注释的问题,有时很难找到有用的信息. 有一种方法可以针对合并请求和问题从单个注释和线程中过滤注释.
从合并请求的" **讨论"**选项卡,或史诗/问题概述中,找到页面右侧的过滤器下拉菜单,您可以从中选择以下选项之一:
* **显示所有活动** :显示所有用户评论和系统注释(问题更新,对其他问题的提及,对描述的更改等).
* **仅显示评论** :仅在列表中显示用户评论.
* **仅显示历史记录** :仅显示活动记录.
[![Notes filters dropdown options](img/5a26f77375b52645c2387aec1f77a777.png)](img/index_notes_filters.png)
在给定问题或 MR 中选择过滤器之一后,GitLab 将保存您的首选项,这样当您从已登录的任何设备再次访问同一页面时,该首选项将保持不变.
## Suggest Changes[](#suggest-changes "Permalink")
在 GitLab 11.6 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/18008) .
作为审阅者,您可以在 Merge Request Diff 线程中使用简单的 Markdown 语法建议代码更改. 然后,合并请求作者(或具有适当[权限的](../permissions.html)其他用户)能够通过单击来应用这些建议,这将在应用了这些建议的用户创作的合并请求中生成提交.
1. 选择要更改的代码行,添加新注释,然后单击工具栏中的" **插入建议"**图标:
[![Add a new comment](img/d7cb226977bb46d9aaa1c1d7e195025a.png)](img/suggestion_button_v12_7.png)
2. 在注释中,将您的建议添加到预填充的代码块中:
[![Add a suggestion into a code block tagged properly](img/44cad341f814ae94da18480c3dc1d2be.png)](img/make_suggestion_v12_7.png)
3. 单击**开始审查****加入审查** ,以您的评论添加到[审查](#merge-request-reviews) ,或者**现在添加注释** ,注释立即加入到线程.
注释中的"建议"可由合并请求作者直接从合并请求中应用:
[![Apply suggestions](img/0dd0fc53dcaa34b76a16be18538c1a35.png)](img/apply_suggestion_v12_7.png)
一旦作者应用了一个建议,它将被标记为"已**应用"**标签,该线程将被自动解析,并且 GitLab 将创建一个新的提交,并将建议的更改直接推送到合并请求分支中的代码库中. 这样做需要[开发人员许可](../permissions.html) .
### Multi-line Suggestions[](#multi-line-suggestions "Permalink")
在 GitLab 11.10 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/53310) .
审阅者还可以通过调整范围偏移,在合并请求差异线程中使用单个"建议"来建议对多行进行更改. 偏移量相对于 diff 线程的位置,并指定应用建议时要被建议替换的范围.
[![Multi-line suggestion syntax](img/317167b85f9604b741e71e57b1702b6c.png)](img/multi-line-suggestion-syntax.png)
在上面的示例中,建议涵盖了注释行上方的三行和注释行下方的四行. 应用时,它将用建议的更改从注释行*上方的* 3 行替换为注释行*下方*的 4 行.
[![Multi-line suggestion preview](img/590715bab1c8704d5a4c16437c011ed5.png)](img/multi-line-suggestion-preview.png)
**注意:**涵盖多行的建议仅限于已注释差异行*上方的* 100 行和*下方*的差异行*下方*的 100 行,每个建议最多可更改 200 行.
### Code block nested in Suggestions[](#code-block-nested-in-suggestions "Permalink")
如果您需要提出涉及[受限制的代码块](../markdown.html#code-spans-and-blocks)的建议,请将您的建议换成四个反引号,而不是通常的三个.
[![A comment editor with a suggestion with a fenced code block](img/a4e7c4f55411323814dd3b9cb30ab9f8.png)](img/suggestion_code_block_editor_v12_8.png)
[![Output of a comment with a suggestion with a fenced code block](img/db0182b2e43670178e35b1a3485ca25e.png)](img/suggestion_code_block_output_v12_8.png)
### Configure the commit message for applied Suggestions[](#configure-the-commit-message-for-applied-suggestions "Permalink")
在 GitLab 12.7 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/13086) .
GitLab 在应用建议时使用默认的提交消息: `Apply %{suggestions_count} suggestion(s) to %{files_count} file(s)`
例如,假设用户将 3 条建议应用于 2 个不同的文件,则默认的提交消息将是: **将 3 条建议应用于 2 个文件**
可以自定义这些提交消息,以遵循您可能拥有的任何准则. 为此, **请**在项目的" **常规"**设置中展开" **合并请求"**选项卡,然后更改" **合并建议"**文本:
[![Custom commit message for applied Suggestions](img/182928c540d17ccf275438850fc7592d.png)](img/suggestions_custom_commit_messages_v13_1.jpg)
除了静态文本,您还可以使用以下变量:
| Variable | Description | 输出示例 |
| --- | --- | --- |
| `%{branch_name}` | 建议所应用到的分支的名称. | `my-feature-branch` |
| `%{files_count}` | 应用了建议的文件数. | **2** |
| `%{file_paths}` | 应用了建议文件的路径. 路径用逗号分隔. | `docs/index.md, docs/about.md` |
| `%{project_path}` | 项目路径. | `my-group/my-project` |
| `%{project_name}` | 项目的可读名称. | **我的项目** |
| `%{suggestions_count}` | 应用的建议数. | **3** |
| `%{username}` | 应用建议的用户的用户名. | `user_1` |
| `%{user_full_name}` | 应用建议的用户的全名. | **用户 1** |
例如,要自定义提交消息以输出**Addresses user_1 的评论** ,请将自定义文本设置为`Addresses %{username}'s review` .
**注意:** [#25381](https://gitlab.com/gitlab-org/gitlab/-/issues/25381)将为每个应用的建议(以及批量建议)引入自定义提交消息.
### Batch Suggestions[](#batch-suggestions "Permalink")
版本历史
* 在 GitLab 13.1 中作为[Alpha 功能](https://about.gitlab.com/handbook/product/#alpha) [引入](https://gitlab.com/gitlab-org/gitlab/-/issues/25486) .
* 它部署在功能标记后面,默认情况下处于禁用状态.
* 在 GitLab.com 上已禁用.
* 要在 GitLab 自管实例中使用它,请让 GitLab 管理员[启用它](#enable-or-disable-batch-suggestions) .
您可以一次应用多个建议,以减少为满足审阅者的请求而添加到分支的提交数量.
1. 要启动将在一次提交中应用的一批建议,请单击" **将建议添加到批处理"**
[![A code change suggestion displayed, with the button to add the suggestion to a batch highlighted.](img/f12701028e6548c505318ef2d4e378db.png "Add a suggestion to a batch")](img/add_first_suggestion_to_batch_v13_1.jpg)
2. 根据需要向批处理中添加尽可能多的其他建议:
[![A code change suggestion displayed, with the button to add an additional suggestion to a batch highlighted.](img/f60803ec89d6ae84310e181507eb2ad8.png "Add another suggestion to a batch")](img/add_another_suggestion_to_batch_v13_1.jpg)
3. 要删除建议,请单击" **从批处理中删除"**
[![A code change suggestion displayed, with the button to remove that suggestion from its batch highlighted.](img/e28a69b4996ee400ca3df4431df0ab13.png "Remove a suggestion from a batch")](img/remove_suggestion_from_batch_v13_1.jpg)
4. 将所有建议添加到您的喜好中后,准备好后,请点击**应用建议**
[![A code change suggestion displayed, with the button to apply the batch of suggestions highlighted.](img/ed8bdb5d349320bc1d470f096578dfe7.png "Apply a batch of suggestions")](img/apply_batch_of_suggestions_v13_1.jpg)
#### Enable or disable Batch Suggestions[](#enable-or-disable-batch-suggestions "Permalink")
批处理建议部署在**默认情况下禁用**的功能标志的后面. [有权访问 GitLab Rails 控制台的 GitLab 管理员](../../administration/feature_flags.html)可以为您的实例启用它.
要启用它:
```
# Instance-wide
Feature.enable(:batch_suggestions)
```
禁用它:
```
# Instance-wide
Feature.disable(:batch_suggestions)
```
## Start a thread by replying to a standard comment[](#start-a-thread-by-replying-to-a-standard-comment "Permalink")
在 GitLab 11.9 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/issues/30299)
要回复标准(非线程)评论,可以使用" **回复评论"**按钮.
[![Reply to comment button](img/d198d958fcf8be60727c232ff69b9713.png)](img/reply_to_comment_button.png)
仅当您有权回复现有主题或从标准评论启动主题时,才会显示" **回复评论"**按钮.
单击" **回复评论"**按钮将使回复区域成为焦点,您可以键入回复.
[![Reply to comment feature](img/9f29552692cfb04d323dc62cc4bc1d1e.png)](img/reply_to_comment.gif)
提交回复后,回复非线程注释将把非线程注释转换为线程. 该转换被认为是对原始评论的修改,因此在其下方会出现一条有关上次编辑时间的注释.
此功能仅适用于"问题","合并请求"和"事件". 尚不支持提交,摘要和合并请求差异线程.
## Assign an issue to the commenting user[](#assign-an-issue-to-the-commenting-user "Permalink")
在 GitLab 13.1 中[引入](https://gitlab.com/gitlab-org/gitlab/-/issues/191455) .
您可以将问题分配给发表评论的用户.
在评论中,单击" **更多操作"**菜单,然后单击" **分配给评论用户"** .
再次单击按钮以取消分配评论者.
[![Assign to commenting user](img/9b6a8d0d96113fcaadd766cecfbecdbc.png)](img/quickly_assign_commenter_v13_1.png)
\ No newline at end of file
此差异已折叠。
......@@ -13,7 +13,7 @@
[![GitLab Groups](img/53bcd8c2d2c69aceb7db6677802be6b1.png)](img/groups.png)
" **组织"**页面显示:
**"组织"**页面显示:
* 选择**您的组织**后, 将会显示**您**所属的全部组织(包括子组织)
* 选中" **浏览组织"**时将显示所有公开的组织列表
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册