cli: dev_branch_reset.php - delete and recreate dev branch from main #64

Closed
opened 2026-05-23 22:57:55 +00:00 by jmiller · 1 comment
Owner

Summary

Extract dev branch reset from auto-release.yml (lines 981-999).

What it does

  • Deletes dev branch via Gitea API
  • Recreates dev from main

CLI interface

php cli/dev_branch_reset.php --gitea-url "$URL" --org "$ORG" --repo "$REPO" --token "$TOKEN"

Priority

Medium complexity, high reuse.

## Summary Extract dev branch reset from auto-release.yml (lines 981-999). ## What it does - Deletes dev branch via Gitea API - Recreates dev from main ## CLI interface ```bash php cli/dev_branch_reset.php --gitea-url "$URL" --org "$ORG" --repo "$REPO" --token "$TOKEN" ``` ## Priority Medium complexity, high reuse.
Author
Owner

Completed

Implemented in cli/dev_branch_reset.php on branch feature/cli-release-tools.

Features:

  • Deletes branch via Gitea API (DELETE /branches/{name})
  • Recreates branch from source (POST /branches)
  • Configurable branch names (--branch dev --from main)
  • Token from --token or GA_TOKEN/GITEA_TOKEN env vars
  • Supports --output-summary for CI integration

CLI interface:

php cli/dev_branch_reset.php --token TOKEN --api-base URL --branch dev --from main
## Completed Implemented in `cli/dev_branch_reset.php` on branch [`feature/cli-release-tools`](https://git.mokoconsulting.tech/MokoConsulting/moko-platform/src/branch/feature/cli-release-tools/cli/dev_branch_reset.php). ### Features: - Deletes branch via Gitea API (DELETE /branches/{name}) - Recreates branch from source (POST /branches) - Configurable branch names (`--branch dev --from main`) - Token from `--token` or GA_TOKEN/GITEA_TOKEN env vars - Supports `--output-summary` for CI integration ### CLI interface: ```bash php cli/dev_branch_reset.php --token TOKEN --api-base URL --branch dev --from main ```
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/moko-platform#64