<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # Description templates > 原文:[https://docs.gitlab.com/ee/user/project/description_templates.html](https://docs.gitlab.com/ee/user/project/description_templates.html) * [Overview](#overview) * [Use-cases](#use-cases) * [Creating issue templates](#creating-issue-templates) * [Creating merge request templates](#creating-merge-request-templates) * [Using the templates](#using-the-templates) * [Setting a default template for merge requests and issues](#setting-a-default-template-for-merge-requests-and-issues-starter) * [Description template example](#description-template-example) # Description templates[](#description-templates "Permalink") 在 GitLab 8.11 中[引入](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/4981) . 我們都知道,項目開發人員更有可能及時解決提交的問題. 使用描述模板,您可以為問題定義特定于上下文的模板,并為項目合并請求描述字段,并幫助從問題中過濾掉許多不必要的噪音. ## Overview[](#overview "Permalink") 通過使用描述模板,創建新發行或合并請求的用戶可以選擇描述模板,以幫助他們與其他貢獻者進行有效溝通. 每個 GitLab 項目都可以定義自己的一組描述模板,這些模板將被添加到 GitLab 項目存儲庫的根目錄中. 描述模板必須用[Markdown](../markdown.html)編寫,并存儲在項目的存儲庫中的`.gitlab`目錄下. 僅考慮默認分支的模板. ## Use-cases[](#use-cases "Permalink") * 添加一個模板,該模板將用于特定項目的每個問題,并提供說明和指南,要求提供特定于該主題的信息. 例如,如果您有一個用于跟蹤新博客文章的項目,則可以要求標題,大綱,作者姓名,作者社交媒體信息等等. * 在前面的示例之后,您可以為隨新博客帖子提交的每個 MR 創建模板,要求提供有關帖子日期,前事數據,圖像準則,相關問題的鏈接,審閱者姓名等信息. * 您還可以為工作流的不同階段創建問題并合并請求模板,例如功能建議,功能改進或錯誤報告. ## Creating issue templates[](#creating-issue-templates "Permalink") 在存儲庫的`.gitlab/issue_templates/`目錄內創建一個新的 Markdown( `.md` )文件. 提交并推送到您的默認分支. To create a Markdown file: 1. 單擊`master`旁邊的`+`按鈕,然后單擊**New file** . 2. 將問題模板的名稱添加到`master`旁邊的**File name**文本字段中. 確保單詞之間用下劃線分隔,并且文件的擴展名為`.md` ,例如`feature_request.md` . 3. 提交并推送到您的默認分支. 如果您的存儲庫中沒有`.gitlab/issue_templates`目錄,則需要創建它. 要創建`.gitlab/issue_templates`目錄: 1. 單擊`master`旁邊的`+`按鈕,然后選擇**New directory** . 2. 將此新目錄`.gitlab`并提交到默認分支. 3. 再次單擊`master`旁邊的`+`按鈕,然后選擇**New directory** .這次,n 4. 將目錄`issue_templates`并提交到默認分支. 要檢查它是否正常工作,請[創建一個新問題,](./issues/managing_issues.html#create-a-new-issue)然后查看是否可以選擇描述模板. ## Creating merge request templates[](#creating-merge-request-templates "Permalink") 與發布模板類似,在存儲庫的`.gitlab/merge_request_templates/`目錄內創建一個新的 Markdown( `.md` )文件. 提交并推送到您的默認分支. ## Using the templates[](#using-the-templates "Permalink") 讓我們以創建了`.gitlab/issue_templates/Bug.md`文件`.gitlab/issue_templates/Bug.md` . 在創建或編輯問題時,這將啟用`Bug`下拉選項. 選擇`Bug` , `Bug.md`模板文件中的內容將被復制到問題描述字段. "重置模板"按鈕將放棄您在選擇模板后所做的任何更改,并將其恢復為初始狀態. [![Description templates](https://img.kancloud.cn/b7/20/b720d464fa55c3d8e19759229fdc6060_448x425.png)](img/description_templates.png) ## Setting a default template for merge requests and issues[](#setting-a-default-template-for-merge-requests-and-issues-starter "Permalink") 版本歷史 * 此功能是在[描述模板](#overview)之前引入的,可在[GitLab Starter 中使用](https://about.gitlab.com/pricing/) . 可以在項目設置中啟用它. * 問題模板在 GitLab EE 8.1 中[引入](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28) . * 在 GitLab EE 6.9 中[引入](https://gitlab.com/gitlab-org/gitlab/commit/7478ece8b48e80782b5465b96c79f85cc91d391b)了合并請求的模板. 在項目的**"設置" /"可見性","項目功能","權限"**部分中,應將問題和/或合并請求的可見性設置為"每個人都可以訪問"或"只有項目成員",否則模板文本區域將不會顯示. 這是默認行為,因此在大多數情況下都可以. 1. 轉到項目的**"設置"** . 2. 單擊**合并請求**標題下的**展開** . 3. 填寫" **合并請求**的**默認描述模板"**文本區域. 4. Click **Expand** under **默認問題模板**. 5. 填寫問題的**默認描述模板**文本區域. 由于 GitLab 合并請求和問題支持[Markdown](../markdown.html) ,因此您可以使用它來格式化標題,列表等. [![Default merge request description templates](https://img.kancloud.cn/49/db/49db06676cf68152940bb84e1285f703_971x903.png)](img/description_templates_merge_request_settings.png) [![Default issue description templates](https://img.kancloud.cn/6a/39/6a3964700b54d6b17ea486190df7df04_970x325.png)](img/description_templates_issue_settings.png) 添加描述后,點擊**保存更改**以使設置生效. 現在,每次創建新的合并請求或問題時,都將使用您在模板中輸入的文本預先填充. ## Description template example[](#description-template-example "Permalink") 我們在 GitLab 社區版項目中使用問題和合并請求的描述模板. 請參考[`.gitlab`文件夾](https://gitlab.com/gitlab-org/gitlab/tree/master/.gitlab)中的一些示例. **提示:**可以在描述模板中使用[快速操作](quick_actions.html)來快速添加標簽,受讓人和里程碑. 僅當提交問題或合并請求的用戶有權執行相關操作時,才執行快速操作. 這是錯誤報告模板的示例: ``` Summary (Summarize the bug encountered concisely) Steps to reproduce (How one can reproduce the issue - this is very important) Example Project (If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report) (If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version) What is the current bug behavior? (What actually happens) What is the expected correct behavior? (What you should see instead) Relevant logs and/or screenshots (Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.) Possible fixes (If you can, link to the line of code that might be responsible for the problem) /label ~bug ~reproduced ~needs-investigation /cc @project-manager /assign @qa-tester ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看