mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
changed to check if there are staged changes
This commit is contained in:
10
cli.py
10
cli.py
@@ -399,12 +399,13 @@ def enter(agent_name, branch):
|
||||
click.echo(click.style(f"⚠️ The agent '{agent_name}' has already entered the arena. Use './run arena submit' to update your submission.", fg='yellow'))
|
||||
return
|
||||
|
||||
# Check if there are uncommitted changes
|
||||
# Check if there are staged or unstaged changes
|
||||
changes = subprocess.check_output(['git', 'status', '--porcelain']).decode('utf-8').strip()
|
||||
if changes:
|
||||
click.echo(click.style(f"❌ There are uncommitted changes. Please commit or stash them and run the command again.", fg='red'))
|
||||
click.echo(click.style(f"❌ There are staged or unstaged changes. Please commit or unstage them and run the command again.", fg='red'))
|
||||
return
|
||||
|
||||
|
||||
try:
|
||||
# Load GitHub access token from file
|
||||
with open('.github_access_token', 'r') as file:
|
||||
@@ -499,11 +500,12 @@ def submit(agent_name, branch):
|
||||
click.echo(click.style(f"❌ The agent '{agent_name}' has not yet entered the arena. Please enter the arena with './run arena enter'", fg='red'))
|
||||
return
|
||||
|
||||
# Check if there are uncommitted changes
|
||||
# Check if there are staged or unstaged changes
|
||||
changes = subprocess.check_output(['git', 'status', '--porcelain']).decode('utf-8').strip()
|
||||
if changes:
|
||||
click.echo(click.style(f"❌ There are uncommitted changes. Please commit or stash them and run the command again.", fg='red'))
|
||||
click.echo(click.style(f"❌ There are staged or unstaged changes. Please commit or unstage them and run the command again.", fg='red'))
|
||||
return
|
||||
|
||||
|
||||
try:
|
||||
# Load GitHub access token from file
|
||||
|
||||
Reference in New Issue
Block a user