From d89b4c2d0a0140ff088fc1cee789f8c0b7f7e52b Mon Sep 17 00:00:00 2001 From: progfay Date: Thu, 6 Oct 2022 08:57:23 +0900 Subject: [PATCH 1/3] escape non-escaped `"` on GraphQL Query --- .../using-the-api-to-manage-projects.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md b/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md index 5e9fa6ecc4..772c3275b7 100644 --- a/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md +++ b/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md @@ -566,7 +566,7 @@ The following example will update the value of a text field for an item. Replace curl --request POST \ --url https://api.github.com/graphql \ --header 'Authorization: Bearer TOKEN' \ - --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "PROJECT_ID" itemId: "ITEM_ID" fieldId: "FIELD_ID" value: { text: "Updated text" }}) { projectV2Item { id }}}"}' + --data "{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: \"PROJECT_ID\" itemId: \"ITEM_ID\" fieldId: \"FIELD_ID\" value: { text: \"Updated text\" }}) { projectV2Item { id }}}"}" ``` {% endcurl %} @@ -620,7 +620,7 @@ The following example will update the value of a single select field for an item curl --request POST \ --url https://api.github.com/graphql \ --header 'Authorization: Bearer TOKEN' \ - --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "PROJECT_ID" itemId: "ITEM_ID" fieldId: "FIELD_ID" value: { singleSelectOptionId: "OPTION_ID" }}) { projectV2Item { id }}}"}' + --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: \"PROJECT_ID\" itemId: \"ITEM_ID\" fieldId: \"FIELD_ID\" value: { singleSelectOptionId: \"OPTION_ID\" }}) { projectV2Item { id }}}"}' ``` {% endcurl %} @@ -660,7 +660,7 @@ The following example will update the value of an iteration field for an item. curl --request POST \ --url https://api.github.com/graphql \ --header 'Authorization: Bearer TOKEN' \ - --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: "PROJECT_ID" itemId: "ITEM_ID" fieldId: "FIELD_ID" value: { singleSelectOptionId: "OPTION_ID" }}) { projectV2Item { id }}}"}' + --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: \"PROJECT_ID\" itemId: \"ITEM_ID\" fieldId: \"FIELD_ID\" value: { singleSelectOptionId: \"OPTION_ID\" }}) { projectV2Item { id }}}"}' ``` {% endcurl %} From bd5ef1c71b0f79b7fe04d56bcd2fc9695019239a Mon Sep 17 00:00:00 2001 From: progfay Date: Thu, 6 Oct 2022 09:03:10 +0900 Subject: [PATCH 2/3] fix --- .../automating-your-project/using-the-api-to-manage-projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md b/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md index 772c3275b7..3f200be338 100644 --- a/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md +++ b/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md @@ -95,7 +95,7 @@ You can also find the node ID of all projects in your organization. The followin curl --request POST \ --url https://api.github.com/graphql \ --header 'Authorization: Bearer TOKEN' \ - --data '{"query":"{organization(login: \"ORGANIZATION") {projectsV2(first: 20) {nodes {id title}}}}"}' + --data '{"query":"{organization(login: \"ORGANIZATION\") {projectsV2(first: 20) {nodes {id title}}}}"}' ``` {% endcurl %} From 173fcd14cee509ab1a91f5e8ec8a80a5545263c9 Mon Sep 17 00:00:00 2001 From: Sarah Edwards Date: Fri, 7 Oct 2022 17:48:18 -0700 Subject: [PATCH 3/3] revert single quote change --- .../automating-your-project/using-the-api-to-manage-projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md b/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md index 3f200be338..8c6927581a 100644 --- a/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md +++ b/content/issues/planning-and-tracking-with-projects/automating-your-project/using-the-api-to-manage-projects.md @@ -566,7 +566,7 @@ The following example will update the value of a text field for an item. Replace curl --request POST \ --url https://api.github.com/graphql \ --header 'Authorization: Bearer TOKEN' \ - --data "{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: \"PROJECT_ID\" itemId: \"ITEM_ID\" fieldId: \"FIELD_ID\" value: { text: \"Updated text\" }}) { projectV2Item { id }}}"}" + --data '{"query":"mutation {updateProjectV2ItemFieldValue( input: { projectId: \"PROJECT_ID\" itemId: \"ITEM_ID\" fieldId: \"FIELD_ID\" value: { text: \"Updated text\" }}) { projectV2Item { id }}}"}' ``` {% endcurl %}