Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/harsh-2711/ghost-issues-notifier-actions

Automatically adds the stuck label and notifies users about ghost issues
https://github.com/harsh-2711/ghost-issues-notifier-actions

Last synced: 24 days ago
JSON representation

Automatically adds the stuck label and notifies users about ghost issues

Awesome Lists containing this project

README

        

# Ghost Issues Notifier

Automatically adds the stuck label and notifies a user about ghost issues.

This is primarily useful if you use a dependency update bot such as [Dependabot](https://dependabot.com), [Greenkeeper](https://greenkeeper.io), or [Renovate](https://github.com/marketplace/renovate)

This action will catch unsolved issues that may be stuck because of stack of other random and duplicate issues, and will automatically remove the stuck label from all closed or referenced(PR in progress) issues.

Pairs very well with the [Stuck Pull Request Notifier action by Jeremy Rylan](https://github.com/marketplace/actions/stuck-pull-request-notifier) and [Auto Approve action by Harry Marr](https://github.com/marketplace/actions/auto-approve).

## Usage

### Pre-requisites

Create a label in your repo to assign to ghost(pushed back in stack because of unnecessary duplication of issues) issues.

The default label this action uses is **stuck**, but you can use any label.

**NOTE: The label must be setup before using this action**

### Inputs

✳️ = Required



 
Input
Default
Description




✳️
repo-token
 
Input for `secrets.GITHUB_TOKEN`.


 
cutoff
24h
The cutoff time period before a pull request is considered stuck. The value will be passed to the ms package.


 
label
stuck

Name of the label to assign to ghost issues.


The supplied label must already exist. This action will not create a new label.



✳️
message
 
The comment message to post on the issues to notify a user.


✳️
search-query
 

Search query to pass to the issue search.


The value provided will be appended to the base search query, which looks something like this:


repo:${GITHUB_REPOSITORY} is:issue is:open created:<=${createdSinceCutOff} -label:${stuckLabel}



### Example workflow

```yaml
name: Ghost Issues
on:
schedule:
- cron: '0 * * * *' # Run once per hour
jobs:
stuck-prs:
runs-on: ubuntu-latest
steps:
- uses: harsh-2711/ghost-issues-notifier-actions@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: 'Hey @yourUsername, this issue appears to be stuck.'
search-query: 'author:app/dependabot-preview author:app/dependabot'
```

### References
1. [GitHub Gist](https://gist.github.com/nzakas/bb025e31583076241d9bac8caee4ba82) by [Nicholas Zakas](https://gist.github.com/nzakas)
2. [Stuck Pull Request Notifier action](https://github.com/marketplace/actions/stuck-pull-request-notifier) by [Jeremy Rylan](https://github.com/jrylan)