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

Function set_date_posted

ci/github_project_drift_sync.py:222–240  ·  view source on GitHub ↗

Set a DATE field on a project item. date_str must be YYYY-MM-DD.

(
    project_id: str, item_id: str, field_id: str, date_str: str
)

Source from the content-addressed store, hash-verified

220
221
222def set_date_posted(
223 project_id: str, item_id: str, field_id: str, date_str: str
224) -> bool:
225 """Set a DATE field on a project item. date_str must be YYYY-MM-DD."""
226 mutation = (
227 "mutation($p: ID!, $i: ID!, $f: ID!, $d: Date!) { "
228 "updateProjectV2ItemFieldValue(input: "
229 "{projectId: $p, itemId: $i, fieldId: $f, "
230 "value: {date: $d}}) { projectV2Item { id } } }"
231 )
232 try:
233 d = graphql(mutation, p=project_id, i=item_id, f=field_id, d=date_str)
234 except SystemExit:
235 return False
236 return bool(
237 (d.get("data") or {})
238 .get("updateProjectV2ItemFieldValue", {})
239 .get("projectV2Item")
240 )
241
242
243def fetch_content_created_at(content_id: str) -> str | None:

Callers 1

mainFunction · 0.85

Calls 2

graphqlFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected