MCPcopy Create free account
hub / github.com/FastLED/FastLED / add_to_project

Function add_to_project

ci/github_project_drift_sync.py:283–295  ·  view source on GitHub ↗
(project_id: str, content_id: str)

Source from the content-addressed store, hash-verified

281
282
283def add_to_project(project_id: str, content_id: str) -> str | None:
284 mutation = (
285 "mutation($project: ID!, $content: ID!) { "
286 "addProjectV2ItemById(input: {projectId: $project, contentId: $content}) { "
287 "item { id } } }"
288 )
289 try:
290 d = graphql(mutation, project=project_id, content=content_id)
291 except SystemExit:
292 return None
293 item = (d.get("data") or {}).get("addProjectV2ItemById", {}).get("item") or {}
294 node_id = item.get("id")
295 return str(node_id) if node_id else None
296
297
298def main() -> int:

Callers 1

mainFunction · 0.85

Calls 2

graphqlFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected