add claw-skills: scripts and workflows folders, update-skills, promote-improvements
This commit is contained in:
29
claw-skills/scripts/promote-improvements
Executable file
29
claw-skills/scripts/promote-improvements
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
WORKSPACE="${AGENT_WORKSPACE:-}"
|
||||
if [[ -z "$WORKSPACE" ]]; then
|
||||
echo "Error: AGENT_WORKSPACE not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd "$WORKSPACE"
|
||||
|
||||
# Get agent name from ego-mgr
|
||||
AGENT_NAME=$(ego-mgr get name)
|
||||
if [[ -z "$AGENT_NAME" ]]; then
|
||||
echo "Error: failed to get agent name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BRANCH_NAME="$AGENT_NAME"
|
||||
|
||||
# Checkout new branch based on agent name
|
||||
echo "Creating and checking out branch: $BRANCH_NAME"
|
||||
git checkout -b "$BRANCH_NAME"
|
||||
|
||||
# Force push to the new branch
|
||||
echo "Force pushing to origin/$BRANCH_NAME"
|
||||
git push origin "$BRANCH_NAME" --force
|
||||
|
||||
echo "Done."
|
||||
Reference in New Issue
Block a user