Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Bryce Boe
@bboe
Thoughts?
Bryce Boe
@bboe
Well here's my attempt: errbotio/errbot#1523
It seems to allow me to test a repos updates by changing its branch.
asjrosabal
@asjrosabal

@nzlosh thanks. Here is my flow and plugin code. When I execute any command, for example: !a or !b, the bot respond, but not in the channel, responde like a app. It say me: You can continue using this command( the next command in flow). But I would like use the flow, like if the bot send an email.

User: !send_email
Bot: Ok, Give me an email?
User: example@example.com
Bot: Please, give me a subject?
User: This is an example
Bot: Ok. Enter a body text of the e-mail.
User: bla bla bla bla.
Bot: Do you want send it now?
User: Yes
Bot: The email has been send

Flow Code

`from errbot import botflow, FlowRoot, BotFlow, FLOW_END

class RepositorioFlows(BotFlow):
""" Conversation flows for Errbot"""

@botflow
def w1(self, flow: FlowRoot):
    "documentation of W1"
    a_node = flow.connect("a")  # no autotrigger
    b_node = a_node.connect("b")
    c_node = a_node.connect("c")  # crosses the autotrigger of w2
    d_node = c_node.connect("d")

@botflow
def w2(self, flow: FlowRoot):
    """documentation of W2"""
    c_node = flow.connect("c", auto_trigger=True)
    b_node = c_node.connect("b", auto_trigger=True)
    e_node = flow.connect(
        "e", auto_trigger=True
    )  # 2 autotriggers for the same workflow
    d_node = e_node.connect("d")`

Plugin Code

` from errbot import BotPlugin, botcmd, botmatch
import time

class Bitbucket(BotPlugin):
'''
Example
'''

@botcmd
def a(self, msg, args):
    return "a"

@botcmd
def b(self, msg, args):
    return "b"

@botcmd
def c(self, msg, args):
    return "c"

@botcmd(flow_only=True)
def d(self, msg, args):
    return "d"

`

Carlos
@nzlosh
@asjrosabal OK, I understand now. I've used flows in the way you describe where the bot states which command to execute next. I don't think it's possible to use flows to "have a natural conversation" to collect arguments to a single command. Flows are really directed graphs of a set of commands, which is why the bot hints at what command must be executed next to complete the flow.
asjrosabal
@asjrosabal
@nzlosh thanks a lot
Carlos
@nzlosh
Sorry, I know that wasn't the answer you were looking for.
There may be other people who have more experience with flows that know better than I do.
asjrosabal
@asjrosabal
@nzlosh Right, it wasn't the answer I was expecting, but it gave me an idea about it. I really appreciate your comment, thank you for your time and feedback.
Ofek Katriel
@ofekatriel_gitlab

Hello all,
when i use the !plugin blacklist Version Checker,
to stop the bot from sending me messages about version updates, it keeps poking me everyday with this message:
"Notice: VersionChecker is blacklisted, use "!plugin unblacklist VersionChecker" to unblacklist it."

how can i make the bot not sending me this one?

Mark Sullivan
@marksull
Yeah I noticed this too with one of the more recent updates that the blacklist isn't working anymore. I don't know the solution though and I haven't dug deeper yet...hopefully someone else has
Carlos
@nzlosh
Looking at the code, there's no option to disable this notification, would you mind opening an issue to have a configuration option added to enable/disable this notification?
jv-kalyanchakravarthy
@jv-kalyanchakravarthy
Hello All, We are about to deploy our errbot into live; but at last minute we reliazed audit log is also one of the mandatory requirement which we are supposed to close in this week. Thought of checking whether any audit log feature is available in errbot apart from the application log. Audit log like what user entered as command and what response we have sent main operations etc... Suggestions please as a quick thing to get into live ?
Sijis Aviles
@sijis
that data is part of the log. You should set BOT_LOG_LEVEL = logging.INFO. that should be enough.
4 replies
for example, i see 2021-07-13 22:11:50,170 INFO errbot.core Processing command "status" with parameters "" from @sijis
@jv-kalyanchakravarthy ^^
Sijis Aviles
@sijis
@ofekatriel_gitlab not a fix but as a workaround you could try setting up BOT_ADMINS_NOTIFICATIONS = []. So no one gets a message
Mark Sullivan
@marksull
image.png

Looking at the code, there's no option to disable this notification, would you mind opening an issue to have a configuration option added to enable/disable this notification?

