Skip to content

Descript - Create Import URL#19698

Merged
michelle0927 merged 2 commits intomasterfrom
issue-19695
Jan 16, 2026
Merged

Descript - Create Import URL#19698
michelle0927 merged 2 commits intomasterfrom
issue-19695

Conversation

@michelle0927
Copy link
Copy Markdown
Collaborator

@michelle0927 michelle0927 commented Jan 14, 2026

Resolves #19695

Summary by CodeRabbit

  • New Features

    • Added "Create Import URL" action to generate Descript import URLs from asset information.
  • Updates

    • Bumped package version to 0.2.0.
    • Updated get-published-project-metadata action to version 0.0.2.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
pipedream-docs-redirect-do-not-edit Ignored Ignored Jan 14, 2026 4:42pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 14, 2026

Walkthrough

This pull request adds a new "Create Import URL" action to the Descript component. A new app method createImportUrl() is introduced to make POST requests to the Descript API endpoint, paired with a corresponding action module that structures asset parameters and orchestrates the URL creation workflow. Version numbers are incremented across the component.

Changes

Cohort / File(s) Summary
App method addition
components/_descript/_descript.app.mjs
Introduces new public method createImportUrl(opts = {}) that issues a POST request to /edit_in_descript/schema endpoint via the existing _makeRequest helper.
New action module
components/_descript/actions/create-import-url/create-import-url.mjs
Creates new "Create Import URL" action that accepts partnerDriveId, uri, sourceId, name, and startOffset props. Transforms startOffset to seconds, structures project_schema payload with schema_version and files metadata, then invokes the app's createImportUrl() method and returns the generated URL in a summary message.
Version updates
components/_descript/actions/get-published-project-metadata/get-published-project-metadata.mjs, components/_descript/package.json
Bumps version from 0.0.1 to 0.0.2 for get-published-project-metadata action and component package version from 0.1.0 to 0.2.0.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description is minimal, containing only 'Resolves #19695', which references the linked issue but does not populate the required template sections. Consider adding details in the WHY section of the template explaining the rationale, implementation approach, and testing performed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Descript - Create Import URL' accurately summarizes the main change: adding a new action to create import URLs for the Descript integration.
Linked Issues check ✅ Passed The changes fully implement the objective from issue #19695 to create a Descript import URL action, with new app method, action module, and proper API integration.
Out of Scope Changes check ✅ Passed All changes are scoped to the stated objective: new action implementation, supporting app method, version bumps, and package updates directly related to the feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@michelle0927 michelle0927 marked this pull request as ready for review January 14, 2026 16:43
Copy link
Copy Markdown
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: 2

🤖 Fix all issues with AI agents
In `@components/_descript/actions/create-import-url/create-import-url.mjs`:
- Around line 50-64: The payload currently includes undefined values
(project_schema.source_id, files[0].name, files[0].start_offset) which can
serialize to JSON as null/undefined; update the construction of project_schema
so optional properties are only added when present: only set source_id when
this.sourceId is truthy, only set files[0].name when this.name is truthy, and
only set files[0].start_offset when this.startOffset is provided (keep
files[0].uri required); implement this by building the project_schema and file
object incrementally or by filtering out undefined keys after creation (target
symbols: project_schema, source_id, files, name, uri, start_offset,
this.sourceId, this.name, this.startOffset).
- Around line 38-43: The startOffset property is declared as type "string" but
later parsed with parseFloat in run(), which can yield NaN; either change the
schema type to "integer" for startOffset to get built-in validation (and update
any usage in run() to treat it as a number) or keep it as "string" and add
explicit validation inside run() to coerce and validate the value (e.g., use
Number/parseInt, check isFinite/isNaN, clamp/convert to integer, and throw or
omit the field on invalid input); update references to startOffset and the run()
handler to handle the chosen behavior consistently.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b089a6f and f87a2a1.

📒 Files selected for processing (4)
  • components/_descript/_descript.app.mjs
  • components/_descript/actions/create-import-url/create-import-url.mjs
  • components/_descript/actions/get-published-project-metadata/get-published-project-metadata.mjs
  • components/_descript/package.json
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-07-01T17:07:48.193Z
Learnt from: js07
Repo: PipedreamHQ/pipedream PR: 17375
File: components/zerobounce/actions/get-validation-results-file/get-validation-results-file.mjs:23-27
Timestamp: 2025-07-01T17:07:48.193Z
Learning: "dir" props in Pipedream components are hidden in the component form and not user-facing, so they don't require labels or descriptions for user clarity.

Applied to files:

  • components/_descript/package.json
📚 Learning: 2024-12-12T19:23:09.039Z
Learnt from: jcortes
Repo: PipedreamHQ/pipedream 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.

Applied to files:

  • components/_descript/package.json
⏰ 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
🔇 Additional comments (4)
components/_descript/package.json (1)

3-3: LGTM!

The minor version bump from 0.1.0 to 0.2.0 is appropriate for adding the new createImportUrl feature.

components/_descript/_descript.app.mjs (1)

28-34: LGTM!

The new createImportUrl method follows the established pattern of the existing getPublishedProjectMetadata method and correctly targets the /edit_in_descript/schema endpoint as per the API documentation.

components/_descript/actions/get-published-project-metadata/get-published-project-metadata.mjs (1)

7-7: LGTM!

Version bump aligns with the package update.

components/_descript/actions/create-import-url/create-import-url.mjs (1)

68-69: No issue here. The Descript API documentation for the postEditInDescriptSchema endpoint confirms the response includes a url field, so accessing response.url on line 68 is safe and correct.

Likely an incorrect or invalid review comment.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link
Copy Markdown
Contributor

@luancazarine luancazarine left a 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!

@vunguyenhung
Copy link
Copy Markdown
Contributor

Hi everyone, all test cases are passed! Ready for release!

Test reports

@michelle0927 michelle0927 merged commit d586636 into master Jan 16, 2026
9 checks passed
@michelle0927 michelle0927 deleted the issue-19695 branch January 16, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ACTION] Descript - Create Import URL

3 participants