Skip to content
check-circle

GitHub Action

flautoreview

v1.0.1 Latest version

flautoreview

check-circle

flautoreview

Automate pull request reviews

Installation

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

              

- name: flautoreview

uses: flex-development/[email protected]

Learn more about this action in flex-development/flautoreview

Choose a version

โœ… flautoreview

GitHub Action to automate pull request reviews

Conventional Commits TypeScript tested with jest

Overview

Usage
Built With
Contributing

Usage

Do you work alone? Do you request reviews from your admin account? Is switching between accounts becoming a hassle? Geared towards lone developers, this action speeds up your pull request workflow by allowing you to automate reviews.

# Automate Pull Request Reviews - .github/workflows/flautoreview.yml
#
# References:
#
# - https://github.com/flex-development/flautoreview

---
name: Automate PR Reviews
on:
  pull_request:
    types: [review_requested]
jobs:
  flautoreview:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout branch
        uses: actions/checkout@v2
      - name: flexdevelopment
        uses: flex-development/[email protected]
        with:
          body: lgtm ๐Ÿ‘๐Ÿพ
          reviewers: flexdevelopment
          senders: unicornware
          token: ${{ secrets.PAT_REPO_flexdevelopment }}
      - name: prbot
        uses: flex-development/[email protected]
        with:
          body: lgtm2 ๐Ÿ‘๐Ÿพ
          reviewers: prbot
          senders: unicornware
          token: ${{ secrets.PAT_REPO_prbot }}

See: .github/workflows/flautoreview.yml

Note: Using github.token, the default token value, will result in the github-actions bot submitting reviews instead of the user or team listed in reviewers.

Options

/**
 * Action options.
 *
 * @see https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#inputs
 */
export interface Inputs {
  /**
   * Body text of pull request review.
   *
   * **Required** if:
   *
   * - `event === ReviewEvent.COMMENT`
   * - `event === ReviewEvent.REQUEST_CHANGES`
   */
  body?: string

  /**
   * Automated review action to perform.
   *
   * @default ReviewEvent.APPROVE
   */
  event?: ReviewEvent

  /**
   * List of user logins and/or team slugs to automate reviews on behalf of;
   * e.g: `'flexdevelopment,team-flautoreview'`.
   *
   * If `undefined` or an empty string, a warning will be logged and the action
   * will exit without failing.
   */
  reviewers?: string

  /**
   * List of users allowed to receive automated reviews; e.g: `'unicornware'`.
   *
   * If an empty string, a warning will be logged and the action will exit
   * without failing.
   */
  senders?: string

  /**
   * GitHub [Personal Access Token][1] with repository access.
   *
   * Using `github.token`, the default `token` value, will result in the
   * [`github-actions`][2] bot submitting reviews instead of the user or team
   * listed in `reviewers`.
   *
   * [1]: https://github.com/settings/tokens/new
   * [2]: https://github.com/features/actions
   *
   * @default '${{ github.token }}'
   */
  token: string
}

Built With