-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat (hootsuit): add list-social-profiles action (closes #19083) #19096
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
base: master
Are you sure you want to change the base?
feat (hootsuit): add list-social-profiles action (closes #19083) #19096
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
WalkthroughThe changes include version bumps across multiple Hootsuite action modules and the package manifest (from 0.2.1 to 0.3.0). An optional Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Workflow as Workflow Engine
participant Action as List Social Profiles Action
participant App as Hootsuite App
participant API as Hootsuite API
User->>Workflow: Execute action
Workflow->>Action: call run()
Action->>App: call listSocialProfiles(opts)
App->>API: GET /socialProfiles (with opts)
API-->>App: response { profiles[] }
App-->>Action: return response
Action->>Action: generate summary from profile count
Action-->>Workflow: export({ summary }), return response
Workflow-->>User: action complete
alt API Error
API-->>App: error response
App-->>Action: throw error
Action->>Action: extract user-friendly message
Action-->>Workflow: throw descriptive error
Workflow-->>User: error
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
components/hootsuite/actions/list-social-profiles/list-social-profiles.js(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-15T22:01:11.472Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 18362
File: components/leonardo_ai/actions/generate-image/generate-image.mjs:103-105
Timestamp: 2025-09-15T22:01:11.472Z
Learning: In Pipedream components, pipedream/platform's axios implementation automatically excludes undefined values from HTTP requests, so there's no need to manually check for truthiness before including properties in request payloads.
Applied to files:
components/hootsuite/actions/list-social-profiles/list-social-profiles.js
🔇 Additional comments (2)
components/hootsuite/actions/list-social-profiles/list-social-profiles.js (2)
1-2: LGTM!The import statement correctly uses the Pipedream platform axios wrapper.
12-13: LGTM!The OAuth token retrieval and API endpoint URL are correctly configured for the Hootsuite API.
components/hootsuite/actions/list-social-profiles/list-social-profiles.js
Show resolved
Hide resolved
components/hootsuite/actions/list-social-profiles/list-social-profiles.js
Outdated
Show resolved
Hide resolved
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs
Show resolved
Hide resolved
…profiles.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…profiles.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
…profiles.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
components/hootsuite/actions/list-social-profiles/list-social-profiles.js(1 hunks)
🔇 Additional comments (3)
components/hootsuite/actions/list-social-profiles/list-social-profiles.js (3)
1-1: LGTM!The import correctly uses the Pipedream platform's authenticated axios helper.
3-14: LGTM!All required action metadata fields are present and correctly formatted. The key follows kebab-case naming conventions, and the description includes a helpful link to the API documentation.
27-31: LGTM!The error handling correctly uses optional chaining and provides multiple fallbacks to safely extract error messages. This prevents runtime errors from missing properties and ensures users receive helpful error messages.
components/hootsuite/actions/list-social-profiles/list-social-profiles.js
Outdated
Show resolved
Hide resolved
components/hootsuite/actions/list-social-profiles/list-social-profiles.js
Outdated
Show resolved
Hide resolved
…profiles.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
Thanks for the feedback! The pagination logic is a bit more complex than I anticipated for my first contribution. Would it be possible for a maintainer to take over from here? |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-08T15:33:38.240Z
Learnt from: GTFalcao
Repo: PipedreamHQ/pipedream PR: 12731
File: components/hackerone/actions/get-members/get-members.mjs:3-28
Timestamp: 2024-10-08T15:33:38.240Z
Learning: When exporting a summary message in the `run` method of an action, ensure the message is correctly formatted. For example, in the `hackerone-get-members` action, the correct format is `Successfully retrieved ${response.data.length} members`.
Applied to files:
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: pnpm publish
- GitHub Check: Lint Code Base
- GitHub Check: Publish TypeScript components
- GitHub Check: Verify TypeScript components
🔇 Additional comments (3)
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs (3)
1-16: LGTM: Action configuration follows Pipedream conventions.The action metadata, key naming, annotations, and props structure align with Pipedream component guidelines. The
readOnlyHint: trueanddestructiveHint: falseannotations correctly reflect the read-only nature of this list operation.
32-36: Error handling correctly addresses previous review feedback.The catch block now safely accesses nested error properties using optional chaining and provides multiple fallback levels (
error.response?.data?.errors?.[0]?.message || error.message || "Unknown error"). This resolves the unsafe property access issue flagged in the previous review.
23-31: Implementation is correct; no pagination support available for socialProfiles endpoint.The Hootsuite API's socialProfiles endpoint returns social profiles for the authenticated member via a simple GET request to https://platform.hootsuite.com/v1/socialProfiles. The documented example shows no pagination parameters, confirming that the endpoint returns all available profiles in a single response. The current implementation is appropriate and complete.
components/hootsuite/actions/list-social-profiles/list-social-profiles.mjs
Show resolved
Hide resolved
michelle0927
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.
Ready for QA!
|
Hi everyone, all test cases are passed! Ready for release! Test reports
|
About this Pull Request
This PR implements the requested
List Social Profilesaction for the Hootsuite component (closes #19083).This action allows users to quickly retrieve all social profile IDs associated with their authenticated Hootsuite account.
Technical Implementation Details
GET /socialProfilesendpoint.axioswrapper to ensure secure communication.WHY
This action serves as a necessary prerequisite and foundational step for subsequent Hootsuite actions (such as scheduling or sending messages), which require a list of valid profile IDs to operate.
Summary by CodeRabbit
New Features
Chores