From 9db690f44822e3edf98b56d015661bc0b2b2275c Mon Sep 17 00:00:00 2001 From: Alan Johnson Date: Fri, 13 Dec 2024 07:47:54 -0500 Subject: [PATCH 1/2] Fix up empty readmes to not say undefined --- integrations/asana/actions/delete-task.md | 2 +- integrations/checkr-partner/actions/create-candidate.md | 2 +- integrations/google-drive/syncs/documents.md | 4 ++-- integrations/google/syncs/workspace-org-units.md | 2 +- integrations/google/syncs/workspace-user-access-tokens.md | 2 +- integrations/google/syncs/workspace-users.md | 2 +- scripts/generate-readmes.ts | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/integrations/asana/actions/delete-task.md b/integrations/asana/actions/delete-task.md index b439c39a..1fe1b13d 100644 --- a/integrations/asana/actions/delete-task.md +++ b/integrations/asana/actions/delete-task.md @@ -3,7 +3,7 @@ ## General Information -- **Description:** undefined +- **Description:** - **Version:** 0.0.1 - **Group:** Others - **Scopes:** _None_ diff --git a/integrations/checkr-partner/actions/create-candidate.md b/integrations/checkr-partner/actions/create-candidate.md index b44e0c03..107bfabb 100644 --- a/integrations/checkr-partner/actions/create-candidate.md +++ b/integrations/checkr-partner/actions/create-candidate.md @@ -3,7 +3,7 @@ ## General Information -- **Description:** undefined +- **Description:** - **Version:** 0.0.1 - **Group:** Others - **Scopes:** _None_ diff --git a/integrations/google-drive/syncs/documents.md b/integrations/google-drive/syncs/documents.md index 8313cc88..c36514a7 100644 --- a/integrations/google-drive/syncs/documents.md +++ b/integrations/google-drive/syncs/documents.md @@ -6,8 +6,8 @@ - **Description:** Sync the metadata of a specified file or folders from Google Drive, handling both individual files and nested folders. Metadata required to filter on a particular folder, or file(s). Metadata -fields should be {"files": [""]} OR -{"folders": [""]}. The ID should be able to be provided +fields should be `{"files": [""]}` OR +`{"folders": [""]}`. The ID should be able to be provided by using the Google Picker API (https://developers.google.com/drive/picker/guides/overview) and using the ID field provided by the response diff --git a/integrations/google/syncs/workspace-org-units.md b/integrations/google/syncs/workspace-org-units.md index ac2613cc..7e0bbe57 100644 --- a/integrations/google/syncs/workspace-org-units.md +++ b/integrations/google/syncs/workspace-org-units.md @@ -3,7 +3,7 @@ ## General Information -- **Description:** undefined +- **Description:** - **Version:** 0.0.1 - **Group:** Others - **Scopes:** `https://www.googleapis.com/auth/admin.directory.orgunit.readonly, https://www.googleapis.com/auth/admin.directory.user.readonly` diff --git a/integrations/google/syncs/workspace-user-access-tokens.md b/integrations/google/syncs/workspace-user-access-tokens.md index 73c9c04f..79a81ef1 100644 --- a/integrations/google/syncs/workspace-user-access-tokens.md +++ b/integrations/google/syncs/workspace-user-access-tokens.md @@ -3,7 +3,7 @@ ## General Information -- **Description:** undefined +- **Description:** - **Version:** 0.0.1 - **Group:** Others - **Scopes:** `https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/admin.directory.user.security` diff --git a/integrations/google/syncs/workspace-users.md b/integrations/google/syncs/workspace-users.md index 2291b1b7..a335edb4 100644 --- a/integrations/google/syncs/workspace-users.md +++ b/integrations/google/syncs/workspace-users.md @@ -3,7 +3,7 @@ ## General Information -- **Description:** undefined +- **Description:** - **Version:** 0.0.1 - **Group:** Others - **Scopes:** _None_ diff --git a/scripts/generate-readmes.ts b/scripts/generate-readmes.ts index a8ac3db1..37fa5f28 100644 --- a/scripts/generate-readmes.ts +++ b/scripts/generate-readmes.ts @@ -72,7 +72,7 @@ function generalInfo(scriptPath: string, endpointType: string, scriptConfig: any return [ `## General Information`, ``, - `- **Description:** ${scriptConfig.description}`, + `- **Description:** ${scriptConfig.description ?? ''}`, `- **Version:** ${scriptConfig.version ? scriptConfig.version : '0.0.1'}`, `- **Group:** ${scriptConfig.group || 'Others'}`, `- **Scopes:** ${scopes ? `\`${scopes}\`` : '_None_'}`, From 9f5aa6f88c000176b4b7898dfb1a098f3a754455 Mon Sep 17 00:00:00 2001 From: Alan Johnson Date: Fri, 13 Dec 2024 07:50:23 -0500 Subject: [PATCH 2/2] Print warning for missing descriptions --- scripts/generate-readmes.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/generate-readmes.ts b/scripts/generate-readmes.ts index 37fa5f28..5da045cf 100644 --- a/scripts/generate-readmes.ts +++ b/scripts/generate-readmes.ts @@ -69,6 +69,10 @@ function updateReadme(markdown: string, scriptName: string, scriptPath: string, function generalInfo(scriptPath: string, endpointType: string, scriptConfig: any) { const scopes = Array.isArray(scriptConfig.scopes) ? scriptConfig.scopes.join(', ') : scriptConfig.scopes; + if (!scriptConfig.description) { + console.warn(`Warning: no description for ${scriptPath}`); + } + return [ `## General Information`, ``,