MCPcopy Create free account
hub / github.com/apache/arrow / trigger_bot

Function trigger_bot

dev/archery/archery/cli.py:873–888  ·  view source on GitHub ↗
(arrow_token, committers_file, event_name, event_payload)

Source from the content-addressed store, hash-verified

871@click.option('--event-payload', '-p', type=click.File('r', encoding='utf8'),
872 default='-', required=True)
873def 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")

Callers

nothing calls this directly

Calls 6

handleMethod · 0.95
CommentBotClass · 0.85
loadsMethod · 0.80
readMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected