Skip to content

Latest commit

 

History

History
71 lines (52 loc) · 1.54 KB

File metadata and controls

71 lines (52 loc) · 1.54 KB

Contributing to this repo

Setup

Personal access token (PAT)

Follow these instructions to configurate a personal access token.

Only permissions needed:

  • public_repo

Save the token to a secure location. Click the "Configure SSO" button and "Authorize" if applicable.

Config

cp config.example.json config.json

# Add your GitHub username and token
$EDITOR config.json

# Export the JSON credentials into an environment variable
export CONFIG=$(<config.json)

Virtual environment

Install dependencies

Instructions for POSIX bash/zsh (see here for syntax for other shells):

python3 -m venv env
source env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt -r dev-requirements.txt
source env/bin/activate

Testing locally

PYTHONPATH=hubcap python -m pytest

Run in test mode

export ENV=test
./cron.sh

Optional configuration environment variables

# Default value is the `git-tmp` directory within the current working directory
# This directory will be deleted by default at the end of the run
export GIT_TMP=git-tmp

Optional parameters

Preserve commits/build artifacts within the $GIT_TMP directory

export ENV=test
./cron.sh --no-cleanup

Run in production mode

WARNING: Use with caution -- will modify state.

export ENV=prod
./cron.sh