MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / parse_args

Function parse_args

scripts/issue_duplicate_check_openhands.py:39–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37
38
39def parse_args() -> argparse.Namespace:
40 parser = argparse.ArgumentParser(
41 description=(
42 'Start an OpenHands Cloud conversation that checks a GitHub issue '
43 'for duplicates.'
44 )
45 )
46 parser.add_argument(
47 '--repository', required=True, help='Repository in owner/repo form'
48 )
49 parser.add_argument(
50 '--issue-number', required=True, type=int, help='Issue number to inspect'
51 )
52 parser.add_argument(
53 '--output',
54 default='duplicate-check-result.json',
55 help='Path where the JSON result should be written',
56 )
57 parser.add_argument(
58 '--poll-interval-seconds',
59 default=5,
60 type=int,
61 help='Polling interval while waiting for the conversation to finish',
62 )
63 parser.add_argument(
64 '--max-wait-seconds',
65 default=900,
66 type=int,
67 help=(
68 'Maximum time to wait per polling phase; if a start task must be awaited '
69 'first, the total runtime can approach twice this value'
70 ),
71 )
72 return parser.parse_args()
73
74
75def github_headers() -> dict[str, str]:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected