Skip to content

Commit f389a9d

Browse files
authored
Feat(Repo): add issue / PR template and label-commenter and close/stale issue config (#160)
* Feat(Repo): add issue / PR template and label-commenter and close/stale issue config * remove old close issue config * add missing workflow for label
1 parent 040f9f6 commit f389a9d

File tree

6 files changed

+199
-34
lines changed

6 files changed

+199
-34
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Bug Report
2+
description: Create a report to help us improve news
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
8+
Dear GLPI plugin user.
9+
10+
**⚠️ Please never use standard issues to report security problems. See [security policy](https://github.com/pluginsGLPI/news/security/policy) for more details. ⚠️**
11+
12+
BEFORE SUBMITTING YOUR ISSUE, please make sure to read and follow these steps:
13+
14+
* We do not track feature requests nor enhancements here. Propose them on the [suggest dedicated site](https://suggest.glpi-project.org).
15+
* Keep this tracker in ENGLISH. If you want support in your language, the [community forum](https://forum.glpi-project.org) is the best place.
16+
* Always try to reproduce your issue at least on latest stable release.
17+
18+
The GLPI team.
19+
- type: markdown
20+
attributes:
21+
value: |
22+
## Professional Support
23+
24+
We do not guarantee any processing / resolution time for community issues.
25+
26+
If you need a quick fix or any guarantee, you should consider to buy a GLPI Network Subscription.
27+
28+
More information here: https://glpi-project.org/subscriptions/
29+
- type: checkboxes
30+
id: terms
31+
attributes:
32+
label: Code of Conduct
33+
description: By submitting this issue, you agree to follow hereinabove rules and [Contribution guide](https://github.com/glpi-project/glpi/blob/main/CONTRIBUTING.md)
34+
options:
35+
- label: I agree to follow this project's Code of Conduct
36+
validations:
37+
required: true
38+
- type: checkboxes
39+
attributes:
40+
label: Is there an existing issue for this?
41+
description: Please search to see if an issue already exists for the bug you encountered.
42+
options:
43+
- label: I have searched the existing issues
44+
validations:
45+
required: true
46+
- type: input
47+
id: glpi-version
48+
attributes:
49+
label: GLPI Version
50+
description: What version of our GLPI are you running?
51+
validations:
52+
required: true
53+
- type: input
54+
id: plugin-version
55+
attributes:
56+
label: Plugin version
57+
description: What version of `news` are you running?
58+
validations:
59+
required: true
60+
- type: textarea
61+
attributes:
62+
label: Bug description
63+
description: A concise description of the problem you are experiencing and what you expected to happen.
64+
validations:
65+
required: false
66+
- type: textarea
67+
id: logs
68+
attributes:
69+
label: Relevant log output
70+
description: |
71+
Please copy and paste any relevant log output. Find them in `*-error.log` files under `glpi/files/_log/`.
72+
73+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
74+
render: shell
75+
- type: input
76+
id: url
77+
attributes:
78+
label: Page URL
79+
description: If applicable, page URL where the bug happens.
80+
validations:
81+
required: false
82+
- type: textarea
83+
attributes:
84+
label: Steps To reproduce
85+
description: Steps to reproduce the behavior.
86+
placeholder: |
87+
1. With this config...
88+
2. Go to...
89+
3. Scroll down to...
90+
4. See error...
91+
validations:
92+
required: false
93+
- type: textarea
94+
attributes:
95+
label: Your GLPI setup information
96+
description: Please copy and paste information you will find in GLPI in `Setup > General` menu, `System` tab.
97+
validations:
98+
required: false
99+
- type: textarea
100+
attributes:
101+
label: Anything else?
102+
description: Add any other context about the problem here.
103+
validations:
104+
required: false

.github/label-commenter-config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
labels:
2+
- name: "invalid"
3+
labeled:
4+
issue:
5+
body: |
6+
This issue has been closed because you did not provide the requested information.
7+
action: "close"
8+
- name: "support"
9+
labeled:
10+
issue:
11+
body: |
12+
This issue has been closed as we only track bugs here.
13+
14+
You can get community support on [forums](https://forum.glpi-project.org/) or you can consider [taking a subscription](https://glpi-project.org/subscriptions/) to get professional support.
15+
You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly.
16+
action: close
17+
- name: "feature suggestion"
18+
labeled:
19+
issue:
20+
body: |
21+
This issue has been closed as we only track bugs here.
22+
23+
You can open a topic to discuss with community about this enhancement on [suggestion website](https://glpi.userecho.com/).
24+
You can also [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly if you are willing to sponsor this feature.
25+
action: close

.github/pull_request_template.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Checklist before requesting a review
2+
3+
*Please delete options that are not relevant.*
4+
5+
- [ ] I have performed a self-review of my code.
6+
- [ ] I have added tests (when available) that prove my fix is effective or that my feature works.
7+
- [ ] This change requires a documentation update.
8+
9+
## Description
10+
11+
- It fixes # (issue number, if applicable)
12+
- Here is a brief description of what this PR does
13+
14+
## Screenshots (if appropriate):
15+

.github/workflows/autoclose-issues.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: 'Close stale issues'
2+
on:
3+
schedule:
4+
- cron: '0 8 * * *'
5+
6+
jobs:
7+
stale:
8+
if: github.repository == 'glpi-plugin/news'
9+
permissions:
10+
issues: write # for actions/stale to close stale issues
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/stale@v9
14+
with:
15+
stale-issue-message: >-
16+
There has been no activity on this issue for some time and therefore it is considered stale
17+
and will be closed automatically in 10 days.
18+
19+
20+
If this issue is related to a bug, please try to reproduce on latest release. If the problem persist,
21+
feel free to add a comment to revive this issue.
22+
23+
If it is related to a new feature, please open a topic to discuss with community about this enhancement
24+
on [suggestion website](https://glpi.userecho.com/).
25+
26+
27+
You may also consider taking a [subscription](https://glpi-project.org/subscriptions/) to get professionnal
28+
support or [contact GLPI editor team](https://portal.glpi-network.com/contact-us) directly.
29+
days-before-issue-stale: 15
30+
days-before-pr-stale: -1 # PR will be marked as stale manually.
31+
days-before-close: 5
32+
exempt-issue-labels: "bug,enhancement,question,security" # Issues with "bug", "enhancement", "question" or "security" labels will not be marked as stale
33+
exempt-all-milestones: true # Do not check issues/PR with defined milestone.
34+
ascending: true # First check older issues/PR.
35+
operations-per-run: 750 # Max API calls per run.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Label commenter"
2+
3+
on:
4+
issues:
5+
types:
6+
- "labeled"
7+
- "unlabeled"
8+
9+
jobs:
10+
comment:
11+
permissions:
12+
contents: "read"
13+
issues: "write"
14+
runs-on: "ubuntu-latest"
15+
steps:
16+
- name: "Checkout"
17+
uses: "actions/checkout@v4"
18+
19+
- name: "Label commenter"
20+
uses: "peaceiris/actions-label-commenter@v1"

0 commit comments

Comments
 (0)