-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into mini-css-plugin
- Loading branch information
Showing
336 changed files
with
16,261 additions
and
15,457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# format-stale-output | ||
|
||
Format the output of actions/stale into something you can pass to pullreminders/slack-action as blocks. | ||
|
||
## Inputs | ||
|
||
### `staled-issues-prs` | ||
|
||
Comes from [actions/stale](https://github.com/actions/stale). | ||
|
||
### `closed-issues-prs` | ||
|
||
Comes from [actions/stale](https://github.com/actions/stale). | ||
|
||
## Outputs | ||
|
||
### `blocks` | ||
|
||
Something you can directly pass to [pullreminders/slackaction](https://github.com/abinoda/slack-action) like: | ||
|
||
```yaml | ||
- name: Slack Report Closed Issues | ||
uses: pullreminders/slack-action@v1.0.7 | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
with: | ||
args: '{\"channel\": \"${{ secrets.SLACK_STALE_CHANNEL_ID }}\", \"text\": \"\", \"blocks\": ${{ steps.format-stale-output.outputs.blocks }} }' | ||
``` | ||
## Example Usage | ||
```yaml | ||
name: Stale Bot | ||
on: | ||
schedule: | ||
- cron: "0 */12 * * *" | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v4 | ||
name: stale | ||
id: stale | ||
with: | ||
days-before-stale: 20 | ||
days-before-close: 40 | ||
- name: Format Stale Output | ||
id: format-stale-output | ||
uses: ./.github/actions/format-stale-output | ||
with: | ||
staled-issues-prs: ${{ steps.stale.outputs.staled-issues-prs }} | ||
closed-issues-prs: ${{ steps.stale.outputs.closed-issues-prs }} | ||
- name: Slack Report Closed Issues | ||
uses: pullreminders/slack-action@v1.0.7 | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
with: | ||
args: '{\"channel\": \"${{ secrets.SLACK_STALE_CHANNEL_ID }}\", \"text\": \"\", \"blocks\": ${{ steps.format-stale-output.outputs.blocks }} }' | ||
``` | ||
## Building this Action | ||
Use [`@vercel/ncc`](https://github.com/vercel/ncc) to compile this action. You can run `npm run build` in this directory to run the command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Format Stale output | ||
description: Format the output of actions/stale into something you can pass to pullreminders/slack-action as blocks | ||
inputs: | ||
staled-issues-prs: | ||
description: List of all staled issues and pull requests. | ||
required: true | ||
closed-issues-prs: | ||
description: List of all closed issues and pull requests. | ||
required: true | ||
outputs: | ||
blocks: | ||
description: Contents you can pass into "blocks" of slack-action | ||
runs: | ||
using: "node12" | ||
main: "dist/index.js" |
Oops, something went wrong.