Auto-Create Organization Projects
Overview
The auto_create_org_projects.py script automatically creates smart GitHub Projects for every repository in the mokoconsulting-tech organization. It intelligently detects project types (Joomla, Dolibarr, or Generic) and creates appropriate project structures with customized fields and views.
Features
- Automatic Project Type Detection: Detects Joomla, Dolibarr, or generic projects
- Smart Project Creation: Creates projects with type-specific custom fields and views
- Roadmap Generation: Automatically generates roadmaps for repos that don't have one
- Roadmap Push: Pushes generated roadmaps directly to repository docs/ROADMAP.md
- moko-platform Integration: Respects existing Project #7 for moko-platform
- Dry Run Mode: Test without making actual changes
- Verbose Logging: Detailed output for debugging
Requirements
Authentication
One of the following authentication methods:
-
GitHub Token (Recommended for automation):
export GH_PAT="your_personal_access_token" -
GitHub CLI:
gh auth login
Token Permissions
The token needs the following scopes:
repo-- Full repository accessproject-- Project read/write accessread:org-- Organization read access
Python Dependencies
pip3 install requests
Usage
Basic Usage
# Dry run first to see what would happen
python3 scripts/auto_create_org_projects.py --dry-run
# Actually create projects and roadmaps
export GH_PAT="your_token"
python3 scripts/auto_create_org_projects.py
With Verbose Logging
python3 scripts/auto_create_org_projects.py --verbose
For a Different Organization
python3 scripts/auto_create_org_projects.py --org your-org-name
Combined Options
python3 scripts/auto_create_org_projects.py --dry-run --verbose --org MokoConsulting
What It Does
1. Repository Discovery
- Fetches all repositories in the organization
- Filters out archived repositories
- Skips moko-platform (Project #7 already exists)
2. Project Type Detection
Automatically detects project type based on repository contents:
| Type | Detection Method |
|---|---|
| Joomla | .xml manifest files, Joomla directory structure (administrator/, components/, etc.) |
| Dolibarr | Module descriptor files (mod*.class.php), Dolibarr directory structure (htdocs/, core/modules/) |
| Generic | Default fallback for any repository not matching Joomla or Dolibarr patterns |
3. Roadmap Management
For each repository:
- Check for Existing Roadmap: Looks for
docs/ROADMAP.md - Generate if Missing: Creates type-specific roadmap with version-based milestones
- Push to Repository: Commits roadmap directly to default branch
4. Project Creation
Creates GitHub Project v2 with:
Common Fields (All Types):
- Status, Priority, Size/Effort, Sprint, Target Version
- Blocked Reason, Acceptance Criteria
Joomla-Specific Fields:
- Joomla Version, Extension Type, Marketplace Status
- Update Server URL, PHP Minimum Version, Installation Type
Dolibarr-Specific Fields:
- Dolibarr Version, Module Number, Database Changes
- Module Descriptor Path, Module Version, Requires Sudo
Generic Fields:
- Technology Stack, Environment, Release Channel
- API Version, Deployment Status
5. Project Views
Creates standard views for each project:
- Master Backlog (Table) -- All items by priority
- Sprint Board (Board) -- Kanban view by status
- Release Roadmap (Roadmap) -- Timeline by version
- Blocked Items (Table) -- Items needing attention
Plus type-specific views:
- Joomla: Extension Compatibility Matrix, Marketplace Pipeline
- Dolibarr: Module Compatibility Matrix, Database Migration Tracker
- Generic: Deployment Pipeline, Technology Stack View
Integration with CI/CD
You can run this script in Gitea Actions:
name: Auto-Create Projects
on:
schedule:
- cron: '0 0 * * 0' # Weekly
workflow_dispatch:
jobs:
create-projects:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests
- name: Create projects
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: python3 scripts/auto_create_org_projects.py --verbose
Version History
| Version | Date | Changes |
|---|---|---|
| 01.00.00 | 2026-01-12 | Initial release with auto-detection and roadmap generation |
Related
- QUICKSTART_ORG_PROJECTS -- Quick start guide
- ARCHITECTURE -- Platform scripts architecture
- DRY_RUN_PATTERN -- Standard dry-run pattern
Repo: moko-platform · moko-platform wiki
| Field | Value |
|---|---|
| Minimum Version | 04.07.00 |
| Platform | all |
| Applies To | All repositories |
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-05-09 | Moko Consulting | Initial version |