gitdock/CONTRIBUTING.md

4.1 KiB
Raw Blame History

Contributing to GitDock

Thank you for your interest in contributing to GitDock!

We believe that everyone can contribute.

Reporting bugs & proposing features

We use issues to collect bugs, feature requests, and more. You can browse through existing issues. To report a bug, suggest an improvement, or propose a feature, please create a new issue if there is not already an issue for it.

Contributing code

GitDock is built on the electron framework which makes it easy to build desktop apps with JavaScript and HTML.

1. Fork & clone the project

Before you can start contributing code, please fork this project to your GitLab account.

If you have not yet installed git, read this guide and install git to your local machine. Alternatively, you can use Gitpod to develop in the cloud.

If you decide to work on your local system, clone the project.

2. Install dependencies

GitDock requires Node.js to be installed. If you dont have it installed, please do it now. You can find binaries and installers on the official Node.js download page.

After you have cloned your fork, open a terminal in the directory. Use npm install to install all Node.js dependencies.

3. Start making changes

You can start GitDock with npm start. After a few seconds, the GitDock window should appear. If it does, congrats! 🎉

You can now start making changes. Except when you edit .html files, you have to quit GitDock and restart it with npm start to see your changes in effect.

4. Open a merge request

When youd like to get feedback on your changes or are satisfied with them, push the changes to a new branch and open a merge request.

Running tests

At the moment, tests need a GitLab.com Personal Access Token (access token) to pass. The reason for that constraint is that some tests will load data from the GitLab.com API. This is more time-efficient than mocking all API responses and—because this project is affiliated with GitLab—, it helps find problems with the GitLab API.

After you have created a personal access token, you can run the tests with the following command. Lets suppose gpat-1234 is your access token:

ACCESS_TOKEN="gpat-1234" npm test

The progress of removing this constraint, at least for forks, is tracked in its own issue.

Pipelines in forks

The above mentioned contraint of requiring a GitLab.com access token applies to pipelines as well. You have to create a new CI variable in your fork project. Follow this guide but keep Protect variable unchecked and, to prevent leaking your access token, check the Mask variable checkbox.

Pull mirroring in your fork

The main branch of your fork repository will not automatically stay updated with the main branch of the original GitDock repository. If you dont want to update your main branch manually, you can enable repository mirroring from the main GitDock repository to your fork.