Skip to content

Commit

Permalink
Merge pull request #1253 from Codium-ai/tr/code_suggestion_message
Browse files Browse the repository at this point in the history
Add configuration for auto actions in GitHub Action runner
  • Loading branch information
mrT23 authored Sep 26, 2024
2 parents 511c5a3 + 109b965 commit 6b653db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pr_agent/servers/github_action_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def run_action():
except Exception as e:
get_logger().info(f"github action: failed to apply repo settings: {e}")

# Handle pull request event
# Handle pull request opened event
if GITHUB_EVENT_NAME == "pull_request":
action = event_payload.get("action")

Expand All @@ -101,9 +101,13 @@ async def run_action():
if auto_improve is None:
auto_improve = get_setting_or_env("GITHUB_ACTION_CONFIG.AUTO_IMPROVE", None)

# Set the configuration for auto actions
get_settings().config.is_auto_command = True # Set the flag to indicate that the command is auto
get_settings().pr_description.final_update_message = False # No final update message when auto_describe is enabled
get_logger().info(f"Running auto actions: auto_describe={auto_describe}, auto_review={auto_review}, auto_improve={auto_improve}")

# invoke by default all three tools
if auto_describe is None or is_true(auto_describe):
get_settings().pr_description.final_update_message = False # No final update message when auto_describe is enabled
await PRDescription(pr_url).run()
if auto_review is None or is_true(auto_review):
await PRReviewer(pr_url).run()
Expand Down

0 comments on commit 6b653db

Please sign in to comment.