(arrow_token, committers_file, event_name, event_payload)
| 825 | @click.option('--event-payload', '-p', type=click.File('r', encoding='utf8'), |
| 826 | default='-', required=True) |
| 827 | def trigger_bot(arrow_token, committers_file, event_name, event_payload): |
| 828 | from .bot import CommentBot, PullRequestWorkflowBot, actions |
| 829 | from ruamel.yaml import YAML |
| 830 | |
| 831 | event_payload = json.loads(event_payload.read()) |
| 832 | if 'comment' in event_name: |
| 833 | bot = CommentBot(name='github-actions', handler=actions, token=arrow_token) |
| 834 | bot.handle(event_name, event_payload) |
| 835 | else: |
| 836 | committers = None |
| 837 | if committers_file: |
| 838 | committers = [committer['alias'] |
| 839 | for committer in YAML().load(committers_file)] |
| 840 | bot = PullRequestWorkflowBot(event_name, event_payload, token=arrow_token, |
| 841 | committers=committers) |
| 842 | bot.handle() |
| 843 | |
| 844 | |
| 845 | @archery.group("linking") |
nothing calls this directly
no test coverage detected