Skip to content

Conversation

@tkalejaiye
Copy link
Contributor

@tkalejaiye tkalejaiye commented Jul 30, 2025

WHY

Resolves #17862

Summary by CodeRabbit

  • Chores
    • Updated version numbers for multiple Spotify actions, sources, and the Spotify package.
  • Style
    • Removed the label display from the playlist ID input field in the Spotify app.

@vercel
Copy link

vercel bot commented Jul 30, 2025

@tkalejaiye is attempting to deploy a commit to the Pipedreamers Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Jul 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
pipedream-docs-redirect-do-not-edit ⬜️ Ignored (Inspect) Jul 31, 2025 9:28am

@adolfo-pd adolfo-pd added the User submitted Submitted by a user label Jul 30, 2025
@pipedream-component-development
Copy link
Collaborator

Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.

@pipedream-component-development
Copy link
Collaborator

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:

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 30, 2025

Walkthrough

This change updates the version numbers of multiple Spotify action modules and the package manifest. Additionally, it modifies the "Get Playlist" action to accept a direct playlist ID value, addressing an input issue. The Spotify app component also removes the withLabel property from the playlistId prop definition.

Changes

Cohort / File(s) Change Summary
Spotify Action Version Bumps
components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs, components/spotify/actions/create-playlist/create-playlist.mjs, components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs, components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs, components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs, components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs, components/spotify/actions/get-playlist-items/get-playlist-items.mjs, components/spotify/actions/get-recommendations/get-recommendations.mjs, components/spotify/actions/get-track/get-track.mjs, components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs, components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs, components/spotify/actions/save-track/save-track.mjs
Incremented version numbers in the default export objects of each Spotify action module.
Spotify Action Patch Version Bumps
components/spotify/actions/get-album-tracks/get-album-tracks.mjs, components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs
Incremented patch version numbers in the default export objects.
Get Playlist Action Logic Update
components/spotify/actions/get-playlist/get-playlist.mjs
Incremented version number and changed API call to use playlistId directly instead of playlistId.value.
Spotify App Prop Update
components/spotify/spotify.app.mjs
Removed withLabel: true from the playlistId prop definition.
Package Version Bump
components/spotify/package.json
Incremented package version from 0.7.2 to 0.7.3.
Spotify Source Version Bumps
components/spotify/sources/new-playlist/new-playlist.mjs, components/spotify/sources/new-saved-track/new-saved-track.mjs, components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs, components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs
Incremented version numbers in the default export objects of Spotify source components.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~6 minutes

Assessment against linked issues

Objective Addressed Explanation
Allow "Get Playlist" action to accept direct playlist ID (custom expression or variable) (#17862)

Poem

A hop and a skip, a version or two,
The Spotify actions are shiny and new!
Playlist IDs now flow with glee,
No more errors—just harmony.
With every bump, a rabbit’s cheer,
“Your music’s fixed—now lend me your ear!”
🐇🎶✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b4b15da and 4223404.

📒 Files selected for processing (5)
  • components/spotify/actions/get-playlist/get-playlist.mjs (2 hunks)
  • components/spotify/sources/new-playlist/new-playlist.mjs (1 hunks)
  • components/spotify/sources/new-saved-track/new-saved-track.mjs (1 hunks)
  • components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs (1 hunks)
  • components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • components/spotify/sources/new-playlist/new-playlist.mjs
  • components/spotify/sources/new-saved-track/new-saved-track.mjs
  • components/spotify/sources/new-track-in-playlist/new-track-in-playlist.mjs
  • components/spotify/sources/new-track-by-artist/new-track-by-artist.mjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/spotify/actions/get-playlist/get-playlist.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). (3)
  • GitHub Check: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
components/spotify/actions/get-track/get-track.mjs (1)

9-9: Version bump looks good – consider updating the component changelog as well

The patch-level increment to 0.1.2 is appropriate for a non-functional change. Ensure the repository’s global CHANGELOG (or per-package release notes) captures this bump so downstream consumers understand that no behavioral changes were introduced.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a5a1152 and b4b15da.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (17)
  • components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs (1 hunks)
  • components/spotify/actions/create-playlist/create-playlist.mjs (1 hunks)
  • components/spotify/actions/get-album-tracks/get-album-tracks.mjs (1 hunks)
  • components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs (1 hunks)
  • components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs (1 hunks)
  • components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs (1 hunks)
  • components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs (1 hunks)
  • components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs (1 hunks)
  • components/spotify/actions/get-playlist-items/get-playlist-items.mjs (1 hunks)
  • components/spotify/actions/get-playlist/get-playlist.mjs (2 hunks)
  • components/spotify/actions/get-recommendations/get-recommendations.mjs (1 hunks)
  • components/spotify/actions/get-track/get-track.mjs (1 hunks)
  • components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs (1 hunks)
  • components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs (1 hunks)
  • components/spotify/actions/save-track/save-track.mjs (1 hunks)
  • components/spotify/package.json (1 hunks)
  • components/spotify/spotify.app.mjs (0 hunks)
💤 Files with no reviewable changes (1)
  • components/spotify/spotify.app.mjs
🧰 Additional context used
🧠 Learnings (3)
components/spotify/actions/create-playlist/create-playlist.mjs (1)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

components/spotify/actions/save-track/save-track.mjs (2)

Learnt from: jcortes
PR: #14467
File: components/gainsight_px/actions/create-account/create-account.mjs:4-6
Timestamp: 2024-10-30T15:24:39.294Z
Learning: In components/gainsight_px/actions/create-account/create-account.mjs, the action name should be "Create Account" instead of "Create Memory".

Learnt from: GTFalcao
PR: #14265
File: components/the_magic_drip/sources/common.mjs:35-43
Timestamp: 2024-10-10T19:18:27.998Z
Learning: In components/the_magic_drip/sources/common.mjs, when processing items in getAndProcessData, savedIds is intentionally updated with IDs of both emitted and non-emitted items to avoid emitting retroactive events upon first deployment and ensure only new events are emitted as they occur.

components/spotify/package.json (1)

Learnt from: jcortes
PR: #14935
File: components/sailpoint/package.json:15-18
Timestamp: 2024-12-12T19:23:09.039Z
Learning: When developing Pipedream components, do not add built-in Node.js modules like fs to package.json dependencies, as they are native modules provided by the Node.js runtime.

⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Lint Code Base
🔇 Additional comments (15)
components/spotify/actions/remove-items-from-playlist/remove-items-from-playlist.mjs (1)

9-9: Patch version increment acknowledged

No logic changes detected; 0.1.2 correctly signals an internal update. Just double-check that any automated publishing pipeline will pick up this new version.

components/spotify/actions/save-track/save-track.mjs (1)

9-9: Consistent versioning maintained

The file follows the same patch bump pattern as the other actions – good for keeping the bundle in sync.

components/spotify/actions/get-album-tracks/get-album-tracks.mjs (1)

10-10: Minor version bump observed

Since this action was still at 0.0.x, moving to 0.0.2 is fine for a metadata-only edit. No further action needed.

components/spotify/actions/create-playlist/create-playlist.mjs (1)

8-8: Version bump aligns with the rest of the suite

Everything stays in lockstep at 0.1.2. 👍

components/spotify/actions/get-audio-features-for-a-track/get-audio-features-for-a-track.mjs (1)

9-9: Patch-level version bump looks fine
No functional code touched; patch increment is appropriate.

components/spotify/actions/get-currently-playing-track/get-currently-playing-track.mjs (1)

10-10: Version updated to 0.0.2 – OK
Consistent with other modules; no further action required.

components/spotify/actions/add-items-to-playlist/add-items-to-playlist.mjs (1)

9-9: Version bump acknowledged
Patch release matches the coordinated package update.

components/spotify/actions/get-categorys-playlist/get-categorys-playlist.mjs (1)

9-9: Patch version increment confirmed
Change is metadata-only; implementation untouched.

components/spotify/actions/get-all-tracks-by-artist/get-all-tracks-by-artist.mjs (1)

8-8: Minor version bump accepted
Keeps action aligned with the rest of the Spotify package.

components/spotify/actions/get-artist-top-tracks/get-artist-top-tracks.mjs (1)

9-9: LGTM - Version bump is appropriate

The version increment from "0.1.1" to "0.1.2" is consistent with the package-wide version updates across all Spotify action components.

components/spotify/actions/get-playlist/get-playlist.mjs (1)

26-26: LGTM - Core bug fix addresses the issue

Passing playlistId directly instead of playlistId.value correctly allows the action to handle both async options (objects with value/label) and custom expressions/variables (primitive values). This should resolve the 400 Bad Request error described in issue #17862.

components/spotify/package.json (1)

3-3: LGTM - Package version bump follows semantic versioning

The version increment from "0.7.2" to "0.7.3" is appropriate for a patch release containing bug fixes and is consistent with the coordinated version updates across all Spotify action components.

components/spotify/actions/get-recommendations/get-recommendations.mjs (1)

8-8: LGTM - Version bump is consistent with package update

The version increment from "0.1.1" to "0.1.2" aligns with the coordinated version updates across all Spotify action components in this release.

components/spotify/actions/get-playlist-items/get-playlist-items.mjs (1)

9-9: LGTM - Version bump is appropriate

The version increment from "0.1.1" to "0.1.2" is consistent with the package-wide updates. Note that this file already correctly handles playlistId using the get(playlistId, "value", playlistId) pattern on lines 60 and 70, which is the same approach that should be applied to fix the summary export issue in get-playlist.mjs.

components/spotify/actions/remove-user-saved-tracks/remove-user-saved-tracks.mjs (1)

8-8: ✅ Version bump acknowledged and consistent

The increment to 0.1.2 aligns with the coordinated package update and follows semantic-versioning expectations. No further action required.

playlistId,
});

$.export("$summary", `The playlist with Id: ${playlistId.value} was successfully fetched!`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix inconsistent property access in summary export

The summary export still references playlistId.value, but since playlistId can now be a primitive value (when using custom expressions), this will cause a runtime error when .value is undefined.

Apply this diff to handle both object and primitive playlist ID values:

-    $.export("$summary", `The playlist with Id: ${playlistId.value} was successfully fetched!`);
+    $.export("$summary", `The playlist with Id: ${playlistId.value || playlistId} was successfully fetched!`);

Alternatively, use the same pattern as other Spotify actions with lodash:

+import get from "lodash/get.js";
+
 import spotify from "../../spotify.app.mjs";
-    $.export("$summary", `The playlist with Id: ${playlistId.value} was successfully fetched!`);
+    $.export("$summary", `The playlist with Id: ${get(playlistId, "value", playlistId)} was successfully fetched!`);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
$.export("$summary", `The playlist with Id: ${playlistId.value} was successfully fetched!`);
$.export("$summary", `The playlist with Id: ${playlistId.value || playlistId} was successfully fetched!`);
🤖 Prompt for AI Agents
In components/spotify/actions/get-playlist/get-playlist.mjs at line 29, the
summary export incorrectly accesses playlistId.value, which causes errors when
playlistId is a primitive. Update the code to safely handle both object and
primitive playlistId by checking if playlistId has a value property before
accessing it, or use lodash's get method as done in other Spotify actions to
retrieve the ID safely for the summary string.

@vunguyenhung
Copy link
Collaborator

Hi, thank you for your contribution.

There's another PR here https://github.com/PipedreamHQ/pipedream/pull/17895/files, which contains less changes. I would like to close this one in favor of the other one.

@vunguyenhung vunguyenhung merged commit 1968dec into PipedreamHQ:master Aug 1, 2025
10 of 11 checks passed
@tkalejaiye tkalejaiye deleted the fix-spotify-get-playlist branch August 2, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

User submitted Submitted by a user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Spotify Get Playlist Action doesn't work with custom expressions or variables

5 participants