Skip to content

Commit 04d51c0

Browse files
committed
Fix pytest; add script to clear tags
1 parent 4160ee4 commit 04d51c0

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

codeclash/agents/minisweagent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def add_message(self, role: str, content: str, **kwargs):
4040
class MiniSWEAgent(Player):
4141
"""Player with agentic code editing capabilities"""
4242

43-
def __init__(self, config: dict, environment: DockerEnvironment, game_context: GameContext):
44-
super().__init__(config, environment=environment, game_context=game_context)
43+
def __init__(self, config: dict, environment: DockerEnvironment, game_context: GameContext, push: bool = False):
44+
super().__init__(config, environment=environment, game_context=game_context, push=push)
4545

4646
def run(self):
4747
# temporary workaround around https://github.com/SWE-agent/mini-swe-agent/issues/477

scripts/clear_tags.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
if [ $# -ne 1 ]; then
4+
echo "Usage: $0 repository-name"
5+
exit 1
6+
fi
7+
REPO=$1
8+
if [[ ! "$REPO" =~ ^(CoreWar|RobotRumble|RoboCode|HuskyBench|BattleSnake|BattleCode)$ ]]; then
9+
echo "Repository name must be one of: CoreWar, RobotRumble, RoboCode, HuskyBench, BattleSnake, BattleCode"
10+
exit 1
11+
fi
12+
git clone git@github.com:emagedoc/$REPO.git
13+
cd $REPO
14+
git ls-remote --tags origin | awk '{print $2}' | sed 's/refs\/tags\///' | xargs -I {} git push origin :refs/tags/{}
15+
cd ..
16+
rm -rf $REPO

0 commit comments

Comments
 (0)