Skip to content

Faire/dismiss-stale-approvals

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

110 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dismiss-stale-approvals

A GitHub action to automatically dismiss stale approvals on pull requests.

Unlike the built in GitHub protection, this action will compare the git range-diff of the new version against the previous version, and only dismiss approvals if the diff has changed. The dismissed approvals will only consist of approvals for PRs that are not the HEAD commit or an equivalent commit as verified with git range-diff.

Usage

  1. Add the below workflow to your repository's .github/workflows directory.
  2. Ensure that this GitHub Action is required for pull requests, which will ensure that PRs cannot be merged until the action has run successfully. Screenshot of selecting the dismiss-stale-approvals action as a required check

You can make the check required with either:

See the example repository for a complete example.

name: Dismiss stale pull request approvals

on:
  pull_request:
    types: [
        opened,
        synchronize,
        reopened,
      ]


permissions:
  actions: read
  contents: read
  pull-requests: write

jobs:
  dismiss_stale_approvals:
    runs-on: ubuntu-latest
    steps:
      - name: Dismiss stale pull request approvals
        uses: withgraphite/dismiss-stale-approvals@main
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

About

Action to dismiss approvals after additional commits

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%