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

Function get_date_field

ci/github_project_sync.py:202–228  ·  view source on GitHub ↗

Find a date field by name. Returns field_id.

(project_id: str, field_name: str)

Source from the content-addressed store, hash-verified

200
201
202def get_date_field(project_id: str, field_name: str) -> str:
203 """Find a date field by name. Returns field_id."""
204 query = """
205 query($projectId: ID!) {
206 node(id: $projectId) {
207 ... on ProjectV2 {
208 fields(first: 50) {
209 nodes {
210 ... on ProjectV2Field {
211 id
212 name
213 dataType
214 }
215 }
216 }
217 }
218 }
219 }
220 """
221 data = graphql(query, {"projectId": project_id})
222 fields: list[dict[str, Any]] = data["data"]["node"]["fields"]["nodes"]
223
224 for field in fields:
225 if field.get("name") == field_name and field.get("dataType") == "DATE":
226 return field["id"]
227
228 raise SystemExit(f"Date field '{field_name}' not found in project")
229
230
231def update_single_select(

Callers 1

mainFunction · 0.85

Calls 2

graphqlFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected