-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support discussion event #487
Conversation
Codecov Report
@@ Coverage Diff @@
## main #487 +/- ##
==========================================
+ Coverage 87.90% 94.73% +6.83%
==========================================
Files 6 5 -1
Lines 124 133 +9
Branches 22 27 +5
==========================================
+ Hits 109 126 +17
+ Misses 15 7 -8
Continue to review full report at Codecov.
|
2555b36
to
1ee60b6
Compare
The action seems to work fine, see Readme-Workflows/recent-activity#96 for the result and https://github.com/Readme-Workflows/recent-activity/actions/runs/1126154000 for the execution. On another note do I have two separate suggestions I want to propose, from which one is related to discussions. 1) Mark the bot's reply as answerIf possible should there be perhaps a setting to not only respond to a discussion, but to also mark this comment as the answer, if the category allows such a thing. 2) More generic placeholders for specific valuesRight now do I need to use This is somewhat annoying to have and I would like to propose some more generic/common placeholders to use, which would use different keys depending on the type.
|
Thank you for the feedback! About 1: It is difficult to figure it out which comment is the best answer. The latest comment is not always that. About 2: I have added this to #449. |
I mean more like:
I don't ask for a system that selects the best or most recent one (before the bot) but that the bot would select its own response as answer, if that is doable through the GitHub API. |
a432c66
to
17eb590
Compare
labels:
- name: proposal
labeled:
issue:
body: &proposal_body Thank you @{{ author }} for suggesting this.
discussion:
body: *proposal_body
- name: locked (spam)
labeled:
issue:
body: &locked_spam_body |
This {{ eventName }} \#{{ number }} has been **LOCKED** with the label {{ labelName }}!
Please do not spam messages on this project. You may get blocked from this repository for doing so.
action: close
locking: lock
lock_reason: spam
pr:
body: *locked_spam_body
action: close
locking: lock
lock_reason: spam
discussion:
body: *locked_spam_body
locking: lock
lock_reason: spam |
c6119d4
to
e5db5d8
Compare
|
|
5625ce4
to
f0e7985
Compare
f0e7985
to
b1e61f1
Compare
2636f7a
to
066e2df
Compare
bc1aa2b
to
bc18f88
Compare
This feature works without a personal access token now, but #485 still requires that. name: Label Commenter
on:
issues:
types: [labeled, unlabeled]
pull_request_target:
types: [labeled, unlabeled]
discussion:
types: [labeled, unlabeled]
permissions:
contents: read
issues: write
pull-requests: write
discussions: write
jobs:
comment:
runs-on: ubuntu-20.04
timeout-minutes: 1
steps:
- name: Label Commenter
uses: peaceiris/actions-label-commenter@c2d00660c86f2b9ed0fb35b372c451558eba85b3 |
Close #444
This feature needs a personal access token as well as #485.
References
Test this implementation
on.discussion
70a7e5a7341326e42a96580b0134a4054c47e2a8
Workflow
Config