</svg></a></div></div></div><div class=“row d-xl-none”><div class=col><div class=“doc-nav toc-mobile”></div></div><主要><div class=row><div class=col><div class=“article-content js-article-centent”role=main itemscope itemprop=main ContentOfPage><ul id=markdown-toc><li><a href=#如何贡献id=markdown toc如何贡献>如何贡献</a><ul><li><a href=#行为准则id=markdown toc行为准则>行为准则</a></ul><li>gitlab技术<li>选择或创建问题</a><li>设置gitlab开发工具包</a><li>打开合并请求<li>社区合并请求是如何分类的</a><li>审查流程</a></ul></ul><li><a href=#tips id=markdown-toc-tips>提示</a><li>问题和合并请求的关闭策略</a><li><a href=#contribution-to-premiumultimate-features-with-an-enterprise-edition-license id=markdown-toc-contribution-to premiummultimate-ffeatures-with-an-enterprise-edition-license>使用enterprise edition许可证为高级/终极功能做出贡献</a><li>获取帮助</a></ul><h1 id=contribute-to-gitlab-development>为gitlab开发贡献</a></h1><p>感谢您对GitLab的贡献。本指南详细介绍了如何为GitLab的发展做出贡献。<p>有关首次分步指导,请参阅教程:做出GitLab贡献。<h2 id=how-to-contribute>如何贡献<a href=#how-to contribute title=Permalink class=anchor></a></h2><ol><li>阅读行为准则。<li>选择或创建要处理的问题。<li>设置GitLab开发工具包。<li>打开合并请求。</ol><p>您的合并请求将被分类、审查,然后可以合并到产品中。行为准则</a></h3><p>我们希望为每个有兴趣做出贡献的人创造一个欢迎的环境。有关我们对开放和欢迎环境的承诺的更多信息,请参阅我们的<a href=https://about.gitlab.com/community/contribute/code-of-conduct网站/>行为准则页面</a>。<p>问题和合并请求应使用英语,并包含适当的语言适合所有年龄段的观众。gitlab技术</a></h2><p><a href=https://gitlab.com/gitlab-org-gitlab网址>GitLab</a>是一个<a href=https://rubyonrails.org网站/>Ruby on Rails应用程序。它使用<a href=https://haml.info网址/>Haml和基于JavaScript的前端=网址:https://vuejs.org/>Vue.js(星期五)。<p>一些卫星项目使用<a href=https://go.dev网址/>转到</a>。例如:<ul><li><a href=https://gitlab.com/gitlab-org-gitlab-runner网址>GitLab跑步者</a><li><a href=https://gitlab.com/gitlab-org-gitaly>吉塔利</a><li><a href=https://gitlab.com/gitlab-org/cli>GLab(GLab)</a></ul><p>我们为每种技术提供了<a href=style_guides.html>开发风格指南,帮助您与我们的编码标准保持一致。选择或创建问题</a></h3><p>如果你知道你要做什么,看看是否存在问题。如果没有,打开<a href=“https://gitlab.com/gitlab-org/gitlab/-/issues/new?问题%5Milestone_id%5D=“>新发行</a>。选择适当的模板,并添加有关您计划进行的工作的所有必要信息。这样,您可以从GitLab团队成员那里获得更多指导和支持。<p>如果您不确定要做什么,可以<a href=“https://gitlab.com/groups/gitlab-org/-/issues/?sort=updated_desc&state=opened&label_name%5B%5D=quick%20win&label-name%5B%5D=寻找%20community%20contributions&first_page_size=100“>使用<code class=highlighter-rouge>~寻求社区贡献。<p>当你发现问题时,对你想解决的问题发表评论。这有助于GitLab团队和更广泛的GitLab社区成员知道您将致力于解决该问题。<p>有关详细信息,请参阅问题工作流。<h3 id=set-up-the-gitlab-development-kit>设置gitlab开发工具包</a></h3><p>要编写和测试代码,您将使用GitLab开发工具包。<ol><li><a href=https://gitlab.com/gitlab-community/meta#请求-access-to-community-forks>请求访问=https://gitlab.com/gitlab-community/meta>GitLab社区分支</a>。或者,您可以创建自己的公共分叉,但会错过<a href=https://gitlab.com/gitlab-community/meta#为什么>社区带来的好处</a>。<li>一些GitLab项目在存储库中的README或contributing文件中有详细的贡献指南。在设置开发环境之前检查这些文件将有助于确保您有一个良好的开端。<li>执行以下操作之一:<ul><li><p>要在本地运行开发环境,请下载并设置<a href=https://gitlab.com/gitlab-org-gitlab-development-kit网站>GitLab开发工具包。请参阅<a href=https://gitlab.com/gitlab-org-gitlab-development-kit/blob/main/README.md>GDK README</a>了解设置说明和<a href=https://gitlab.com/gitlab-org-gitlab-development-kit/-/blob/main/doc/troubleshooting/index.md>如果卡住,请进行故障排除。<li><p>GDK很重。如果你需要通过反复试验快速构建一些东西,考虑使用一个空的rails应用程序这样做,然后将其移植到GDK。<li><p>要在云中运行预先配置的GDK实例,请使用<a href=..//与gitpod集成/gitpod.html>GDK。从项目存储库:<ol><li>在左侧边栏中,选择“搜索”或转到“查找项目”。<li>在右上角,选择编辑Gitpod。</ol></ul><li>如果您想为<a href=https://about.gitlab.com/>网站</a>或<a href=https://handbook.gitlab.com/handbook/>手册</a>,转到任何页面的页脚,选择<strong>在Web IDE中编辑</strong>以打开<a href=..//user/project/web_id/index.html>web集成开发环境</a>。</ol>打开合并请求</a></h3><p>现在<a href=..//user/project/merge_requests/creating_merge_requests.html>打开合并请求</a>合并您的代码及其文档。越早打开合并请求,越早你可以得到反馈。您可以<a href=..//user/project/merge_requests/drafts.html>将其标记为草稿</a>表示你还没有完成。<ol><li>在合并请求中,填写模板中请求的所有信息,比如为什么要引入这些更改,以及这个合并请求试图关闭/修复的问题的链接。<li><a href=/testing_guide/best_practices.html>如果需要,添加测试</a>,以及<a href=/changelog.html>更改日志条目</a>。<li>如果更改影响用户或管理员,<a href=/documentation/index.html>更新文档。</ol><p>有关详细信息,请参阅合并请求工作流。<h4 id=how-community-merge-requests-are-triaged>如何对社区合并请求进行分类</a></h4><ol><li>创建合并请求时,<a href=https://gitlab.com/gitlab-bot><code class=highlighter-rouge>@gitlab-bot</code></a>自动应用<a href=https://handbook.gitlab.com/handbook/engineering/infrastructure/engineery-productivity/triage-operations/#auto-标签-问题和重大请求>“~社区贡献”</a>标签。<li>在创建合并请求后的24-48小时内<a href=https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/merge-request-coach-lifecycle/>合并请求Coach</a>将检查合并请求并应用阶段、组和类型标签。<li>如果合并请求没有自动分配,请通过在注释中键入<code class=highlighter-rouge>@gitlab-bot ready</code>请求审阅。如果您的代码在首次提交后的两个工作日内没有指定审阅者,您可以询问有关<code class=highlighter-rouge>@gitlab-bot帮助的帮助。<li>如果可能,合并请求教练将指派相关审阅者或亲自处理审阅。</ol><p>目标是在指定审阅者后的一周内审阅合并请求。有时,由于工作量大、假期或其他原因,这可能需要更长的时间。如果需要,请查看<a href=https://about.gitlab.com/company/team网站/>合并请求教练的团队页面</a>您编写的代码类型,并在合并请求中提到它们。例如,如果您有写了一些前端代码,应该提到前端合并请求coach。如果您的代码有多个规程,您可以提到多个合并请求coach。<p>有关时间表以及如何请求帮助或上报合并请求的详细信息,请参阅<a href=https://handbook.gitlab.com/handbook/engineering/infrastructure/enginerieng-productivity/merge-request-triage/>更广泛的社区合并请求指南。<p>审查并合并合并请求后,您的更改将部署到GitLab.com并包含在下一版本中!审查流程<a href=#review-process title=Permalink class=anchor></a></h4><p>当您向GitLab提交代码时,我们真的希望它被合并!然而,我们总是审查仔细提交,这需要时间。代码提交通常由两人审查<a href=/code_review.html#domain-experts>域专家</a>合并前:<ul><li>A<A href=/code_review.html#the-responsibility-of-the-reviewer>审阅者</a>。<li>A<A href=/code_review.html#the-responsibility-of-the-mainainer>maintainer</a>。</ul><p>审阅后,审阅者可以要求作者更新合并请求。在这种情况下,审阅者将设置<code class=highlighter-rouge>~“workflow::In dev”</code>标签。一旦合并请求被更新并设置为可以再次查看(例如,使用<code class=highlighter-rouge>@gitlab-bot ready</code>),他们将再次查看代码。这个过程可能会在合并之前重复任意次数,以帮助实现最佳贡献。<p>最后,在提交合并请求时,请记住以下几点:<ul><li>当审阅者阅读合并请求时,他们可能会向其他人请求指导审阅者。<li>如果发现代码质量不符合GitLab标准,合并请求审阅者将提供指导并将作者引荐给我们:<ul><li><a href=/documentation/styleguide/index.html>documentation</a>样式指南。<li>代码风格指南。</ul><li>有时会遵循样式指南,但代码缺乏结构完整性,或者评审员会对代码的整体质量有所保留。当有预订时,审稿人将通知作者并提供一些指导。<li>虽然GitLab通常允许任何人指出<a href=..//user/project/merge_requests/approvements/index.html>批准</a>合并请求维护人员可能需要<a href=/code_review.html#approval-guidelines>来自特定审阅者的批准</a>合并合并请求之前。<li>有时维护人员可能会选择关闭合并请求。他们将充分披露为什么不会合并,以及一些指导。维护人员将乐于讨论如何进行更改代码,以便将来批准和合并。</ul><h2 id=tips>提示<a href=#tips-title=Permalink class=anchor></a></h2><ul><li><a href=https://about.gitlab.com/blog/2021/03/18/iteration-and-code-review/>小型MR是重要审查的关键</a>。<li>第一次开始之前,请务必阅读我们的贡献者合并请求指南。<li>需要进行自动化测试。花点时间了解不同的<a href=/testing_guide/testing_levels.html#how-to-test-at-the-correctlevel>测试级别</a>并相应地应用它们。<li>确保有一个很好的描述,其中包括重现实现的步骤。<li><a href=merge_request_workflow.html#commit-messages-guidelines>确保遵循我们的提交消息准则。</ul><h2 id=closing-policy-for-issues-and-merge-requests>问题和合并请求的关闭策略</a></h2><ul><li>有关结束问题的标准,请参见<a href=https://handbook.gitlab.com/handbook/engineering/infrastructure/engineery-productivity/issue-triage/#dated-问题>问题分类手册页面。<li>有关关闭合并请求的条件,请参阅合并请求工作流。</ul><h2 id=contribution-to-premiumulti-features-with-an-enterprise-edition-license>使用enterprise edition许可证为Premium/Ultimate功能贡献</a></h2><p>如果您想使用付费层中的GitLab功能,也称为<a href中的代码=https://gitlab.com/gitlab-org-gitlab/-/tree/master/ee>EE文件夹</a>,它需要GitLab Enterprise Edition许可证。根据<a href=https://handbook。gitlab.com/handbook/市场营销/开发者关系/贡献者成功/社区贡献者工作流/#contributing-到标题标签-企业-条件-文件化流程。获取帮助</a></h2><p>如果您在为GitLab贡献时需要任何帮助:<ul><li>如果您需要帮助处理合并请求或需要帮助查找审阅者:<ul><li>请在注释中键入<code class=highlighter-rouge>@gitlab-bot help</code>以寻求帮助。<li>在我们的<a href=https://handbook.gitlab.com/handbook/engineering/projects网站/>手册</a>和<a href=..//user/group/subsubgroups/index.html#mention-subgroups>在评论中提到它们。</ul><li>加入<a href上的社区=https://discord.com/invite/gitlab网址>GitLab社区不和</a>并找到其他<code class=highlighter-rouge>#contribute</code>频道或<a href中的参与者=https://about.gitlab.com/community/contribute/mentor-sessions网站/>启动导师会议。<li>关于贡献的任何其他问题或反馈:<ul><li>在关于合并请求或问题的注释中Ping<code class=highlighter-rouge>@gitlab-org/community-relations/contributor-success</code>。<li>欢迎<a href=https://gitlab.com/gitlab-org/community-relations/contributor-success/team-task/-/issues/>与Contributor Success团队一起制作一个新的问题</a>分享您的经验。</ul><li>您的GitLab合并请求的计算分钟数用完了吗?加入<a href=https://gitlab.com/gitlab-community/meta>GitLab社区派生项目。</ul></div></div></div></main><div class=row><div class=col><div class=“help-and-feedback-section mb-5”data-nosnipet><a data-toggle=collapse href=#help-feedback-content class=“help-and-feedback-toggle text-decoration-none collapsed”aria-expanded=false aria-controls=help-feed back-content><h2 class=help-and-feedback-title id=help-and-feedback><svg role=“img”aria-label=“”class=“gl-icon ml-1 mr-1 s16 help-icon”><use href=“/assets/images/icons.svg#question”/><title/></svg>帮助和反馈</h2></a><div class=collapse id=help-feedback-content><div class=“row mt-3”><div class=col-md-8><div><h3 class=help-and-feedback-heading>文档</h3><a class=帮助和反馈链接href=https://gitlab.com/gitlab-org-gitlab/-/blob/master/doc/development/contribution/index.mdtarget=_blank rel=“noopener noreferrer”>编辑此页面</a>修复合并请求中的错误或添加改进<br><a class=帮助和反馈链接href=“https://gitlab.com/gitlab-org/gitlab/-/issues/new?问题[description]=链接%20the%20doc%20和%20description%20what%20is%20error%20with%20it。%0A%0A%3C!--%20不要%27t%20在%20this%20line%20--%3E%0A%0A%2Label%20~documents%20~%22docs%5C-comments%22%20&issue[title]=Docs%20下面编辑%20反馈:%20Write%20your%20title“target=_blank rel=”noopener noreferrer“>创建问题</a>建议对此页面进行改进<br></div><div class=mt-3><h3 class=help-and-feedback-heading>产品</h3><a class=帮助和反馈链接href=“https://gitlab.com/gitlab-org/gitlab/-/issues/new?问题[描述]=描述%20您%20希望%20到%20看到%20改进的内容。%0A%0A%3C!--%20不要在%20this%20line%20--%3E%0A%0A%2Flabel%20~%22docs%5C-comments%22%20&issue[title]=Docs%20-%20product%20下面编辑%20反馈:%20Write%20your%20title“target=_blank>创建问题</a>如果你不喜欢这个功能<br><a class=帮助和反馈链接href=“https://gitlab.com/gitlab-org/gitlab/-/issues/new?issuable_template=Feature%20proposal%20-%20详细信息和问题[title]=Docs%20反馈%20-%20功能%20建议:%20编写%20your%20title“target=_blank>建议功能</a>通过提交功能请求<br><a class=帮助和反馈链接href=https://about.gitlab.com/community/gitlab-first-lok/target=_blank>加入First Look</a>帮助塑造新特征。</div><div class=mt-3><h3 class=help-and-feedback-heading>功能可用性和产品试用</h3><a class=帮助和反馈链接href=https://about.gitlab.com/pricing/target=_blank>查看定价</a>查看所有GitLab层和功能,或进行升级<br><a class=帮助和反馈链接href=https://about.gitlab.com/free试用版/target=_blank>免费试用GitLab</a>30天内可以访问所有功能<br></div></div><div class=“col-md-4 right-col”><div class=help-subsection><h3 class=help-and-feedback-heading>获取帮助</h3><p>如果你没有找到你要找的东西,搜索文档<br><p类=mt-3>如果你想得到一些具体的帮助,并且可以使用社区支持,<a class=帮助和反馈链接href=“https://forum.gitlab.com/new-topic?title=topic%20title&body=topic%10body&tags=docs-反馈“target=_blank>在GitLab论坛上发布</a>。<br><p类=mt-3>对于设置或使用此功能时出现的问题(取决于GitLab订阅)<br></p><a href=https://about.gitlab.com/support/target=_blank class=“btn support-btn mt-2 text-decoration-none”role=button>请求支持</a></div></div></div></div></div></div></div><div class=row><div class=col><footer class=“px-3 border top footer”数据nosnippet><div class=“row py-2”><div class=col-9><a href=https://gitlab.com/dashboard网站target=_blank><img src=/assets/images/gitlab-logo.svg alt=“登录gitlab.com”aria-hidden=true-role=img><span class=gl-sr-only>登录gitlab.com</a></div><div class=“col-3 p-0 m-0”><div class=“d-none d-md-flex justify-content-end”><ul class=“list-nstyled list-inline my-0 d-flex flex-wrap社交图标”><li><a href=https://twitter.com/gitlabtarget=_blank class=“pr-3 text-decoration-none gitlab-social”>twitter</a><li><a href=https://www.facebook.com/gitlabtarget=_blank class=“pr-3 text-decoration-none gitlab-social”>facebook</a><li><a href=https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhgtarget=_blank class=“pr-3 text-decoration-none gitlab-social”>youtube</a><li><a href=https://www.linkedin.com/company/gitlab-com网址target=_blank class=“text-decoration-none gitlab-social”>linkedin链接</a></ul></div></div></div><div class=“row py-2”><div class=“col-12 py-1”><ul class=“list-nstyled list-group list-group-horzontal flex-wrap”><li类=pr-3><a href=https://gitlab.com/gitlab-org-gitlab-docs网址>文件回购</a><li类=pr-3><a href=https://about.gitlab.com/company网站/>关于GitLab</a><li类=pr-3><a href=https://about.gitlab.com/terms网站/>术语</a><li类=pr-3><a href=https://about.gitlab.com/privacy网站/>隐私声明</a><li类=pr-3><button id=ot sdk btn class=ot sdk show settings>Cookie设置</button><li类=pr-3><a href=https://about.gitlab.com/company/联系人/>联系人</a></ul></div></div><div class=“row py-2”><div class=“col d-block”><div class=“d-block d-sm-inline-flex”><p类=文本模式>查看<a href=https://gitlab.com/gitlab-org-gitlab/-/blob/master/doc/development/contribution/index.mdtarget=_blank rel=“noopener noreferrer”>page source页面源-在<a href中编辑=https://gitlab.com/-/ide/project/gitlab-org-gitlab/edit/master/-/doc/development/contribution/index.mdtarget=_blank rel=“noopener noreferrer”>Web IDE</a><a href=https://creativecommons.org/licenses/by-sa/4.0/target=_blank rel=“license noopener noreferrer”class=no-attachment-icon><img class=“d-inline pl-3”src=/assets/images/by-sa.svg alt=“Creative Commons license”></a></div></div></div><div class=“行py-2 d-block d-md-none”><div class=col><ul class=“list-nstyled list-inline my-0 d-flex flex-wrap”><li><a href=https://twitter.com/gitlabtarget=_blank class=“pr-3 text-decoration-none gitlab-social”>twitter</a><li><a href=https://www.facebook.com/gitlabtarget=_blank class=“pr-3 text-decoration-none gitlab-social”>facebook</a><li><a href=https://www.youtube.com/channel/UCnMGQ8QHMAnVIsI3xJrihhgtarget=_blank class=“pr-3 text-decoration-none gitlab-social”>youtube</a><li><a href=https://www.linkedin.com/company/gitlab-com网址target=_blank class=“text-decoration-none gitlab-social”>linkedin链接</a></ul></div></div></footer></div></div></div><div class=“col-3 d-none d-xl-flex”><div id=doc-nav class=“doc-nav-w-100”></div></div></节><script src=/frontend/navigation/global_nav.js></script><script src=/assets/vvendor/vue.min.js></script><script src=/assets/fendor/jquery.slim.min.js><script src=/assets/vendor/bootstrap.bundle.min.js><script src=/frondend/default/default.js><script src=/frondend/search/google.js><script src=/frontend/search/recently_viewed.js></script><script src=/frondend/shared/clipboardjs><script src=/frondend/header/index.js><script src=/frondend/default/bodes.js><script src=/frondend/default/feature_details.js><script async src=/assets/javascripts/gtag_analytics.js><script async src=/assets/javascripts/google_tagmanager.js><noscript><iframe src=“https://www.googletagmanager.com/ns.html?id=GTM-NJXWQL“高度=0宽度=0样式=显示:无;可见性:隐藏></noscript><script async src=/assets/javascripts/marketo_analysics.js><脚本异步src=https://cdn.bizible.com/scripts/bizible.js></script><script async src=/assets/javascripts/linkedin_analysics.js><noscript><img height=1 width=1 style=显示:无alt src=“https://dc.ads.linkedin.com/collect/?pid=30694&fmt=gif"></noscript></body></html>