-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Google Search Console - remove test files and refactor #16458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Skipped Deployments
|
WalkthroughThis update refactors the Google Search Console integration by removing custom property metadata handling, centralizing API request logic within the app module, and delegating HTTP calls to new app methods. Both the "Retrieve Site Performance Data" and "Submit URL for Indexing" actions are simplified to use these new methods, with direct axios usage replaced and props explicitly declared. Additionally, all local development test scripts, test data, and associated README files are deleted. The package version is incremented to reflect these changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action
participant GoogleSearchConsoleApp
participant GoogleAPI
User->>Action: Provide input props
Action->>GoogleSearchConsoleApp: Call getSitePerformanceData/submitUrlForIndexing
GoogleSearchConsoleApp->>GoogleAPI: Make authenticated POST request
GoogleAPI-->>GoogleSearchConsoleApp: Return API response
GoogleSearchConsoleApp-->>Action: Return processed response
Action-->>User: Output summary and data
Possibly related PRs
Suggested labels
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/google_search_console/actions/retrieve-site-performance-data/retrieve-site-performance-data.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
components/google_search_console/actions/retrieve-site-performance-data/retrieve-site-performance-data.mjs (1)
112-115: Minor: bubble up original stack trace for easier debuggingRe-throwing a new
Errorhides the original stack. Consider eitherthrow errorafter enrichingerror.message, or attacherror.stackto the new error instance.
(Just a suggestion; not blocking.)components/google_search_console/actions/submit-url-for-indexing/submit-url-for-indexing.mjs (2)
38-45: Formatting: first list item inwarnings.join("\n- ")is missing a bulletBecause the join string starts with
\n-, the first warning lacks the leading dash. Prefix the bullet before joining:- throw new Error(`Failed to fetch data ( ${thrower.whoThrew} error ) : ${error.message}. ` + warnings.join("\n- ")); + const formattedWarnings = warnings.length ? `\n- ${warnings.join("\n- ")}` : ""; + throw new Error(`Failed to fetch data ( ${thrower.whoThrew} error ) : ${error.message}.${formattedWarnings}`);Apply the same change to the success summary below.
43-46: Use trimmed URL consistentlyYou trim
siteUrlfor the request but export the un-trimmed value in the summary.
Using the same (trimmed) value avoids surprises such as stray whitespace:- $.export("$summary", ` URL submitted to Google: ${this.siteUrl}` + warnings.join("\n- ")); + $.export("$summary", `URL submitted to Google: ${siteUrl}` + formattedWarnings);
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (16)
components/google_search_console/actions/retrieve-site-performance-data/README.md(0 hunks)components/google_search_console/actions/retrieve-site-performance-data/retrieve-site-performance-data.mjs(1 hunks)components/google_search_console/actions/submit-url-for-indexing/README.md(0 hunks)components/google_search_console/actions/submit-url-for-indexing/submit-url-for-indexing.mjs(1 hunks)components/google_search_console/common/tests/README.md(0 hunks)components/google_search_console/common/tests/action-tests/test-retrieve-site-performance-data.mjs(0 hunks)components/google_search_console/common/tests/action-tests/test-submit-url-for-indexing.mjs(0 hunks)components/google_search_console/common/tests/get-token.mjs(0 hunks)components/google_search_console/common/tests/methods/bogus-data/bogus-data-google-date.mjs(0 hunks)components/google_search_console/common/tests/methods/bogus-data/bogus-data-url.mjs(0 hunks)components/google_search_console/common/tests/methods/test-checkIfUrlValid.mjs(0 hunks)components/google_search_console/common/tests/methods/test-throwIfNotYMDDashDate.mjs(0 hunks)components/google_search_console/common/tests/mockery-dollar.mjs(0 hunks)components/google_search_console/common/utils.mjs(0 hunks)components/google_search_console/google_search_console.app.mjs(2 hunks)components/google_search_console/package.json(1 hunks)
💤 Files with no reviewable changes (12)
- components/google_search_console/common/utils.mjs
- components/google_search_console/actions/submit-url-for-indexing/README.md
- components/google_search_console/common/tests/mockery-dollar.mjs
- components/google_search_console/common/tests/methods/test-checkIfUrlValid.mjs
- components/google_search_console/common/tests/methods/test-throwIfNotYMDDashDate.mjs
- components/google_search_console/common/tests/methods/bogus-data/bogus-data-google-date.mjs
- components/google_search_console/common/tests/README.md
- components/google_search_console/actions/retrieve-site-performance-data/README.md
- components/google_search_console/common/tests/methods/bogus-data/bogus-data-url.mjs
- components/google_search_console/common/tests/action-tests/test-retrieve-site-performance-data.mjs
- components/google_search_console/common/tests/action-tests/test-submit-url-for-indexing.mjs
- components/google_search_console/common/tests/get-token.mjs
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: pnpm publish
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
- GitHub Check: Lint Code Base
🔇 Additional comments (1)
components/google_search_console/package.json (1)
15-17: Confirm platform peer compatibility before publishing
@pipedream/platformis pinned with a caret (^3.0.0).
Ensure the refactor was tested against the latest3.x– breaking changes in minor versions could slip through. Locking to an exact version or adding it as a peer dependency can prevent unexpected runtime issues.
...gle_search_console/actions/retrieve-site-performance-data/retrieve-site-performance-data.mjs
Show resolved
Hide resolved
jcortes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @michelle0927 lgtm! Ready for QA!
|
Hi @michelle0927 |
|
Hi everyone, all test cases are passed! Ready for release! |
Updates per this Slack convo
Summary by CodeRabbit
Refactor
Chores
Documentation