DEVX-104: feat: auto-rebase in auto-merge, new rebase tools, CLI registration

This commit is contained in:
emil
2026-07-01 00:50:23 +00:00
parent 66554657f2
commit 621b051793
16 changed files with 922 additions and 32 deletions
+11 -1
View File
@@ -90,7 +90,9 @@ src/devx/
│ ├── 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)
│ ├── 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)
├── 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
@@ -181,6 +183,12 @@ 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.
@@ -409,6 +417,8 @@ 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 |