Skip to content
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

Merged
merged 33 commits into from
Aug 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
44117a2
test: Toggle draft status
peaceiris Aug 11, 2021
056e820
Add types
peaceiris Aug 12, 2021
1d35763
Add LabelEvent type
peaceiris Aug 12, 2021
e89a99e
Support discussion
peaceiris Aug 13, 2021
3a5426d
chore(release): Add build assets
peaceiris Aug 13, 2021
e230060
chore(release): Remove build assets [skip ci]
peaceiris Aug 13, 2021
1731c87
Add placeholders, show created comment url
peaceiris Aug 13, 2021
421b803
chore(release): Add build assets
peaceiris Aug 13, 2021
997a278
chore(release): Remove build assets [skip ci]
peaceiris Aug 13, 2021
6e398c0
test: Add codecov.yml
peaceiris Aug 13, 2021
6c51b14
feat: Add discussion.answer field
peaceiris Aug 13, 2021
acfcd71
chore(release): Add build assets
peaceiris Aug 13, 2021
341790c
chore(release): Remove build assets [skip ci]
peaceiris Aug 13, 2021
8450886
fix indent
peaceiris Aug 14, 2021
cd8638f
test: discussion
peaceiris Aug 14, 2021
e03b87d
Fix eventName
peaceiris Aug 14, 2021
6900f23
chore(release): Add build assets
peaceiris Aug 14, 2021
c891bf5
chore(release): Remove build assets [skip ci]
peaceiris Aug 14, 2021
b5d0077
test: Refactor
peaceiris Aug 14, 2021
b1e61f1
test: placeholders
peaceiris Aug 14, 2021
89d18af
deps: update devDependencies
peaceiris Aug 14, 2021
658c4e0
npm audit fix
peaceiris Aug 14, 2021
066e2df
fix: initialization order
peaceiris Aug 14, 2021
955d815
chore(release): Add build assets
peaceiris Aug 14, 2021
315321d
chore(release): Remove build assets [skip ci]
peaceiris Aug 14, 2021
9cd7625
Improve log
peaceiris Aug 14, 2021
c21af74
refactor: Trim rawBody
peaceiris Aug 15, 2021
bc18f88
refactor: Integrate RunContext into IContext
peaceiris Aug 15, 2021
d3b5e76
test: eventName
peaceiris Aug 15, 2021
875c571
update
peaceiris Aug 15, 2021
70a7e5a
chore(release): Add build assets
peaceiris Aug 15, 2021
63f2d01
chore(release): Remove build assets [skip ci]
peaceiris Aug 15, 2021
315e68d
update hash
peaceiris Aug 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 38 additions & 59 deletions .github/label-commenter-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ labels:
- name: invalid
labeled:
issue:
body: Please follow the issue templates.
body: &invalid_labeled_body Please follow the {{ eventName }} templates.
action: close
pr:
body: Thank you @{{ pull_request.user.login }} for suggesting this. Please follow the pull request templates.
body: *invalid_labeled_body
action: close
draft: true
unlabeled:
issue:
body: Thank you for following the template. The repository owner will reply.
issue: &invalid_unlabeled_issue
body: &invalid_unlabeled_body |
Thank you for following the {{ eventName }} template. The repository owner will reply.
action: open
pr:
body: Thank you for following the template. The repository owner will review this.
action: close
pr: *invalid_unlabeled_issue
- name: forum
labeled:
issue:
Expand All @@ -33,73 +32,64 @@ labels:
- name: wontfix
labeled:
issue:
body: This will not be worked on but we appreciate your contribution.
body: This {{ eventName }} will not be worked on but we appreciate your contribution.
action: close
unlabeled:
issue:
body: This has become active again.
body: This {{ eventName }} has become active again.
action: open
- name: duplicate
labeled:
issue:
body: This issue already exists.
body: This {{ eventName }} already exists.
action: close
- name: good first issue
labeled:
issue:
body: This issue is easy for contributing. Everyone can work on this.
body: This {{ eventName }} is easy for contributing. Everyone can work on this.
- name: proposal
labeled:
issue:
body: Thank you @{{ issue.user.login }} for suggesting this.
body: Thank you @{{ author }} for suggesting this.
- name: locked (spam)
labeled:
issue:
body: |
This issue has been **LOCKED** because of spam!
issue: &locked_spam_labeled_issue
body: &locked_spam_body |
This {{ eventName }} \#{{ number }} has been **LOCKED** with the label {{ labelName }}!

