Skip to content

Commit 8f830bf

Browse files
authored
workflow: add issues helper action (#1922)
1 parent 0048bd1 commit 8f830bf

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Issue Close Require
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
close-issues:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: need reproduction
12+
uses: actions-cool/[email protected]
13+
with:
14+
actions: 'close-issues'
15+
token: ${{ secrets.GITHUB_TOKEN }}
16+
labels: 'need reproduction'
17+
inactive-day: 3

.github/workflows/issue-labeled.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Issue Labeled
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
jobs:
8+
reply-labeled:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: contribution welcome
12+
if: github.event.label.name == 'contribution welcome' || github.event.label.name == 'help wanted'
13+
uses: actions-cool/[email protected]
14+
with:
15+
actions: 'create-comment, remove-labels'
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
issue-number: ${{ github.event.issue.number }}
18+
body: |
19+
Hello @${{ github.event.issue.user.login }}. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution!
20+
labels: 'bug: pending triage, need reproduction'
21+
22+
- name: remove pending
23+
if: github.event.label.name == 'enhancement' || github.event.label.name == 'bug' || (contains(github.event.label.name, 'pending triage') == false && startsWith(github.event.label.name, 'bug:') == true)
24+
with:
25+
actions: 'remove-labels'
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
issue-number: ${{ github.event.issue.number }}
28+
labels: 'bug: pending triage'
29+
30+
- name: need reproduction
31+
if: github.event.label.name == 'need reproduction'
32+
uses: actions-cool/[email protected]
33+
with:
34+
actions: 'create-comment, remove-labels'
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
issue-number: ${{ github.event.issue.number }}
37+
body: |
38+
Hello @${{ github.event.issue.user.login }}. Please provide a online reproduction by [codesandbox](https://codesandbox.io/) or a minimal GitHub repository. Issues labeled by `need reproduction` will be closed if no activities in 3 days.
39+
labels: 'bug: pending triage'

0 commit comments

Comments
 (0)