-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comvent ⚡️ Playground 🏞 #24
Comments
/hello-world |
Command |
Command |
Found abusive comment! 😰 |
/random |
Thanks for checking out, and it does look like something is not functioning correctly when comment is edited, perhaps... 😥 For now, this is another test.
After edit:
/random |
Command |
Command |
Command |
Hi @lgmorand - I think your earlier attempt didn't match the comvent setup, because you were triggering the command for "specific" user setup, which is triggered only for whitelisted user list (in this case it only has myself @rytswd listed). If you instead trigger with comment such as |
maybe TLDR; :D I just copy-pasted your precedent comment |
/hello-world |
Command |
Thanks! It's a good point, I added a TL;DR section 😆 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/echo this is a test message |
Command |
/echo this is test, it may fail due to the job condition. |
/echo this is another test. There was an error with the job condition. |
Command |
/echo this is another test, this time the response will look up the string correctly. |
Command |
/random |
/echo test |
Command |
/hello-world |
Command |
Found abusive comment! 😰 |
Ok, thanks |
Please forgive me for not knowing, but does anyone know how to install this? |
@iam-py-test The installation should be straightforward GitHub Action usage, something like: jobs:
chatbot:
name: ChatBot
runs-on: ubuntu-latest
steps:
- name: Handle with Comvent
uses: rytswd/[email protected] # Latest available as of now
id: comvent
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/comvent-chatbot.yaml # Assumes this file exists If you could provide a bit more detail, I should be able to assist you further 👍 |
Ok! @rytswd Thanks! I think I just misunderstood something! |
@rytswd When I tried it, I got this error: |
/weather |
Command |
test |
|
If you are referring to getting an error with https://github.com/iam-py-test/my_filters_001/blob/main/.github/workflows/comment.yml, it doesn't look to conform to GitHub Actions requirements (i.e. missing If you want to simply get the same result as this repo's example, I suggest you check out the setup here |
Ok! Will do. |
Apologies, I should have been clearer - you cannot copy directly from the aforementioned file, as this repo does not pull in the GitHub Action spec but builds itself in the action setup. You need to combine the file content with the setup mentioned here: You can see a complete example here https://github.com/rytswd/comvent#chatbot-setup, by clicking on name: ChatBot
on:
issue_comment:
# This shouldn't be called for comment deletion
types:
- created
- edited
jobs:
chatbot:
name: With latest code base
runs-on: ubuntu-latest
steps:
- name: Handle with Comvent
uses: rytswd/[email protected]
id: comvent
with:
token: ${{ secrets.GITHUB_TOKEN }}
config-path: .github/comvent-chatbot.yaml
# The below only runs when Comvent finds matching comment.
# This assumes that Comvent config holding 'command-random' as a keyword.
- if: steps.comvent.outputs.command-random != ''
name: Handle random event
uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# An example of responding to a comment.
script: |
const comment = `Command \`/random\` was triggered by the comment`;
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
})
#
# You can repeat similar handling based on the Comvent config.
#
|
@rytswd Thank you! |
I tried it & it worked! Thanks @rytswd |
/echo run this test |
Command |
/hello-world |
Command |
/echo bold test |
Command |
|
/echo it works? |
Command |
/help |
Found abusive comment! 😰 |
rip |
Command |
😎 TL; DR
Comment to this issue with the following one line (no need to wrap in backticks):
/hello-world
You will see an automated comment response in 1 min or so!
🔎 About
This is only a playground 🏞
You can comment on this to see Comvent in action, which uses https://github.com/actions/github-script.
Multiple commands can be issued at once in a single comment, as long as they are provided in separate lines.
📝 Note
Because GitHub Action takes several seconds to initiate the action, you may see up to 1 min delay.
💻 Available Commands
For all users
/weather
: automation responds with a comment/hello-world
: automation responds with a comment/echo (.+)$
: automation responds with your comment in(.+)
portion of regexpRef: https://github.com/rytswd/comvent/blob/main/.github/workflows/issue-comment-blacklist-demo.yaml
For specific users (currently set for only @rytswd)
/random
: automation responds with a comment/today
: automation responds with a comment/httpbin
: automation responds with a commentRef: https://github.com/rytswd/comvent/blob/main/.github/workflows/issue-comment-whitelist-demo.yaml
Abuse Monitor
some abusive content
: If you write a comment including this exact phrase in a single line, you will see the comment being removed via the automation. You will also see a comment about the comment deletion.Ref: https://github.com/rytswd/comvent/blob/main/.github/workflows/abusive-comment-demo.yaml
The text was updated successfully, but these errors were encountered: