Thu, 15 Jan 2015 19:06:14 +0200
- added bridging functionality
72
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
1 | import bt as Bt |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
2 | |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
3 | ModuleData = { |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
4 | 'commands': |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
5 | [ |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
6 | { |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
7 | 'name': 'ticket', |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
8 | 'description': 'Gets ticket info', |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
9 | 'args': '<ticket>', |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
10 | 'level': 'normal', |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
11 | }, |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
12 | |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
13 | { |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
14 | 'name': 'testannounce', |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
15 | 'description': 'Tests the ticket announcer', |
83
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
16 | 'args': '<ticket>', |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
17 | 'level': 'admin', |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
18 | }, |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
19 | |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
20 | { |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
21 | 'name': 'checkbt', |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
22 | 'description': 'Polls the bug tracker for new tickets', |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
23 | 'args': None, |
72
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
24 | 'level': 'admin', |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
25 | }, |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
26 | ] |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
27 | } |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
28 | |
73
d67cc4fbc3f1
- modularization complete!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
72
diff
changeset
|
29 | def cmd_ticket (bot, args, replyto, **rest): |
72
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
30 | Bt.get_ticket_data (bot, replyto, args['ticket'], True) |
2266d6d73de3
- commit work done on splitting bt/hg
Teemu Piippo <crimsondusk64@gmail.com>
parents:
diff
changeset
|
31 | |
73
d67cc4fbc3f1
- modularization complete!!
Teemu Piippo <crimsondusk64@gmail.com>
parents:
72
diff
changeset
|
32 | def cmd_testannounce (bot, args, **rest): |
83
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
33 | Bt.announce_new_issue (bot, Bt.get_issue (args['ticket'])) |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
34 | |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
35 | def cmd_checkbt (bot, **rest): |
3dab1fd47d51
- slight rework on bt poll
Teemu Piippo <crimsondusk64@gmail.com>
parents:
73
diff
changeset
|
36 | Bt.poll() |