medicode/Dismiss reviews if stale

An action which will dismiss reviews if they are stale. Notably, this action behaves correctly even if the branch was rebased or force pushed (versus GitHub's built-in dismiss if stale functionality).

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
Runtime
Deprecated runtime
namedescriptionrequireddefault
modeSpecify either "check-for-approvals" or "dismiss-stale-reviews"yes
path_to_cached_diffPath to the cached diff file. Only required for dismiss-stale-reviews mode.
path_to_cached_metadataPath to the cached approval metadata JSON file. Used for range-diff comparison which is more accurate for rebased branches. If not provided or file doesn't exist, falls back to diff comparison. Only relevant in dismiss-stale-reviews mode.
tokenGitHub token - at a minimum, this must have 'contents: read' and 'pull-requests: write' permissions. ${{ github.token }}
diffs_directoryOptional directory to store diffs - useful for debugging what changes led to approval dismissals. Only relevant in dismiss-stale-reviews mode.
range_diff_fetch_depthMaximum number of commits to fetch when setting up the repo for git range-diff. Lower values speed up the fetch but may cause range-diff to fail if the commit ranges are deeper than this limit. Set to 0 for unlimited depth. Only relevant in dismiss-stale-reviews mode. 250
repo_pathPath to the repo for the pull request - if the repo is not already checked out to this path, then it will be. There are some cases where we need to compute the diff using git and the repo directly. Only relevant in dismiss-stale-reviews mode. ${{ github.workspace }}
namedescription
approved_shaThe SHA of the commit that was approved. Only set in check-for-approvals mode, and if there is an approval on the PR. Otherwise, this will be an empty string.
review_idThe ID of the approval review. Used for cache key lookup. Only set (non-empty) in check-for-approvals mode when there is an approval on the PR. Empty string if there are no approvals or in dismiss-stale-reviews mode.