diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2015-01-26 21:08:33 -0800 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2015-01-26 21:08:33 -0800 |
commit | b6d6868bba37c92dbdaf608993abba07009fd655 (patch) | |
tree | 58af7df9bcfabb168039318d7d45670f9e5252b2 /deployerbot.py | |
parent | 6be93405d2ae14bc965334ee1a37d82d704e15f4 (diff) |
Adding origin=self to all outgoing messages.webhook-grappling-gun
Diffstat (limited to 'deployerbot.py')
-rw-r--r-- | deployerbot.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/deployerbot.py b/deployerbot.py index c596b06..26e187a 100644 --- a/deployerbot.py +++ b/deployerbot.py @@ -65,11 +65,11 @@ class DeployerBot: def deploy(self, IRC, sender, dest, application): key = application.lower() if key not in self.applications: - dest.msg("I don't know how to deploy %s" % application) + dest.msg("I don't know how to deploy %s" % application, origin=self) return app, repo, url, secret = self.applications[key] - dest.msg("Ok, I'm deploying %s..." % application) + dest.msg("Ok, I'm deploying %s..." % application, origin=self) payload = { "ref": "refs/heads/master", @@ -88,23 +88,24 @@ class DeployerBot: r = requests.post(url, data=data, headers=headers) if r.status_code == requests.codes.ok: - dest.msg("I successfully deployed %s" % application) + dest.msg("I successfully deployed %s" % application, origin=self) else: - dest.msg("I failed to deploy %s. I got HTTP status code %d" % (application, r.status_code)) + dest.msg("I failed to deploy %s. I got HTTP status code %d" \ + % (application, r.status_code), origin=self) def listWebHooks(self, IRC, sender, dest): if self.applications: msg = "I know the following applications: " \ ", ".join([app for (app, repo, url, key) in self.applications.values()]) - dest.msg(msg) + dest.msg(msg, origin=self) else: - dest.msg("I don't have any hooks :(") + dest.msg("I don't have any hooks :(", origin=self) def addApplication(self, IRC, sender, dest, application, repo, url, secret): key = application.lower() if key in self.applications: - dest.msg("I already have an application called %s" % application) + dest.msg("I already have an application called %s" % application, origin=self) else: self.applications[key] = (application, repo, url, secret) - dest.msg("I've added application %s" % application) + dest.msg("I've added application %s" % application, origin=self) |