mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 04:40:38 +08:00
Merge pull request #828 from idubnori/work/fix-827
Improve trigger condition in github actions
This commit is contained in:
@ -7,9 +7,11 @@ You can use our pre-built Github Action Docker image to run PR-Agent as a Github
|
|||||||
```yaml
|
```yaml
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
types: [opened, reopened, ready_for_review]
|
||||||
issue_comment:
|
issue_comment:
|
||||||
jobs:
|
jobs:
|
||||||
pr_agent_job:
|
pr_agent_job:
|
||||||
|
if: ${{ github.event.sender.type != 'Bot' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
@ -28,10 +30,12 @@ jobs:
|
|||||||
```yaml
|
```yaml
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
types: [opened, reopened, ready_for_review]
|
||||||
issue_comment:
|
issue_comment:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr_agent_job:
|
pr_agent_job:
|
||||||
|
if: ${{ github.event.sender.type != 'Bot' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
issues: write
|
issues: write
|
||||||
|
@ -101,6 +101,8 @@ async def run_action():
|
|||||||
await PRReviewer(pr_url).run()
|
await PRReviewer(pr_url).run()
|
||||||
if auto_improve is None or is_true(auto_improve):
|
if auto_improve is None or is_true(auto_improve):
|
||||||
await PRCodeSuggestions(pr_url).run()
|
await PRCodeSuggestions(pr_url).run()
|
||||||
|
else:
|
||||||
|
get_logger().info(f"Skipping action: {action}")
|
||||||
|
|
||||||
# Handle issue comment event
|
# Handle issue comment event
|
||||||
elif GITHUB_EVENT_NAME == "issue_comment" or GITHUB_EVENT_NAME == "pull_request_review_comment":
|
elif GITHUB_EVENT_NAME == "issue_comment" or GITHUB_EVENT_NAME == "pull_request_review_comment":
|
||||||
|
Reference in New Issue
Block a user