Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jrylan/github-action-stuck-pr-notifier
Automatically label and mention/notify users about stuck pull requests.
https://github.com/jrylan/github-action-stuck-pr-notifier
github-actions prs pull-requests
Last synced: about 1 month ago
JSON representation
Automatically label and mention/notify users about stuck pull requests.
- Host: GitHub
- URL: https://github.com/jrylan/github-action-stuck-pr-notifier
- Owner: jrylan
- License: isc
- Created: 2020-06-20T17:15:09.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-05T16:08:20.000Z (about 2 years ago)
- Last Synced: 2024-05-06T01:41:00.225Z (about 2 months ago)
- Topics: github-actions, prs, pull-requests
- Language: TypeScript
- Homepage:
- Size: 80.1 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Lists
- awesome-workflows - Pull Request Stuck Notifier
- awesome-actions - Pull Request Stuck Notifier
- awesome-actions - Pull Request Stuck Notifier
- fucking-awesome-actions - Pull Request Stuck Notifier
- awesome-actions-fork - Pull Request Stuck Notifier
- awesome-actions - Pull Request Stuck Notifier
README
# Stuck Pull Request Notifier GitHub Action
Automatically label and mention/notify a user about stuck pull requests.
This is primarily useful if you use a dependency update bot such as
[Dependabot][dependabot], [Greenkeeper][greenkeeper], or [Renovate][renovate]
and have configured their pull requests to be merged automatically.This action will catch unmerged PRs that may be stuck because of a failing
GitHub status check, and will automatically remove the stuck label from
all closed or merged pull requests.Pairs very well with the [Auto Approve action by Harry Marr][auto-approve].
## Usage
### Pre-requisites
Create a label in your repo to assign to stuck pull requests.
The default label this action uses is `stuck`, but you can use any label.### Inputs
:heavy_exclamation_mark: = Required
#### `repo-token` ❗
Input for `${{ secrets.GITHUB_TOKEN }}`.
#### `cutoff`
- Default: `24h`The cutoff time period before a pull request is considered stuck. The value will be passed to the ms package.
#### `label`
- Default: `stuck`Name of the label to assign to stuck pull requests.
The supplied label must already exist. This action will _not_ create a new label.#### `message`❗
The comment message to post on the pull request to notify a user.#### `search-query`❗
Search query to pass to the pull request search.
The value provided will be appended to the base search query, which looks something like this:```
repo:${GITHUB_REPOSITORY} is:pr is:open created:<=${createdSinceCutOff} -label:${stuckLabel}
```### Example workflow
Find and update [Dependabot][dependabot] pull requests that have not been automatically merged in 24 hours (default cutoff).
```yaml
name: Stuck PRs
on:
schedule:
- cron: '0 * * * *' # Run once per hour
jobs:
stuck-prs:
runs-on: ubuntu-latest
steps:
- uses: jrylan/github-action-stuck-pr-notifier@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: 'Hey @yourUsername, this PR appears to be stuck.'
search-query: 'author:app/dependabot-preview author:app/dependabot'
```## Related
- [Auto Approve action by Harry Marr][auto-approve]
## License
[ISC](https://github.com/jrylan/github-action-stuck-pr-notifier/blob/main/LICENSE.md)
[auto-approve]: https://github.com/marketplace/actions/auto-approve
[dependabot]: https://dependabot.com/
[greenkeeper]: https://github.com/marketplace/greenkeeper
[renovate]: https://github.com/marketplace/renovate