Skip to content

Commit b81a9ed

Browse files
authored
Merge pull request #48 from KelvinTegelaar/main
[pull] main from KelvinTegelaar:main
2 parents 487e02d + bfedc41 commit b81a9ed

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

.github/workflows/auto_comments.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "Handle Comment Commands"
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
8+
jobs:
9+
handle_comment:
10+
runs-on: ubuntu-latest
11+
# We need permissions to modify issue comments.
12+
# 'issues: write' is required for deleting comments.
13+
permissions:
14+
issues: write
15+
16+
steps:
17+
# 1) If the comment includes '!notasponsor', delete it using GitHub Script
18+
- name: Delete !notasponsor comment
19+
if: contains(github.event.comment.body, '!notasponsor')
20+
uses: actions/github-script@v6
21+
with:
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
script: |
24+
await github.rest.issues.deleteComment({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
comment_id: context.payload.comment.id
28+
});
29+
30+
# 2) Post a sponsor-specific reply
31+
- name: Reply to !notasponsor
32+
if: contains(github.event.comment.body, '!notasponsor')
33+
uses: peter-evans/create-or-update-comment@v3
34+
with:
35+
issue-number: ${{ github.event.issue.number }}
36+
body: |
37+
Hello,
38+
39+
Thank you for your interest in improving CIPP!
40+
To keep our development process focused and manageable, **feature requests are limited to paying users**. This policy helps us prioritize improvements that directly benefit those actively supporting CIPP and ensures we can sustain our development and support.
41+
42+
When a sponsor makes a feature request, their support covers training, development, documentation, and security checks. Allowing non-sponsor requests could lead to a backlog that slows down updates and stretches resources thin, ultimately affecting the quality and sustainability of CIPP.
43+
44+
While we’ve closed this request, we appreciate your input. You’re always welcome to participate in ongoing discussions or contribute to open issues. If you are a developer, feel free to open a PR that includes your feature request or comment "**I’d like to work on this!**" to assign the issue to yourself.
45+
46+
**Did you get this notification in error?** Reply with a screenshot of your sponsorship payment and we’ll reopen the issue.
47+
48+
_Thank you for understanding,_
49+
**The CIPP Team**
50+
51+
# 3) If the comment includes '!support', classify as a support request
52+
- name: Reply to !support
53+
if: contains(github.event.comment.body, '!support')
54+
uses: peter-evans/create-or-update-comment@v3
55+
with:
56+
issue-number: ${{ github.event.issue.number }}
57+
body: |
58+
Hello,
59+
60+
Thank you for reaching out! This report has been classified as a **support request** rather than a bug or feature request. To keep our development process focused, support requests are limited to paying users. This policy allows us to prioritize resources for those actively supporting CIPP, helping us maintain high-quality development and support.
61+
62+
Sponsors can contact our helpdesk directly via email for assistance with any issues or questions. For non-sponsor support, please refer to our documentation and community discussions—many questions have been answered there.
63+
64+
**Did you get this notification in error?** Reply with a screenshot of your sponsorship payment, and we’ll gladly reopen the request.
65+
66+
_Thank you for your understanding,_
67+
**The CIPP Team**
68+
69+
# 4) If the comment includes '!incomplete', note the bug or feature request is incomplete
70+
- name: Reply to !incomplete
71+
if: contains(github.event.comment.body, '!incomplete')
72+
uses: peter-evans/create-or-update-comment@v3
73+
with:
74+
issue-number: ${{ github.event.issue.number }}
75+
body: |
76+
Hello,
77+
78+
Thank you for your submission! It appears this **bug report or feature request is incomplete**. We need a clear description, steps to reproduce (for bugs), or a comprehensive overview of the requested feature.
79+
80+
Please submit a new request with all the necessary details. Without sufficient information, it’s difficult for contributors to triage or implement solutions.
81+
82+
_Thank you!_
83+
**The CIPP Team**

0 commit comments

Comments
 (0)