This document describes the available feature flags for controlling git auto-export behavior for courses and libraries.
- Type: Boolean
- Default:
True - Purpose: Controls automatic git export for courses when they are published
- Scope: Courses only (unless library flag not set, see below)
- Location:
settings.FEATURES['ENABLE_GIT_AUTO_EXPORT']
Example:
FEATURES['ENABLE_GIT_AUTO_EXPORT'] = True- Type: Boolean
- Default:
False - Purpose: Controls automatic GitHub repository creation for new courses
- Scope: Courses only (unless library flag not set, see below)
- Location:
settings.FEATURES['ENABLE_AUTO_GITHUB_REPO_CREATION']
Example:
FEATURES['ENABLE_AUTO_GITHUB_REPO_CREATION'] = True- Type: Boolean
- Default: False
- Purpose: Controls automatic git export for libraries when they are updated
- Scope: Libraries only
- Location:
settings.FEATURES['ENABLE_GIT_AUTO_LIBRARY_EXPORT']
Example:
# Enable library export separately from courses
FEATURES['ENABLE_GIT_AUTO_LIBRARY_EXPORT'] = True
# Or disable library export while keeping course export enabled
FEATURES['ENABLE_GIT_AUTO_EXPORT'] = True
FEATURES['ENABLE_GIT_AUTO_LIBRARY_EXPORT'] = False- Type: Boolean
- Default: False
- Purpose: Controls automatic GitHub repository creation for new libraries
- Scope: Libraries only
- Location:
settings.FEATURES['ENABLE_AUTO_GITHUB_LIBRARY_REPO_CREATION']
Example:
# Enable library repo creation separately from courses
FEATURES['ENABLE_AUTO_GITHUB_LIBRARY_REPO_CREATION'] = True
# Or disable library repo creation while keeping course repo creation enabled
FEATURES['ENABLE_AUTO_GITHUB_REPO_CREATION'] = True
FEATURES['ENABLE_AUTO_GITHUB_LIBRARY_REPO_CREATION'] = False- Type: Boolean
- Purpose: Master switch for git export functionality
- Note: Must be enabled for any git export to work
- Location:
settings.FEATURES['ENABLE_EXPORT_GIT']
- Type: String (URL)
- Purpose: GitHub organization API URL for creating repositories
- Example:
https://api.github.com/orgs/your-org - Location:
settings.GITHUB_ORG_API_URL
- Type: String (Token)
- Purpose: GitHub personal access token with repo creation permissions
- Location:
settings.GITHUB_ACCESS_TOKEN - Security: Should be stored securely (e.g., environment variable, secrets management)
- Type: String (Path)
- Purpose: Directory path for git export operations
- Default:
/openedx/export_course_repos - Location:
settings.GIT_REPO_EXPORT_DIR
- Never commit
GITHUB_ACCESS_TOKENto version control - Use environment variables or secrets management
- Ensure GitHub token has minimum required permissions:
reposcope for repository creationwrite:orgif creating repos in an organization
- Rotate tokens regularly
- Use different tokens for different environments (dev/staging/prod)