Skip to content
πŸ‘ GitHub Action for automatically approving GitHub pull requests
TypeScript
Branch: master
Clone or download
hmarr Merge pull request #38 from hmarr/dependabot/npm_and_yarn/types/node-…
…12.12.8

Bump @types/node from 12.12.7 to 12.12.8
Latest commit 0d78dfd Nov 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows Go back to diff --quiet for exit codes Sep 11, 2019
dist Re-build Oct 24, 2019
src Approve PR Sep 11, 2019
.gitignore Add actions v2 skeleton Sep 11, 2019
README.md Remove duplicated text in README Sep 12, 2019
action.yml Add branding Sep 11, 2019
package.json Bump @types/node from 12.12.7 to 12.12.8 Nov 18, 2019
tsconfig.json Add actions v2 skeleton Sep 11, 2019
yarn.lock Bump @types/node from 12.12.7 to 12.12.8 Nov 18, 2019

README.md

Auto Approve GitHub Action

Name: hmarr/auto-approve-action

Automatically approve GitHub pull requests. The GITHUB_TOKEN secret must be provided as the github-token input for the action to work.

Important: use v2.0.0 or later, as v1 was designed for the initial GitHub Actions beta, and no longer works.

Usage instructions

Create a workflow file (e.g. .github/workflows/auto-approve.yml) that contains a step that uses: hmarr/auto-approve-action@v2.0.0. Here's an example workflow file:

name: Auto approve
on: pull_request

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: hmarr/auto-approve-action@v2.0.0
      with:
        github-token: "${{ secrets.GITHUB_TOKEN }}"

Combine with an if clause to only auto-approve certain users. For example, to auto-approve Dependabot pull requests, use:

    ...
    steps:
    - uses: hmarr/auto-approve-action@v2.0.0
      if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
      with:
        github-token: "${{ secrets.GITHUB_TOKEN }}"
    ...

Why?

GitHub lets you prevent merges of unapproved pull requests. However, it's occasionally useful to selectively circumvent this restriction - for instance, some people want Dependabot's automated pull requests to not require approval.

You can’t perform that action at this time.