+ "gitDiff": "diff --git a/.github/workflows/add-pr-to-project.yml b/.github/workflows/add-pr-to-project.yml\nindex 0563c78..021cfc3 100644\n--- a/.github/workflows/add-pr-to-project.yml\n+++ b/.github/workflows/add-pr-to-project.yml\n@@ -52,7 +52,7 @@ jobs:\n \n } catch (error) {\n console.error('Failed to add PR to project:', error.message);\n- \n+\n // If it fails because it's already in the project, that's fine\n if (error.message.includes('already exists')) {\n console.log('PR already in project');\ndiff --git a/.github/workflows/deploy-demo-preview-smart.yml b/.github/workflows/deploy-demo-preview-smart.yml\nindex 83c260d..cc11b0e 100644\n--- a/.github/workflows/deploy-demo-preview-smart.yml\n+++ b/.github/workflows/deploy-demo-preview-smart.yml\n@@ -221,8 +221,8 @@ jobs:\n issue_number: prNumber\n });\n \n- const botComment = comments.data.find(comment => \n- comment.user.type === 'Bot' && \n+ const botComment = comments.data.find(comment =>\n+ comment.user.type === 'Bot' &&\n comment.body.includes('Demo Preview Ready!')\n );\n \n@@ -300,10 +300,10 @@ jobs:\n console.log(`Updating project \"${project.title}\"`);\n \n // Find the Preview URL field\n- const previewUrlField = project.fields.nodes.find(f => \n+ const previewUrlField = project.fields.nodes.find(f =>\n f.name === 'Preview URL' && f.dataType === 'TEXT'\n );\n- \n+\n if (!previewUrlField) {\n console.log('Preview URL field not found in project');\n continue;\n@@ -331,7 +331,7 @@ jobs:\n fieldId: previewUrlField.id,\n value: { text: previewUrl }\n });\n- \n+\n console.log(`✅ Updated Preview URL field to: ${previewUrl}`);\n }\n } catch (error) {\ndiff --git a/.github/workflows/manual-preview-control.yml b/.github/workflows/manual-preview-control.yml\nindex 328fea5..072d78f 100644\n--- a/.github/workflows/manual-preview-control.yml\n+++ b/.github/workflows/manual-preview-control.yml\n@@ -12,7 +12,7 @@ permissions:\n jobs:\n handle-preview-command:\n if: |\n- github.event.issue.pull_request && \n+ github.event.issue.pull_request &&\n (contains(github.event.comment.body, '/preview') || contains(github.event.comment.body, '/skip-preview'))\n runs-on: ubuntu-latest\n steps:\n@@ -31,7 +31,7 @@ jobs:\n repo,\n username: commenter\n });\n- \n+\n if (['admin', 'write'].includes(permissionLevel.permission)) {\n core.setOutput('has-permission', 'true');\n } else {\n@@ -65,7 +65,7 @@ jobs:\n issue_number: issueNumber,\n labels: ['deploy-preview']\n });\n- \n+\n // Remove skip-preview if present\n try {\n await github.rest.issues.removeLabel({\n@@ -75,14 +75,14 @@ jobs:\n name: 'skip-preview'\n });\n } catch (e) {}\n- \n+\n await github.rest.issues.createComment({\n owner: context.repo.owner,\n repo: context.repo.repo,\n issue_number: issueNumber,\n body: '🚀 Preview deployment triggered! The preview will be ready in a few minutes.'\n });\n- \n+\n } else if (comment.includes('/skip-preview')) {\n // Add skip-preview label\n await github.rest.issues.addLabels({\n@@ -91,7 +91,7 @@ jobs:\n issue_number: issueNumber,\n labels: ['skip-preview']\n });\n- \n+\n // Remove deploy-preview if present\n try {\n await github.rest.issues.removeLabel({\n@@ -101,7 +101,7 @@ jobs:\n name: 'deploy-preview'\n });\n } catch (e) {}\n- \n+\n await github.rest.issues.createComment({\n owner: context.repo.owner,\n repo: context.repo.repo,\ndiff --git a/.github/workflows/update-preview-url-field.yml b/.github/workflows/update-preview-url-field.yml\nindex 5653276..52a37ba 100644\n--- a/.github/workflows/update-preview-url-field.yml\n+++ b/.github/workflows/update-preview-url-field.yml\n@@ -96,10 +96,10 @@ jobs:\n console.log(`Updating project \"${project.title}\"`);\n \n // Find the Preview URL field\n- const previewUrlField = project.fields.nodes.find(f => \n+ const previewUrlField = project.fields.nodes.find(f =>\n f.name === 'Preview URL' && f.dataType === 'TEXT'\n );\n- \n+\n if (!previewUrlField) {\n console.log('Preview URL field not found in project');\n continue;\n@@ -127,7 +127,7 @@ jobs:\n fieldId: previewUrlField.id,\n value: { text: previewUrl }\n });\n- \n+\n console.log(`✅ Updated Preview URL field to: ${previewUrl}`);\n }\n } catch (error) {\n@@ -203,13 +203,13 @@ jobs:\n });\n \n const projectItems = projectData.repository.pullRequest?.projectItems?.nodes || [];\n- \n+\n for (const projectItem of projectItems) {\n const project = projectItem.project;\n- const previewUrlField = project.fields.nodes.find(f => \n+ const previewUrlField = project.fields.nodes.find(f =>\n f.name === 'Preview URL' && f.dataType === 'TEXT'\n );\n- \n+\n if (!previewUrlField) continue;\n \n // Clear the field\n@@ -234,7 +234,7 @@ jobs:\n fieldId: previewUrlField.id,\n value: { text: \"\" }\n });\n- \n+\n console.log('✅ Cleared Preview URL field');\n }\n } catch (error) {\ndiff --git a/src/utils/logger.ts b/src/utils/logger.ts\nindex 45d9c76..ddabb53 100644\n--- a/src/utils/logger.ts\n+++ b/src/utils/logger.ts\n@@ -38,4 +38,10 @@ export const logger = {\n console.debug(...args);\n }\n },\n+\n+ info: (...args: unknown[]) => {\n+ if (isDevelopment) {\n+ console.info(...args);\n+ }\n+ },\n };\n",
0 commit comments