Please do not spam messages and/or issues on the issue tracker. You may get blocked from this repository for doing so.
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: |
This pull-request has been **LOCKED** because of spam!

Please do not spam messages and/or pull-requests on this project. You may get blocked from this repository for doing so.
action: close
pr: *locked_spam_labeled_issue
discussion:
body: *locked_spam_body
locking: lock
lock_reason: spam
answer: true
- name: locked (heated)
labeled:
issue:
issue: &locked_heated_labeled
body: |
This issue has been **LOCKED** because of heated conversation!

We appreciate exciting conversations, as long as they won't become too aggressive and/or emotional.
locking: lock
lock_reason: too heated
pr:
body: |
This pull-request has been **LOCKED** because of heated conversation!
This {{ eventName }} has been **LOCKED** because of heated conversation!

We appreciate exciting conversations, as long as they won't become too aggressive and/or emotional.
locking: lock
lock_reason: too heated
pr: *locked_heated_labeled
discussion: *locked_heated_labeled
unlabeled:
issue:
issue: &locked_heated_unlabeled
body: |
This issue has been unlocked now.
locking: unlock
pr:
body: |
This pull-request has been unlocked now.
This {{ eventName }} has been unlocked now.
locking: unlock
pr: *locked_heated_unlabeled
discussion: *locked_heated_unlabeled
- name: locked (off-topic)
labeled:
issue:
body: |
This issue has been **LOCKED** because of off-topic conversations!
This {{ eventName }} has been **LOCKED** because of off-topic conversations!

Please use our other means of communication for casual chats.
action: close
Expand All @@ -108,37 +98,26 @@ labels:
- name: locked (resolved)
labeled:
issue:
body: |
This issue has been **LOCKED** because of it being resolved!
body: &locked_resolved_labeled_body |
This {{ eventName }} has been **LOCKED** because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.
If you still encounter this or it has changed, open a new {{ eventName }} instead of responding to solved ones.
action: close
locking: lock
lock_reason: resolved
discussion:
body: |
This discussion has been **LOCKED** because of it being resolved!
Thank you @{{ discussion.user.login }}!
body: *locked_resolved_labeled_body
locking: lock
lock_reason: resolved
unlabeled:
discussion:
body: |
This discussion has been unlocked now.
locking: unlock
- name: documentation
labeled:
issue:
body: |
Thank you for suggesting documentation improvement.
pr:
body: "\
[The documentation label] was added.\n
Thank you for suggesting documentation improvement. \
When you add a new section, do not forget to update the Table of Contents.\n
```sh\n
npx doctoc --github README.md\n
```\n\n
[The documentation label] was added. \
Thank you for suggesting documentation improvement.\n\
When you add a new section, do not forget to update the Table of Contents.\n\n\
```sh\n\
npx doctoc --github README.md\n\
```\n\n\
[The documentation label]: https://github.com/peaceiris/actions-label-commenter/issues?q=label%3Adocumentation\n
"
6 changes: 3 additions & 3 deletions .github/workflows/label-commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:
ref: main

- name: Label Commenter
uses: peaceiris/actions-label-commenter@b9f3f5d91e1f6ea0fd28c45cee43e0b0a687a272
uses: peaceiris/actions-label-commenter@70a7e5a7341326e42a96580b0134a4054c47e2a8
env:
RUNNER_DEBUG: 1
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
with:
github_token: ${{ secrets.GH_PAT }}
# config_file: .github/label-commenter-config.yml
Loading