Skip to content
check-circle

GitHub Action

Auto Review

1.0.5 Latest version

Auto Review

check-circle

Auto Review

Automatically review PRs

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Auto Review

uses: Garlic-Team/Auto-Review@1.0.5

Learn more about this action in Garlic-Team/Auto-Review

Choose a version

Auto Review


With this action, you can make a simple auto review system.

Configuration

Key Value Suggested Type Required Default
GITHUB_TOKEN Personal github token. recommend use GITHUB_TOKEN secret env Yes N/A
EVENT_TYPE Type of event will have APPROVE, COMMENT and REQUEST_CHANGES. env No APPROVE
MESSAGE Can add comment at event select. env No Success approve. Enjoy 🏳️‍🌈🎉.

Example:

name: Testing
on: [pull_request]
jobs:
  review:
    name: Review
    runs-on: ubuntu-latest
    steps:
      - name: Review
        uses: Garlic-Team/Auto-Review@1.0.5
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          EVENT_TYPE: APPROVE
          MESSAGE: 'Good Job 🐢 🧄'

Example with ESLint:

name: Testing
on: [pull_request]
jobs:
  lint:
    name: ESLint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Install Node v12
        uses: actions/setup-node@v2
        with:
          node-version: 12

      - name: Install dependencies
        run: npm i

      - name: Run ESLint
        run: npm run test
        id: eslint
        continue-on-error: true

      - name: Success
        if: ${{ steps.eslint.outcome == 'success' }}
        uses: Garlic-Team/Auto-Review@1.0.5
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          EVENT_TYPE: APPROVE
          MESSAGE: 'Everything is fine.'

      - name: Failure
        if: ${{ steps.eslint.outcome != 'success' }}
        uses: Garlic-Team/Auto-Review@1.0.5
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          EVENT_TYPE: REQUEST_CHANGES
          MESSAGE: 'ESLint found errors. Please correct them. '