No flags found
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
7c86c27
... +3 ...
63ead07
Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.
e.g., #unittest #integration
#production #enterprise
#frontend #backend
133 | 133 | ||
134 | 134 | @defer.inlineCallbacks |
|
135 | 135 | def command_START(self, args, **kwargs): |
|
136 | + | self.bot.post('/setChatMenuButton', json={'chat_id': self.channel.id, |
|
137 | + | 'menu_button': {'type': 'commands'}}) |
|
136 | 138 | yield self.command_HELLO(args) |
|
137 | 139 | reactor.callLater(0.2, self.command_HELP, '') |
|
138 | 140 |
150 | 152 | command_NAY.usage = "nay - never mind the command we are currently discussing" |
|
151 | 153 | ||
152 | 154 | @classmethod |
|
153 | - | def describe_commands(cls): |
|
155 | + | def get_commands(cls): |
|
154 | 156 | commands = cls.build_commands() |
|
155 | 157 | response = [] |
|
156 | 158 | for command in commands: |
160 | 162 | doc = getattr(meth, '__doc__', None) |
|
161 | 163 | if not doc: |
|
162 | 164 | doc = command |
|
163 | - | response.append(f"{command} - {doc}") |
|
165 | + | response.append((command, doc)) |
|
164 | 166 | return response |
|
165 | 167 | ||
168 | + | @classmethod |
|
169 | + | def describe_commands(cls): |
|
170 | + | return [f"{command} - {doc}" for command, doc in cls.get_commands()] |
|
171 | + | ||
166 | 172 | @Contact.overrideCommand |
|
167 | 173 | def command_COMMANDS(self, args, **kwargs): |
|
168 | 174 | if args.lower() == 'botfather': |
177 | 183 | def command_GETID(self, args, **kwargs): |
|
178 | 184 | """get user and chat ID""" |
|
179 | 185 | if self.is_private_chat: |
|
180 | - | self.send(f"Your ID is {self.user_id}.") |
|
186 | + | self.send(f"Your ID is `{self.user_id}`.") |
|
181 | 187 | else: |
|
182 | - | yield self.send(f"{self.user_name}, your ID is {self.user_id}.") |
|
183 | - | self.send(f'This {self.channel.chat_info.get("type", "group")} ID is {self.chat_id}.') |
|
188 | + | yield self.send(f"{self.user_name}, your ID is `{self.user_id}`.") |
|
189 | + | self.send(f'This {self.channel.chat_info.get("type", "group")} ID is `{self.chat_id}`.') |
|
184 | 190 | command_GETID.usage = "getid - get user and chat ID that can be put in the master " \ |
|
185 | 191 | "configuration file" |
|
186 | 192 |
608 | 614 | channel = self.getChannel(c) |
|
609 | 615 | channel.add_notification_events(self.notify_events) |
|
610 | 616 | yield self.loadState() |
|
617 | + | commands = [{'command': command, 'description': doc} for command, doc in TelegramContact.get_commands()] |
|
618 | + | self.post('/setMyCommands', json={'commands': commands}) |
|
611 | 619 | ||
612 | 620 | results_emoji = { |
|
613 | 621 | SUCCESS: ' ✅', |
Learn more Showing 2 files with coverage changes found.
worker/buildbot_worker/tunnel.py
master/buildbot/util/queue.py
Files | Coverage |
---|---|
buildbot | 0.01% 92.52% |
Project Totals (345 files) | 92.07% |
63ead07
6a33321
00dcb58
373afc8
7c86c27