You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
flautoreview
v1.0.0
GitHub Action to automate pull request reviews
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
.
/**
* 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
}
@actions/core
- Core GitHub Actions functions@actions/github
- GitHub Actions Octokit client