What do you mean @nzlosh. This feature has been present for as long as I have been using Errbot (years....) It is only in the last couple of releases that i noticed that the Blacklist is not being honored

Carlos
@nzlosh
@marksull My comment was meant for Ofek about the blacklist notifications, sorry for the confusion. If the blacklist isn't being honoured, that sounds like a bug that should be fixed.
jv-kalyanchakravarthy
@jv-kalyanchakravarthy
I would like to know how to write integration test cases we are using errbot and we are planning to deploy it as CI/CD i.e., once it is deployed we need to execute verification test which is nothing but integration test cases.
I have written unit test cases using TestBot that covers unit test cases, is there any approach or any reference for writing integration test cases please ..
jv-kalyanchakravarthy
@jv-kalyanchakravarthy

once the jenkins build is done we need to have test suite where it will trigger few commands and validate the e2e results.

Please note I'm using legacy bot which uses RTM communication. We have a future plan to uplift the webhooks/event based communication.

Bryce Boe
@bboe
Does anyone have an example of testing a plugin where a message comes from a Room?
Sijis Aviles
@sijis
@bboe I think you may be able to use makemessage() https://github.com/errbotio/errbot/blob/master/tests/base_backend_test.py#L431. You could probably also try something liek testbot.push_message("random text") https://github.com/errbotio/errbot/blob/master/tests/commands_test.py#L65
6 replies
@jv-kalyanchakravarthy The only thing that comes to mind is exposing a botcmd as a webhook. So jenkins runs, starts errbot and then sends a webhook to it. The webhook does "the test" and reports back to your e2e system.
also feel free to checkout the new slack backend https://github.com/errbotio/err-backend-slackv3
jv-kalyanchakravarthy
@jv-kalyanchakravarthy
Thank you. Will try it out.
jv-kalyanchakravarthy
@jv-kalyanchakravarthy
we are using new_classic_app what is the ideal one which we need to start for creating the app and the actual URL which we should be using. I can see in some posts if new app don't use new-classic-app. Could you please advise how to uplift or which one to use if we developing new one.
Sijis Aviles
@sijis
I'd appreciate feedback on errbotio/errbot#1525. Basically, I don't believe its being used as hipchat has been shutdown. Also the hypchat library hasn't been touched in 5 yrs.
Sijis Aviles
@sijis
@nzlosh What are your thoughts on this? errbotio/errbot#1526
Carlos
@nzlosh
Good idea to give people heads up. There's been some feedback on the slackv3 backend but it's still less battle tested than the original slack backend.
Carlos
@nzlosh
I'll look into adding some official documentation around slackv3 as well
Sijis Aviles
@sijis
Ya, only way to do it is to get more folks to use it unfortunately
so starting the warning now to try and get folks migrated
I also just created errbotio/err-backend-slackv3#34 to help a little with the documentation.
honeslty, i have yet to fully try it myself. but i intend to in the next weekish or so
Carlos
@nzlosh
I've been running one of my instances with SlackV3 using socket mode. It's working well for my uses but I'm sure there's plenty of improvment to be made.
Sijis Aviles
@sijis
its possible. could you post a sanitized version of your config?
Sijis Aviles
@sijis
@nzlosh I migrated a few issues to the slack-v3 repo. some may no be 100% relevant or something we don't want to do.
jv-kalyanchakravarthy
@jv-kalyanchakravarthy
I have uplifted my app to SLackV3 and started using the repo for SLACKV3 backend
after started using and when I'm trying to retry the group list I"m getting as below
┃ Group ┃ Users ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ asdf │ @U0264AG98GZ @U02TCPMAD
├─────────────┼─────────────────────────────────────────────────────────
instead of adding the usernames It is considering the userid ..
I'm using err-profiles plugin for adding the user previously when I used SLACK it worked well but after migrating to SLACKv3 it is giving the results in this way
Carlos
@nzlosh
@sijis Awesome, thanks for that. I'm wading through my inbox now :D
Sijis Aviles
@sijis
ya, trying to tidy up
Carlos
@nzlosh
You're doing a great job there. :thumbsup:
Carlos
@nzlosh
@jv-kalyanchakravarthy You're seeing userid's rather than display_name which is related to this issue: errbotio/err-backend-slackv3#33.
jv-kalyanchakravarthy
@jv-kalyanchakravarthy
Any idea when is the plan date for the above fix ..