Skip to content
Snippets Groups Projects

Add quick-start-contribution-onboarding.rst and improve gitlab.rst

Merged Grzegorz Gwóźdź requested to merge gwozdzcfs/docs:ADD-HOW-TO-CONTRIBUTE into main
Compare and
2 files
+ 109
0
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 108
0
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: ../definitions.rst
How to contribute to the |main_project_name|
############################################
This page explains how to contribute to the |main_project_name| for
new people who would like to join.
.. contents::
:depth: 2
Setting up
**********
Creating an account on Eclipse
------------------------------
Head to the `Eclipse foundation website <https://accounts.eclipse.org/user/register?destination=user/login>`_ and set up an account by entering your:
- Email
- Username
- Full name
- Organization
- Password
- Country
Then read and check the box to agree to Terms of Use, Privacy Policy and Code of Conduct.
When you complete that, follow the instructions sent to your email to activate the account.
Signing the ECA
---------------
In order to contribute to the |main_project_name| you need to sign the
`Eclipse Contributor Agreement <https://accounts.eclipse.org/user/eca>`_,
which describes the terms under which you can contribute to the project.
If you sign this ECA, you confirm your legal rights to submit the code to the project.
You also provide license to your contributions to Eclipse and specified users, however
you still own your contributions.
Setting up Gitlab
-----------------
Now you can go to `the Oniro Gitlab <https://gitlab.eclipse.org/eclipse/oniro-core/oniro>`_
. You should use the account that was created in the previous step to log in.
To push and pull over HTTPS with Git using your account, you must set a password
or `a Personal Access Token <https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html>`_
to use instead.
If you want to push or pull repositories using SSH, you have to
`add a SSH key <https://docs.gitlab.com/ee/user/ssh.html>`_ to your profile.
Contributing to the |main_project_name|
***************************************
If you complete previous steps, your account is ready and you can contribute to the |main_project_name|.
Setting up git
--------------
Make sure you have git installed on your device.
Forking the repository
----------------------
First fork your project by going to `the Oniro Gitlab <https://gitlab.eclipse.org/eclipse/oniro-core/oniro>`_
and clicking on the fork button that is in the top right of the screen.
Working on your repository
--------------------------
1. Clone your fork by typing ``git clone`` and adding address of your fork which can be found by
clicking ``Clone`` button in your fork's website. You can clone it by SSH or HTTPS.
#. Enter the directory with your local repository and configure it by typing:
.. code-block:: bash
$ git config --local user.email <your_eclipse_account_email>
$ git config --local user.name <your_eclipse_full_name>
3. Start working on the project by creating a new branch.
#. Make your changes, then add and commit
them. Each commit has to be signed off by the e-mail used in your Eclipse account
(add ``-s`` to every ``git commit``). Give relevant names to your commits, to point
which file you add/modify.
#. After that you can push the changes to your branch.
Creating the Merge Request
--------------------------
1. Go to your repository in an internet browser.
#. Create a Merge Request by clicking ``Merge Requests`` on left toolbar
and press ``New merge request``. Add an explainable description and create a merge request.
Alternatively, you can enter the website of your fork. You should see a message that you
pushed your branch to the repository. In the same section you can press ``Create merge request``.
#. Before merging, it has to be reviewed and approved by 2 of |main_project_name| repository
maintainers. Read their review and add any required changes to your merge request.
#. After you polish your merge request, the maintainers will run the pipelines which check
if your changes do not break the project and approve them. If everything is correct, your work
is merged to the main project. Remember that changes which were added on top of
changes introduced in the MR, should be squashed into the initial commit.
\ No newline at end of file
Loading