Skip to content

Commit

Permalink
Add high-priority-prs action (gatsbyjs#13848)
Browse files Browse the repository at this point in the history
* Add high-priority-prs action

* Remove unused dep
  • Loading branch information
m-allanson authored and KyleAMathews committed May 4, 2019
1 parent 5f2dff7 commit 2971702
Show file tree
Hide file tree
Showing 8 changed files with 4,872 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/actions/high-priority-prs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:10-slim

# Labels for GitHub to read your action
LABEL "com.github.actions.name"="high-priority-prs"
LABEL "com.github.actions.description"="Pings slack to say \"HANDLE THESE PRS!\" :-D"
# Here are all of the available icons: https://feathericons.com/
LABEL "com.github.actions.icon"="activity"
# And all of the available colors: https://developer.github.com/actions/creating-github-actions/creating-a-docker-container/#label
LABEL "com.github.actions.color"="white"

# Copy the rest of your action's code
COPY . .

# Install dependencies
RUN yarn

# Run `node /index.js`
ENTRYPOINT ["node", "/index.js"]
26 changes: 26 additions & 0 deletions .github/actions/high-priority-prs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# high-priority-prs action

Ported from @KyleAMathews [gatsby-pr-bot](https://github.com/KyleAMathews/gatsby-pr-bot/). [Read more about it on Kyle's blog](https://www.bricolage.io/bulding-a-slack-bot-to-help-handle-large-numbers-of-prs/)

Run locally [using act](https://github.com/nektos/act): `act -a "high-priority-prs"`

See below for the original README.

---

Sends Slack message every so often with important PRs to respond to.

This is an experimental effort to help with identifying the PRs that most need responses — initially breaking them up into two queues — one for those that have never seen a response from core maintainers and those that have had commits since the last comment so need a new review.

The goal is make sure every contributor has a great experience and to prevent valuable PRs from not getting in.

## Setup

`yarn install`

Change the slack channel ID to point to your own personal channel while experimenting (find that by [opening up slack in the web](https://gatsbyjs.slack.com) and copying the ID looking thing.

If testing changes, you can also write out the GitHub API response to a file called data.json and then change code in `process.js` to load
that file instead of waiting for API response from `index.js`. This speeds up iteration on design.

You can test the output by copy/pasting the CLI output to https://api.slack.com/tools/block-kit-builder
Loading

0 comments on commit 2971702

Please sign in to comment.