diff --git a/contributing/how-to-contribute.rst b/contributing/how-to-contribute.rst new file mode 100644 index 0000000000000000000000000000000000000000..6be5510383372a1f52a9f6f2b87ee4763cd9edd2 --- /dev/null +++ b/contributing/how-to-contribute.rst @@ -0,0 +1,100 @@ +.. 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 `ECA <https://accounts.eclipse.org/user/eca>`_. + +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 to have git installed in your device. After that configure it by +typing: + +.. code-block:: bash + + $ git config user.email "your_eclipse_account_email" + $ git config user.name "Your eclipse full name" + +Forking the repository +---------------------- + +First fork your project by going to the `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. +#. 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. + +#. 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 will check + if your changes don't break the project and approve to merge it 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. diff --git a/contributing/index.rst b/contributing/index.rst index ab10ef85281dfdf0bee1a91c10754b771c6b6733..a40cfc6937154266d4a9f158fca5fa9ea4f23073 100644 --- a/contributing/index.rst +++ b/contributing/index.rst @@ -16,6 +16,7 @@ requirements. .. toctree:: :maxdepth: 1 + how-to-contribute gitlab reuse dco