MCPcopy Create free account
hub / github.com/LaunchPlatform/beanhub-cli / _sync_batch_payload

Function _sync_batch_payload

tests/connect/test_sync.py:18–37  ·  view source on GitHub ↗
(
    batch_id: uuid.UUID,
    *,
    import_and_commit: bool = False,
    state: str = "SYNCING",
    syncs: list[dict],
    all_syncs_succeeded: bool | None = None,
    error_message: str | None = None,
)

Source from the content-addressed store, hash-verified

16
17
18def _sync_batch_payload(
19 batch_id: uuid.UUID,
20 *,
21 import_and_commit: bool = False,
22 state: str = "SYNCING",
23 syncs: list[dict],
24 all_syncs_succeeded: bool | None = None,
25 error_message: str | None = None,
26) -> dict:
27 payload = dict(
28 id=str(batch_id),
29 import_and_commit=import_and_commit,
30 state=state,
31 syncs=syncs,
32 )
33 if all_syncs_succeeded is not None:
34 payload["all_syncs_succeeded"] = all_syncs_succeeded
35 if error_message is not None:
36 payload["error_message"] = error_message
37 return payload
38
39
40def _mock_list_repo(

Calls

no outgoing calls

Tested by

no test coverage detected