summaryrefslogtreecommitdiff
path: root/.github/workflows/auto_review_pr.yml
blob: 1351e78b98abef478eb8a778bcfa57da3f56833b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Auto Review PR
on:
  pull_request_target:
    types: [opened, ready_for_review, reopened]
    branches: [master]

permissions:
  contents: read

jobs:
  auto-review-pr:
    name: Auto Review PR
    runs-on: ubuntu-latest
    if: ${{ github.repository == 'ruby/ruby' && github.base_ref == 'master' }}

    permissions:
      pull-requests: write
      contents: read

    steps:
      - name: Checkout repository
        uses: actions/checkout@v6.0.1

      - uses: ruby/setup-ruby@ab177d40ee5483edb974554986f56b33477e21d0 # v1.265.0
        with:
          ruby-version: '3.4'
          bundler: none

      - name: Auto Review PR
        run: ruby tool/auto_review_pr.rb "$GITHUB_PR_NUMBER"
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}