From fa889fbb064d2f36e0bc2fdcae79a4718a3558af Mon Sep 17 00:00:00 2001 From: idubnori Date: Wed, 27 Mar 2024 12:00:24 +0900 Subject: [PATCH 1/3] docs: add pull request event types --- docs/docs/installation/github.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/installation/github.md b/docs/docs/installation/github.md index b405b020..f19590f1 100644 --- a/docs/docs/installation/github.md +++ b/docs/docs/installation/github.md @@ -7,6 +7,7 @@ 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,review_requested] issue_comment: jobs: pr_agent_job: @@ -28,6 +29,7 @@ jobs: ```yaml on: pull_request: + types: [opened,reopened,ready_for_review,review_requested] issue_comment: jobs: From 493f73f1ce5e0625026cd0ebbcb0bac098990b62 Mon Sep 17 00:00:00 2001 From: idubnori Date: Wed, 27 Mar 2024 12:03:27 +0900 Subject: [PATCH 2/3] chore: add logging the reason not execute --- pr_agent/servers/github_action_runner.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pr_agent/servers/github_action_runner.py b/pr_agent/servers/github_action_runner.py index d4278156..5382d051 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": From 020a29ebb8c3794b0768ef3ab13ce19b69fd00ef Mon Sep 17 00:00:00 2001 From: idubnori Date: Wed, 27 Mar 2024 20:53:46 +0900 Subject: [PATCH 3/3] docs: optimize condition of github actions --- docs/docs/installation/github.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/docs/installation/github.md b/docs/docs/installation/github.md index f19590f1..edaaf24f 100644 --- a/docs/docs/installation/github.md +++ b/docs/docs/installation/github.md @@ -7,10 +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,review_requested] + 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 @@ -29,11 +30,12 @@ jobs: ```yaml on: pull_request: - types: [opened,reopened,ready_for_review,review_requested] + 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