Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.md « contributing « development « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 55827e00e432bf3477fe4cb80d463279df703325 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
---
type: reference, dev
stage: none
group: Development
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

# Contribute to GitLab

Thank you for your interest in contributing to GitLab. This guide details how
to contribute to GitLab in a way that is easy for everyone.

For a first-time step-by-step guide to the contribution process, see our
[Contributing to GitLab](https://about.gitlab.com/community/contribute/) page.

Looking for something to work on? See the
[How to contribute](#how-to-contribute) section for more information.

GitLab comes in two flavors:

- GitLab Community Edition (CE), our free and open source edition.
- GitLab Enterprise Edition (EE), which is our commercial edition.

Throughout this guide you will see references to CE and EE for abbreviation.

## Code of conduct

We want to create a welcoming environment for everyone who is interested in contributing.
For more information about our commitment to an open and welcoming environment, see our [Code of Conduct page](https://about.gitlab.com/community/contribute/code-of-conduct/).

Issues and merge requests should be in English and contain appropriate language
for audiences of all ages.

## How to contribute

If you would like to contribute to GitLab:

- Issues with the
  [`~Seeking community contributions` label](issue_workflow.md#label-for-community-contributors)
  are a great place to start.
- Optimizing our tests is another great opportunity to contribute. You can use
  [RSpec profiling statistics](https://gitlab-org.gitlab.io/rspec_profiling_stats/) to identify
  slowest tests. These tests are good candidates for improving and checking if any of
  [best practices](../testing_guide/best_practices.md)
  could speed them up.
- Consult the [Contribution Flow](#contribution-flow) section to learn the process.

### Contribution flow

The general flow of contributing to GitLab is:

1. [Create a fork](../../user/project/repository/forking_workflow.md#creating-a-fork)
   of GitLab. In some cases, you will want to set up the
   [GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit) to
   [develop against your fork](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/index.md#develop-in-your-own-gitlab-fork).
1. Make your changes in your fork.
1. When you're ready, [create a new merge request](../../user/project/merge_requests/creating_merge_requests.md).
1. In the merge request's description:
   - Ensure you provide complete and accurate information.
   - Review the provided checklist.
1. Once you're ready, mark your MR as ready for review with `@gitlab-bot ready`.
   - This will add the `~"workflow::ready for review"` label, and then automatically assign a merge request coach as reviewer.
   - If you know a relevant reviewer (for example, someone that was involved a related issue), you can also
     assign them directly with `@gitlab-bot ready @username`.

#### Review process

When you submit code to GitLab, we really want it to get merged! However, we always review
submissions carefully, and this takes time. Code submissions will usually be reviewed by two
[domain experts](../code_review.md#domain-experts) before being merged:

- A [reviewer](../code_review.md#the-responsibility-of-the-reviewer).
- A [maintainer](../code_review.md#the-responsibility-of-the-maintainer).

After review, the reviewer could ask the author to update the merge request. In that case, the reviewer would set the `~"workflow::in dev"` label.
Once the merge request has been updated and set as ready for review again (for example, with `@gitlab-bot ready`), they will review the code again.
This process may repeat any number of times before merge, to help make the contribution the best it can be.

Lastly, keep the following in mind when submitting merge requests:

- When reviewers are reading through a merge request they may request guidance from other
  reviewers.
- If the code quality is found to not meet GitLab standards, the merge request reviewer will
  provide guidance and refer the author to our:
  - [Documentation](../documentation/styleguide/index.md) style guide.
  - [Code style guides](style_guides.md).
- Sometimes style guides will be followed but the code will lack structural integrity, or the
  reviewer will have reservations about the code's overall quality. When there is a reservation,
  the reviewer will inform the author and provide some guidance.
- Though GitLab generally allows anyone to indicate
  [approval](../../user/project/merge_requests/approvals/index.md) of merge requests, the
  maintainer may require [approvals from certain reviewers](../code_review.md#approval-guidelines)
  before merging a merge request.
- Sometimes a maintainer may choose to close a merge request. They will fully disclose why it will not
  be merged, as well as some guidance. The maintainers will be open to discussion about how to change
  the code so it can be approved and merged in the future.

#### Getting attention on your merge request

GitLab will do its best to review community contributions as quickly as possible. Specially
appointed developers review community contributions daily. Look at the
[team page](https://about.gitlab.com/company/team/) for the merge request coach who specializes in
the type of code you have written and mention them in the merge request. For example, if you have
written some front-end code, you should mention the frontend merge request coach. If
your code has multiple disciplines, you may mention multiple merge request coaches.

GitLab receives a lot of community contributions. If your code has not been reviewed within two
working days of its initial submission, you can ask for help with `@gitlab-bot help`.

#### Addition of external libraries

When submitting code to GitLab, you may feel that your contribution requires the aid of an external
library. If your code includes an external library, please provide a link to the library, as well as
reasons for including it.

Mention a maintainer in merge requests that contain:

- More than 500 changes.
- Any major [breaking changes](../deprecation_guidelines/index.md).
- External libraries.

If you are not sure who to mention, the reviewer will do this for you early in the merge request process.

#### Issues workflow

This [documentation](issue_workflow.md) outlines the current issue workflow:

- [Issue triaging](issue_workflow.md#issue-triaging)
- [Labels](issue_workflow.md#labels)
- [Feature proposals](issue_workflow.md#feature-proposals)
- [Issue weight](issue_workflow.md#issue-weight)
- [Regression issues](issue_workflow.md#regression-issues)
- [Technical and UX debt](issue_workflow.md#technical-and-ux-debt)
- [Technical debt in follow-up issues](issue_workflow.md#technical-debt-in-follow-up-issues)

#### Merge requests workflow

This [documentation](merge_request_workflow.md) outlines the current merge request process.

- [Merge request guidelines](merge_request_workflow.md#merge-request-guidelines-for-contributors)
- [Contribution acceptance criteria](merge_request_workflow.md#contribution-acceptance-criteria)
- [Definition of done](merge_request_workflow.md#definition-of-done)
- [Dependencies](merge_request_workflow.md#dependencies)

## Closing policy for issues and merge requests

- For the criteria for closing issues, see [the Issue Triage handbook page](https://about.gitlab.com/handbook/engineering/quality/issue-triage/#outdated-issues).
- For the criteria for closing merge requests, see [the Merge Request Workflow](merge_request_workflow.md).

## Getting an Enterprise Edition License

If you need a license for contributing to an EE-feature, see
[relevant information](https://about.gitlab.com/handbook/marketing/community-relations/code-contributor-program/operations/#contributing-to-the-gitlab-enterprise-edition-ee).

## Finding help

- [Get help](https://about.gitlab.com/get-help/).
- Join the community-run [Discord server](https://discord.com/invite/gitlab) and find other contributors in the `#contribute` channel.