chore: Add workflow pr-opened.yml
This commit is contained in:
parent
3bd00f35f7
commit
8d69c037d2
1 changed files with 40 additions and 0 deletions
40
.github/workflows/pr-opened.yml
vendored
Normal file
40
.github/workflows/pr-opened.yml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: PR Opened - Auto Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
auto-review:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Add PR labels
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const labels = ['👀 state:reviewing', '🎯 phase:review'];
|
||||
|
||||
await github.rest.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
labels: labels
|
||||
});
|
||||
|
||||
- name: Comment on PR
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
body: '🤖 自動レビュー開始\n\nコードレビューを実施しています...'
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue