Skip to content

Commit

Permalink
Merge pull request #526 from gitautoai/wes
Browse files Browse the repository at this point in the history
Disable GitAuto to ask back to users when it detects GitHub Actions failures temporarily
  • Loading branch information
hiroshinishio authored Feb 2, 2025
2 parents 5108055 + 086eda8 commit 9dad529
Showing 1 changed file with 1 addition and 29 deletions.
30 changes: 1 addition & 29 deletions services/check_run_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
)
from services.github.github_utils import create_permission_url
from services.openai.commit_changes import chat_with_agent
from services.openai.chat import chat_with_ai
from services.openai.instructions.identify_cause import IDENTIFY_CAUSE
from services.stripe.subscriptions import get_stripe_product_id
from services.supabase import SupabaseManager
from services.supabase.owers_manager import get_stripe_customer_id
Expand Down Expand Up @@ -192,37 +190,11 @@ def handle_check_run(payload: CheckRunCompletedPayload) -> None:
"today": today,
}
user_input = json.dumps(obj=input_message)
how_to_fix: str = chat_with_ai(system_input=IDENTIFY_CAUSE, user_input=user_input)
print(colorize(text="How to fix:", color="green"))
print(how_to_fix)

# Update the comment if any obstacles are found
comment_body = "Checking if I can solve it or if I should just hit you up..."
update_comment(body=comment_body, base_args=base_args, p=30)
messages = [
{"role": "user", "content": how_to_fix},
{"role": "user", "content": f"Today's date:\n{today}"},
]
(
_messages,
_previous_calls,
_tool_name,
_tool_args,
_token_input,
_token_output,
is_commented,
) = chat_with_agent(messages=messages, base_args=base_args, mode="comment")
if is_commented:
return

content = {
"pull_request_title": pull_title,
"file_tree": file_tree,
"workflow_content": workflow_content,
"error_log": error_log,
"how_to_fix": how_to_fix,
}
messages = [{"role": "user", "content": json.dumps(obj=content)}]
messages = [{"role": "user", "content": user_input}]

# Loop a process explore repo and commit changes until the ticket is resolved
previous_calls = []
Expand Down

0 comments on commit 9dad529

Please sign in to comment.