chore: Add workflow pr-opened.yml

This commit is contained in:
Shunsuke Hayashi 2025-11-22 17:07:15 +09:00
parent 3bd00f35f7
commit 8d69c037d2

40
.github/workflows/pr-opened.yml vendored Normal file
View 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コードレビューを実施しています...'
});