(arrow_token, committers_file, event_name, event_payload)
| 871 | @click.option('--event-payload', '-p', type=click.File('r', encoding='utf8'), |
| 872 | default='-', required=True) |
| 873 | def trigger_bot(arrow_token, committers_file, event_name, event_payload): |
| 874 | from .bot import CommentBot, PullRequestWorkflowBot, actions |
| 875 | from ruamel.yaml import YAML |
| 876 | |
| 877 | event_payload = json.loads(event_payload.read()) |
| 878 | if 'comment' in event_name: |
| 879 | bot = CommentBot(name='github-actions', handler=actions, token=arrow_token) |
| 880 | bot.handle(event_name, event_payload) |
| 881 | else: |
| 882 | committers = None |
| 883 | if committers_file: |
| 884 | committers = [committer['alias'] |
| 885 | for committer in YAML().load(committers_file)] |
| 886 | bot = PullRequestWorkflowBot(event_name, event_payload, token=arrow_token, |
| 887 | committers=committers) |
| 888 | bot.handle() |
| 889 | |
| 890 | |
| 891 | @archery.group("linking") |
nothing calls this directly
no test coverage detected