Skip to content

Commit a4ba38e

Browse files
committed
refactor: Automatically review pull requests
1 parent 26193b8 commit a4ba38e

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/comment-pr.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: comment-pr
2+
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#using-data-from-the-triggering-workflow
3+
on:
4+
workflow_run:
5+
workflows: ["receive-pr"]
6+
types:
7+
- completed
8+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
9+
# Since this pull request has write permissions on the target repo, we should **NOT** execute any untrusted code.
10+
jobs:
11+
post-suggestions:
12+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
13+
uses: openrewrite/gh-automation/.github/workflows/comment-pr.yml@main
14+
secrets:
15+
GH_PAT_ACTIONS_READ: ${{ secrets.GH_PAT_ACTIONS_READ }}

.github/workflows/receive-pr.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: receive-pr
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
branches:
6+
- main
7+
# https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
8+
# Since this pull request receives untrusted code, we should **NOT** have any secrets in the environment.
9+
jobs:
10+
upload-patch:
11+
uses: openrewrite/gh-automation/.github/workflows/receive-pr.yml@main

0 commit comments

Comments
 (0)