Skip to content

Commit 740bcbb

Browse files
joshuaellisremidej
andauthored
chore: add issue workflows (#24)
* chore: add issue workflows * chore: pr amends Co-authored-by: Rémi de Juvigny <[email protected]> --------- Co-authored-by: Rémi de Juvigny <[email protected]>
1 parent 35d8332 commit 740bcbb

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

Diff for: .github/workflows/issues_dailyCron.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Daily Cron - 00:00'
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
permissions:
8+
issues: write
9+
statuses: read
10+
11+
jobs:
12+
cron-tasks:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: check for inactive issues that can't be reproduced
16+
uses: actions-cool/issues-helper@v3
17+
with:
18+
actions: 'close-issues'
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
labels: 'status: can not reproduce'
21+
inactive-day: 14
22+
close-reason: 'completed'
23+
body: |
24+
Hello!
25+
26+
As we have not received any new or updated information to reproduce this issue in the last 14 days we are marking this issue as closed. Should you have new information please feel free to respond and we will consider reopening it.
27+
28+
If anyone else have updated information for this issue, please open up a new bug report and simply reference this closed bug report so that we can get any new information you may have. If you have questions please refer to the [contributor's guide](https://github.com/strapi/strapi/blob/main/CONTRIBUTING.md#reporting-an-issue) on opening issues.
29+
30+
Thank you and have a great day!

Diff for: .github/workflows/issues_handleLabel.yml

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Issue Labeled
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
permissions:
8+
issues: write
9+
pull-requests: write
10+
actions: read
11+
checks: read
12+
contents: read
13+
repository-projects: read
14+
statuses: read
15+
16+
jobs:
17+
issue-labeled:
18+
runs-on: ubuntu-latest
19+
steps:
20+
# Unable to Reproduce Tasks
21+
- name: 'Comment: unable to reproduce'
22+
if: "${{ github.event.label.name == 'status: can not reproduce' }}"
23+
uses: actions-cool/issues-helper@v3
24+
with:
25+
actions: 'create-comment'
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
issue-number: ${{ github.event.issue.number }}
28+
body: |
29+
> This is a templated message
30+
31+
Hello @${{ github.event.issue.user.login }},
32+
33+
Thank you for reporting this bug, however we are unable to reproduce the issue you described given the information we have on hand. Can you please create a fresh project that you are able to reproduce the issue in, provide clear steps to reproduce this issue, and either upload this fresh project to a new GitHub repo or compress it into a `.zip` and upload it on this issue?
34+
35+
We would greatly appreciate your assistance with this, by working in a fresh project it will cut out any possible variables that might be unrelated.
36+
Please note that issues labeled with `status: can not reproduce` will be closed in 14 days if there is no activity.
37+
38+
Thank you!
39+
40+
# Invalid bug report template actions
41+
- name: 'Comment: invalid bug report template'
42+
if: "${{ github.event.label.name == 'flag: invalid template' }}"
43+
uses: actions-cool/issues-helper@v3
44+
with:
45+
actions: 'create-comment'
46+
token: ${{ secrets.GITHUB_TOKEN }}
47+
issue-number: ${{ github.event.issue.number }}
48+
body: |
49+
> This is a templated message
50+
51+
Hello @${{ github.event.issue.user.login }},
52+
53+
We ask that you please follow the [issue template](https://github.com/strapi/blocks-react-renderer/blob/main/.github/ISSUE_TEMPLATE/BUG_REPORT.yml).
54+
A proper issue submission lets us better understand the origin of your bug and therefore help you. We will reopen your issue when we receive the issue following the template guidelines and properly fill out the template. You can see the template guidelines for bug reports [here](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md#reporting-an-issue).
55+
56+
Please update the issue with the template and we can reopen this report.
57+
58+
Thank you.
59+
- name: 'Close: invalid bug report template'
60+
if: "${{ github.event.label.name == 'flag: invalid template' }}"
61+
uses: actions-cool/issues-helper@v3
62+
with:
63+
actions: 'close-issue'
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
issue-number: ${{ github.event.issue.number }}
66+
close-reason: 'not_planned'
67+
68+
# Redirect questions to community sources
69+
- name: 'Comment: redirect question to community'
70+
if: "${{ github.event.label.name == 'flag: question' }}"
71+
uses: actions-cool/issues-helper@v3
72+
with:
73+
actions: 'create-comment'
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
issue-number: ${{ github.event.issue.number }}
76+
body: |
77+
> This is a templated message
78+
79+
Hello @${{ github.event.issue.user.login }},
80+
81+
I see you are wanting to ask a question that is not really a bug report,
82+
83+
- questions should be directed to [our forum](https://forum.strapi.io) or our [Discord](https://discord.strapi.io)
84+
- feature requests should be directed to our [feedback and feature request database](https://feedback.strapi.io)
85+
86+
Please see the following contributing guidelines for asking a question [here](https://github.com/strapi/strapi/blob/master/CONTRIBUTING.md#reporting-an-issue).
87+
88+
Thank you.
89+
- name: 'Close: redirect question to community'
90+
if: "${{ github.event.label.name == 'flag: question' }}"
91+
uses: actions-cool/issues-helper@v3
92+
with:
93+
actions: 'close-issue'
94+
token: ${{ secrets.GITHUB_TOKEN }}
95+
issue-number: ${{ github.event.issue.number }}
96+
close-reason: 'complete'

0 commit comments

Comments
 (0)