コード例 #1
0
ファイル: slack.py プロジェクト: jdborowy/docker-bot
    def reconfigService(self,
                        weburl,
                        username=None,
                        icon=None,
                        templates=None,
                        **kwargs):
        """
        Creates a SlackStatusPush status service.

        :param weburl: Your Slack weburl
        :param username: The user name of the "user" positing the messages on
            Slack.
        :param icon: The icon of the "user" posting the messages on Slack.
        """

        yield HttpStatusPushBase.reconfigService(self, **kwargs)
        self._http = yield httpclientservice.HTTPClientService.getService(
            self.master, weburl)

        self.weburl = weburl
        self.username = username
        self.icon = icon

        self.templates = {}
        for t in ['repository', 'branch', 'revision']:
            self.templates[t] = templates.get(t, '{%s}' % t)
コード例 #2
0
ファイル: hipchat.py プロジェクト: kenygia/buildbot
 def reconfigService(self, auth_token, endpoint="https://api.hipchat.com",
                     builder_room_map=None, builder_user_map=None,
                     event_messages=None, **kwargs):
     yield HttpStatusPushBase.reconfigService(self, **kwargs)
     self.auth_token = auth_token
     self.endpoint = endpoint
     self.builder_room_map = builder_room_map
     self.builder_user_map = builder_user_map
     self.user_notify = '%sv2/user/%s/message?auth_token=%s'
     self.room_notify = '%sv2/room/%s/notification?auth_token=%s'
コード例 #3
0
ファイル: hipchat.py プロジェクト: craig5/buildbot
    def reconfigService(self, auth_token, endpoint="https://api.hipchat.com",
                        builder_room_map=None, builder_user_map=None,
                        event_messages=None, **kwargs):
        yield HttpStatusPushBase.reconfigService(self, **kwargs)
        self._http = yield httpclientservice.HTTPClientService.getService(
            self.master, endpoint)

        self.auth_token = auth_token
        self.builder_room_map = builder_room_map
        self.builder_user_map = builder_user_map
コード例 #4
0
ファイル: hipchat.py プロジェクト: python/buildbot
    def reconfigService(self, auth_token, endpoint="https://api.hipchat.com",
                        builder_room_map=None, builder_user_map=None,
                        event_messages=None, **kwargs):
        yield HttpStatusPushBase.reconfigService(self, **kwargs)
        self._http = yield httpclientservice.HTTPClientService.getService(
            self.master, endpoint)

        self.auth_token = auth_token
        self.builder_room_map = builder_room_map
        self.builder_user_map = builder_user_map
コード例 #5
0
 def reconfigService(self,
                     auth_token,
                     endpoint="https://api.hipchat.com",
                     builder_room_map=None,
                     builder_user_map=None,
                     event_messages=None,
                     **kwargs):
     yield HttpStatusPushBase.reconfigService(self, **kwargs)
     self.auth_token = auth_token
     self.endpoint = endpoint
     self.builder_room_map = builder_room_map
     self.builder_user_map = builder_user_map
     self.user_notify = '%sv2/user/%s/message?auth_token=%s'
     self.room_notify = '%sv2/room/%s/notification?auth_token=%s'
コード例 #6
0
    def reconfigService(self,
                        auth_token,
                        endpoint="https://slack.com",
                        builder_room_map=None,
                        builder_user_map=None,
                        event_messages=None,
                        builder_custom_message_property=None,
                        **kwargs):
        auth_token = yield self.renderSecrets(auth_token)
        yield HttpStatusPushBase.reconfigService(self, **kwargs)
        self._http = yield httpclientservice.HTTPClientService.getService(
            self.master, endpoint, debug=self.debug, verify=self.verify)

        token_format = 'Bearer %s' % (auth_token)
        self.auth_token = token_format
        self.builder_room_map = builder_room_map
        self.builder_user_map = builder_user_map
        self.builder_custom_message_property = builder_custom_message_property