How to get GitHub projectv2_item fields in key values using GraphQL? #149860
Replies: 2 comments
-
To get the field values in a key-value format, you can use the following GraphQL query: You can then transform the result into a JSON object with the desired format: def lambda_handler(event, context):
This Python script uses the github library to execute the GraphQL query and transform the result into a dictionary. You can then save the field values to a spreadsheet or send them to another service, such as an AWS S3 bucket or an external API. |
Beta Was this translation helpful? Give feedback.
-
this is for the Project V2 Item, not Project V2. I assume this is the fields and values that tied to the issues. I tried this
but it returns this
I just want to get those field names and values in string. |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
I want to export my GitHub Projects periodically to spreadsheet using GraphQL. I have multiple projects that have similar fields, e.g. Sprint, Epic, Deadline, Story Point.
I use GitHub Webhooks to send events to my AWS Lambda on Issue & Project update.
I successfully query the GraphQL using the simple query below:
It successfully return this
I want to return the fields in that node in String -> String Key Value format.
e.g.
How should I do it?
Beta Was this translation helpful? Give feedback.
All reactions