diff --git a/docs/docs/installation/github.md b/docs/docs/installation/github.md index b405b020f..edaaf24f7 100644 --- a/docs/docs/installation/github.md +++ b/docs/docs/installation/github.md @@ -7,9 +7,11 @@ You can use our pre-built Github Action Docker image to run PR-Agent as a Github ```yaml on: pull_request: + types: [opened, reopened, ready_for_review] issue_comment: jobs: pr_agent_job: + if: ${{ github.event.sender.type != 'Bot' }} runs-on: ubuntu-latest permissions: issues: write @@ -28,10 +30,12 @@ jobs: ```yaml on: pull_request: + types: [opened, reopened, ready_for_review] issue_comment: jobs: pr_agent_job: + if: ${{ github.event.sender.type != 'Bot' }} runs-on: ubuntu-latest permissions: issues: write diff --git a/pr_agent/servers/github_action_runner.py b/pr_agent/servers/github_action_runner.py index d4278156e..5382d0517 100644 --- a/pr_agent/servers/github_action_runner.py +++ b/pr_agent/servers/github_action_runner.py @@ -101,6 +101,8 @@ async def run_action(): await PRReviewer(pr_url).run() if auto_improve is None or is_true(auto_improve): await PRCodeSuggestions(pr_url).run() + else: + get_logger().info(f"Skipping action: {action}") # Handle issue comment event elif GITHUB_EVENT_NAME == "issue_comment" or GITHUB_EVENT_NAME == "pull_request_review_comment":