Add two engineering skills for implementing tracker tickets end to end: - dev-workflow: selects workflow:ready-for-agent tickets, runs them in isolated worktrees, opens one PR/MR per ticket, reviews, merges, and cleans up. - forge-cli: detects the forge from origin and wraps gh, glab, and tea for Gitea/Forgejo, GitHub, and GitLab. Docs cover install, prerequisites, ticket labels, and per-forge CLI usage.
48 lines
1.1 KiB
Bash
Executable File
48 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -u
|
|
|
|
remote="$(git remote get-url origin 2>/dev/null || true)"
|
|
if [[ -z "$remote" ]]; then
|
|
printf '%s\n' 'No origin remote found; run this inside a checked-out forge repository.' >&2
|
|
exit 1
|
|
fi
|
|
|
|
choice="${DEV_WORKFLOW_FORGE:-}"
|
|
if [[ -z "$choice" ]]; then
|
|
case "$remote" in
|
|
*github.com*) choice=gh ;;
|
|
*gitlab.com* | *gitlab.*) choice=glab ;;
|
|
*) choice=tea ;;
|
|
esac
|
|
fi
|
|
|
|
case "$choice" in
|
|
tea | gh | glab) ;;
|
|
*)
|
|
printf 'Unsupported DEV_WORKFLOW_FORGE=%s (use tea, gh, or glab).\n' "$choice" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if ! command -v "$choice" >/dev/null 2>&1; then
|
|
printf 'Required forge CLI not found: %s\n' "$choice" >&2
|
|
exit 1
|
|
fi
|
|
|
|
case "$choice" in
|
|
tea) "$choice" login list >/dev/null 2>&1 || {
|
|
printf '%s authentication check failed.\n' "$choice" >&2
|
|
exit 1
|
|
} ;;
|
|
gh) "$choice" auth status >/dev/null 2>&1 || {
|
|
printf '%s authentication check failed.\n' "$choice" >&2
|
|
exit 1
|
|
} ;;
|
|
glab) "$choice" auth status >/dev/null 2>&1 || {
|
|
printf '%s authentication check failed.\n' "$choice" >&2
|
|
exit 1
|
|
} ;;
|
|
esac
|
|
|
|
printf 'forge=%s\nremote=%s\n' "$choice" "$remote"
|