-
Notifications
You must be signed in to change notification settings - Fork 14
How to Contribute
There are many ways to contribute to our project: logging bugs, submitting pull requests, reporting issues, and making suggestions.
After cloning and building the repo, check out the issues list. Issues labeled help wanted are good opportunities to submit a PR. Issues labeled good first issue are great candidates if you are new to the codebase. If you are contributing significant changes or if the issue is already assigned to a specific monthly milestone, please discuss your plans with the assignee of the issue before starting work.
To download the necessary tools, clone the repository, and install dependencies with pip, you will need network access.
You'll need the following tools:
- Git
- Python 3 with pip and (recommended) virtual environment - venv
- Your Python installation may not include all the required utilities. It is recommended to install the setuptools package (
pip install setuptools); otherwise, you may encounter hard-to-debug errors.
- Your Python installation may not include all the required utilities. It is recommended to install the setuptools package (
- Docker, if you want to run unittests
After cloning this repository, open your command shell and execute:
python3 -m venv venv # Recommended
source venv/bin/activate # Recommended
pip install -r requirements.txt
pip install -r requirements-dev.txt
pre-commit install# After adding all files
pre-commit run -a
git commit
git push origin <your_feature_name>Don't forget to create a pull request after pushing your changes!
To run unittests, you need to install Docker on your environment to run Phorge in the background.
cd tests
docker build -t phorge_debug .
docker run -d --rm -p 8080:80 --name phorge_debug phorge_debugThe phorge_debug container will automatically initialize the Phorge environment, enable username/password authorization, and generate a User API key for the default admin user. By default, you can access your locally running Phorge instance at http://127.0.0.1:8080/.
If you want to access Phorge from your browser, modify the Dockerfile to append the --password argument when calling ./bin/init_phabricator.
You can retrieve the User API Key by entering the following command:
docker exec phorge_debug /usr/local/bin/get-api-token.shAfter that, you can run unittest locally by this command:
PHABRICATOR_TOKEN=<api-token> PHABRICATOR_URL=http://127.0.0.1:8080/api/ pytest