Merge pull request #1231 from matanbaruch/main

Update PR Action Handling Logic in GitHub Action Runner
This commit is contained in:
Tal
2024-09-15 15:30:34 +03:00
committed by GitHub
3 changed files with 10 additions and 1 deletions

View File

@ -83,7 +83,11 @@ async def run_action():
# Handle pull request event
if GITHUB_EVENT_NAME == "pull_request":
action = event_payload.get("action")
if action in ["opened", "reopened", "ready_for_review", "review_requested"]:
# Retrieve the list of actions from the configuration
pr_actions = get_settings().get("GITHUB_ACTION_CONFIG.PR_ACTIONS", ["opened", "reopened", "ready_for_review", "review_requested"])
if action in pr_actions:
pr_url = event_payload.get("pull_request", {}).get("url")
if pr_url:
# legacy - supporting both GITHUB_ACTION and GITHUB_ACTION_CONFIG

View File

@ -200,6 +200,7 @@ ignore_bot_pr = true
# auto_review = true # set as env var in .github/workflows/pr-agent.yaml
# auto_describe = true # set as env var in .github/workflows/pr-agent.yaml
# auto_improve = true # set as env var in .github/workflows/pr-agent.yaml
# pr_actions = ['opened', 'reopened', 'ready_for_review', 'review_requested']
[github_app]
# these toggles allows running the github app from custom deployments