Become a BeeScreens contributor¶
You would like to contribute to BeeScreens and add new features to our set of apps, packages, tools and more? What good news! Follow this tutorial to set up the BeeScreens repository and make your first contribution!
You'll use Git and OpenSSH to configure your GitLab account in order to clone and open the repository in Visual Studio Code in the Dev Container environment. When pushing your changes, Husky will run the local pipeline to ensure everything's right.
You'll then make your first contribution by adding yourself to the list of the contributors and be part of the BeeScreens community!
This tutorial assumes that you have already followed the following tutorials. If you haven't, please follow them first.
- Install and configure Visual Studio Code
- Install and configure Docker
- Install and configure Dev Containers
Steps¶
Create a GitLab account¶
If you don't have a GitLab account yet, create a new one following the guide How to use GitLab - Create a GitLab account.
Create a SSH keypair¶
If you don't have a SSH keypair yet, create a new one following the guide How to use OpenSSH - Create a SSH keypair.
Danger
The SSH private key must be treated as a sensitive information that must not be shared with others.
The public SSH key will allow to clone the repository without the need to login with your username/password and sign your commits as well. This will ensure you are the real author of the commits you do for a more secure repository.
Add the public SSH key to your GitLab account¶
Add your public SSH key following the guide How to use GitLab - Add a public SSH key to your account.
Ask a maintainer to add you to the BeeScreens GitLab project¶
(Check if it's necessary)
Clone and open the BeeScreens repository in Visual Studio Code¶
You'll now clone the repository locally on your machine.
Open a new window in Visual Studio Code. Select Clone Git Repository... and provide the BeeScreens repository URL: git@gitlab.com:beescreens/beescreens.git
. Select Clone from URL.
Select a directory on your computer to save the repository.
Open the cloned repository.
Set up Git¶
Before opening the project in a Dev Container, Git must be configured locally. This must be done only once.
Add your SSH key to the local SSH agent following the guide How to use OpenSSH - Add the SSH key to the local SSH agent.
Configure Git with the following commands.
Replace <filename>
with the name of the file. Leave empty for default name.
Open the project in Dev Container¶
Open the project in the Dev Container with View > Command palette... and type the Dev Containers: Reopen in Container command and select it.
Set up the project¶
Install the dependencies.
In a terminal, execute the following command(s). | |
---|---|
Initialize all .env
files with defaults values.
In a terminal, execute the following command(s). | |
---|---|
Create an issue on GitLab¶
Create a new issue by going to the Issues section from the left sidebar of the BeeScreens GitLab project.
Select New issue to create a new issue. The default template will inform you what type of issue to create depending on the type of contribution you want to make.
As this is your first contribution, you can use the issue type Issue (selected by default) and the template First contribution.
Follow the instructions in the template carefully. To check the boxes, simply change [ ]
to [x]
.
Create the issue by selecting Submit new issue.
Open a merge request¶
In the newly created issue, select Create merge request. A new window opens and you can create the merge request by selecting Create merge request. This will automatically create a new branch linked to the issue.
Checkout the branch locally¶
On your machine, check out the new branch.
In a terminal, execute the following command(s). | |
---|---|
Add yourself to the list of contributors¶
Add yourself to the list of contributors in the file docs/reference/index.md
under the heading Contributors.
Add your name and GitLab username in the list. Feel free to add your other social media profiles if you'd like it.
Commit your changes¶
Check the changes with Git to ensure all wanted files are here.
In a terminal, execute the following command(s). | |
---|---|
The output of the git status
command should be similar to this.
You can now commit the changes.
In a terminal, execute the following command(s). | |
---|---|
Push your changes to GitLab¶
Push your changes to GitLab. Husky will run the local pipeline to ensure everything's alright.
Did Husky complain about something? Expand me to show how to solve this!
As this is your first contribution, it is more likely to be linked to the spellchecking of your changes. As you've added your own name and username, our spellcheck cspell might complain if a word is not recognized.
In such case, you must add all missing words to cspell. You can check the guide How to use cspell - Add a word to dictionary. Add your name and all related words to the right dictionaries and run cspell to validate the changes.
Once everything is fixed, add the changes to Git and commit them.
The output of the git push
command should be similar to this.
Review the merge request¶
You can now review the merge request on GitLab. You can find the link to the merge request in the output of the git push
command.
GitLab will automatically run the pipeline to ensure everything's alright. At this point, it shouldn't complain about anything.
Mark the merge request as ready¶
Once you're happy with your changes, you can mark the merge request as ready.
This will allow the merge of the merge request after the review.
Add a reviewer to your merge request¶
Using the right sidebar, add a reviewer to your merge request. You can add any maintainer of the BeeScreens team.
Wait for the review from the reviewer¶
The reviewer will review your changes and will either approve them or ask for changes.
If the reviewer asks for changes, they will comment on the merge request and mark it as draft again.
If the reviewer approves your changes, you can merge the changes.
Merge your changes¶
Merge your changes by clicking on the "Merge" button.
The commits will be squashed on the main branch. The branch will be deleted automatically as well.
Switch back to the main branch and pull latest changes¶
Now that the merge is done, you can get the changes on the main branch on your machine.
Execute the following command(s) in a terminal | |
---|---|
Summary¶
Congrats! You have successfully made your first contribution to the BeeScreens project! The workflow will be the same for all your next contributions.
Please have a look to the How to contribute to BeeScreens guide for an in-depth explanation regarding our workflow and elements to pay attention to when contributing to our project.
Want to add your own application? Check out the How to add an application to BeeScreens guide!