|
|
|
@@ -52,14 +52,14 @@ src/devx/
|
|
|
|
|
├── gitea_cli.py # TeaCLI — wrapper around tea CLI with JSON parsing
|
|
|
|
|
├── i18n.py # Translation system (gettext-based, translations.json)
|
|
|
|
|
├── exceptions.py # Custom exception types
|
|
|
|
|
├── translations.json # Translation strings (en, bg)
|
|
|
|
|
├── translations.json # Translation strings (en, bg, de, pl, ru, zh)
|
|
|
|
|
├── ci/ # CI/CD automation modules (run by workflows)
|
|
|
|
|
│ ├── release.py # Automated versioning, tagging, changelog
|
|
|
|
|
│ ├── publish.py # Build and publish to Gitea PyPI registry (--skip-build for non-Python repos)
|
|
|
|
|
│ ├── auto_merge.py # Squash-merge PRs with task ID validation
|
|
|
|
|
│ ├── check_auto_merge_ready.py # Pre-merge validation gate (branch, PR title, Vikunja, behind-master)
|
|
|
|
|
│ ├── _shared.py # Shared utilities (get_latest_tag)
|
|
|
|
|
│ ├── classify_changes.py # User-facing vs workflow-only change detection
|
|
|
|
|
│ ├── classify_changes.py # User-facing vs infrastructure change detection
|
|
|
|
|
│ ├── detect_release_commit.py # Detect release commits on master
|
|
|
|
|
│ ├── validate_commit_msg.py # Conventional commit validation
|
|
|
|
|
│ ├── pr_review.py # Automated PR review + manual reviews (--event, --body, --checklist-confirmed)
|
|
|
|
@@ -84,21 +84,24 @@ src/devx/
|
|
|
|
|
│ ├── check_pyproject_deps.py # Validate pyproject.toml deps have documentation comments
|
|
|
|
|
│ ├── check_test_coverage.py # Ensure changed files have corresponding tests (configurable rules)
|
|
|
|
|
│ ├── check_agent_docs.py # Validate docs for stale file references (configurable patterns)
|
|
|
|
|
│ ├── check_config.py # Validate pyproject.toml [tool.devx] config
|
|
|
|
|
│ ├── configure_repo.py # Branch protection and label setup
|
|
|
|
|
│ ├── generate_badges.py # Badge SVG generation
|
|
|
|
|
│ ├── generate_cliff_config.py # Generate git-cliff config (cliff.toml)
|
|
|
|
|
│ ├── create_task.py # Create Vikunja tasks
|
|
|
|
|
│ ├── create_pr.py # Create PRs with auto-derived title from Vikunja
|
|
|
|
|
│ ├── pr_status.py # Check CI status for a PR/commit (--wait polls)
|
|
|
|
|
│ ├── pr_logs.py # Fetch logs for failed CI jobs
|
|
|
|
|
│ ├── pr_label.py # Add labels to PRs (idempotent)
|
|
|
|
|
│ ├── rebase.py # Rebase current branch onto origin/master + force-push
|
|
|
|
|
│ └── pr_rebase.py # Rebase a PR's head branch via Gitea API (server-side)
|
|
|
|
|
│ ├── pre_push_check.py # Validate Vikunja task existence before push
|
|
|
|
|
│ └── _shared.py # Shared tool utilities
|
|
|
|
|
├── opentofu.py # OpenTofu output helpers (get_tofu_output, get_tofu_vm_ip, get_tofu_vm_field)
|
|
|
|
|
└── molecule/ # Optional molecule testing helpers (for Ansible projects)
|
|
|
|
|
├── discover_runners.py # Dynamic Gitea runner discovery
|
|
|
|
|
├── distribute_molecule.py # Distribute molecule scenarios across runners (LPT scheduling, --roles-root for multi-role)
|
|
|
|
|
├── molecule_ci_guard.py # Run molecule with cross-runner fail-fast (--roles-root)
|
|
|
|
|
├── molecule_all.py # Run all molecule scenarios locally
|
|
|
|
|
├── start_docker.py # Ensure Docker daemon is running for molecule tests
|
|
|
|
|
└── platforms.py # Supported molecule platforms
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
@@ -183,12 +186,6 @@ the PR. Then add the `ready-to-merge` label. The auto-merge workflow will:
|
|
|
|
|
5. The post-merge workflow marks the Vikunja task as done
|
|
|
|
|
6. The release workflow automatically versions, tags, and publishes
|
|
|
|
|
|
|
|
|
|
**If the branch is behind master** (another PR merged first), auto-merge
|
|
|
|
|
automatically rebases the PR's head branch via the Gitea API
|
|
|
|
|
(`POST /pulls/{index}/update?style=rebase`). This triggers a new CI run.
|
|
|
|
|
The next auto-merge attempt will find the branch up-to-date and merge
|
|
|
|
|
successfully. No manual intervention needed.
|
|
|
|
|
|
|
|
|
|
> **IMPORTANT**: Never manually merge PRs via the API. Always use the auto-merge
|
|
|
|
|
> workflow by adding the `ready-to-merge` label.
|
|
|
|
|
|
|
|
|
@@ -372,7 +369,7 @@ devx uses environment variables with `.env` file fallback for configuration.
|
|
|
|
|
| `DEVX_REPO_NAME` | **(none — must be set)** | Repository name (or `owner/repo`) |
|
|
|
|
|
| `DEVX_TASK_PREFIX` | `DEVX` | Task ID prefix (GRM, OBL-INFRA, etc.) |
|
|
|
|
|
| `DEVX_VIKUNJA_PROJECT_ID` | `6` | Vikunja project ID |
|
|
|
|
|
| `DEVX_LANG` | `en` | Language for i18n (en, bg) |
|
|
|
|
|
| `DEVX_LANG` | `en` | Language for i18n (en, bg, de, pl, ru, zh) |
|
|
|
|
|
| `CI_GITEA_TOKEN` | (from .env) | Gitea API token |
|
|
|
|
|
| `VIKUNJA_TOKEN` | (from .env) | Vikunja API token |
|
|
|
|
|
|
|
|
|
@@ -417,8 +414,6 @@ projects.
|
|
|
|
|
| `devx-pr-logs` | Fetch logs for failed CI jobs (`PR=`, `JOB=`, `TAIL=`) |
|
|
|
|
|
| `devx-pr-label` | Add a label to a PR (`PR=`, `LABEL=ready-to-merge`) |
|
|
|
|
|
| `devx-pr-review` | Post a review on a PR (`PR=`, `EVENT=`, `BODY=`, `CHECKLIST=`) |
|
|
|
|
|
| `devx-rebase` | Rebase current branch onto origin/master + force-push (`NO_PUSH=1` for local only) |
|
|
|
|
|
| `devx-pr-rebase` | Rebase a PR's head branch via Gitea API — server-side, no local git needed (`PR=`) |
|
|
|
|
|
| `devx-check-config` | Validate devx configuration |
|
|
|
|
|
| `devx-configure-gitea-pypi` | Configure Gitea private PyPI registry |
|
|
|
|
|
| `devx-env` | Create .env from .env.example |
|
|
|
|
|