Skip to content

withgraphite/dismiss-stale-approvals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 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.

Usage

  1. Add the below worklow to your repository's .github/workflows directory.
  2. Ensure that the "Dismiss stale pull request approvals" check is required for pull requests, which will ensure that PRs cannot be merged until the action has run successfully.

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

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages