Skip to content

Conversation

@GTFalcao
Copy link
Collaborator

@GTFalcao GTFalcao commented Nov 25, 2025

Closes #19217
Closes #19219

Summary by CodeRabbit

  • New Features

    • Get Page by ID: add options for body format, draft retrieval, status filter, version selection, and custom additional options (supports JSON values).
    • Expanded body format choices for page-related actions.
    • Added JSON-aware utility to parse additional options.
  • Chores

    • Removed subType parameter from page-listing actions.
    • Normalized request parameter keys for page-listing actions.
    • Multiple action and package version bumps (metadata only).

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

@vercel
Copy link

vercel bot commented Nov 25, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
pipedream-docs Ignored Ignored Nov 25, 2025 7:33pm
pipedream-docs-redirect-do-not-edit Ignored Ignored Nov 25, 2025 7:33pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

Adds body-format constants and a JSON-aware parsing utility; extends Get Page by ID action to accept body-format, get-draft, status, version, and additionalOptions; normalizes API parameter keys in Get Pages and Get Pages in Space; updates app prop to use constants and bumps multiple versions.

Changes

Cohort / File(s) Summary
Constants & Utils
components/confluence/common/constants.mjs, components/confluence/common/utils.mjs
Adds BODY_FORMAT_OPTIONS and BODY_FORMAT_FULL_OPTIONS. Adds parseObjectEntries(obj = {}) which accepts an object or JSON string, JSON-parses values when possible, and throws ConfigurationError on invalid JSON input.
Get Page by ID Action
components/confluence/actions/get-page-by-id/get-page-by-id.mjs
Version bumped 0.0.20.1.0. Adds public props: bodyFormat, getDraft, status, version, additionalOptions. Builds request params with "body-format", "get-draft", "status", "version" and merges parsed additionalOptions via parseObjectEntries.
Get Pages / Get Pages in Space Actions
components/confluence/actions/get-pages/get-pages.mjs, components/confluence/actions/get-pages-in-space/get-pages-in-space.mjs
Versions bumped to 0.0.3. Normalizes API request keys to hyphenated string keys (e.g., pageTitle"title", bodyFormat"body-format", subType"subtype"). Removes subType prop from Get Pages in Space.
App Definition & Package
components/confluence/confluence.app.mjs, components/confluence/package.json
Replaces hard-coded body format options with BODY_FORMAT_OPTIONS for the app prop. Bumps package version 0.3.00.4.0.
Version-only bumps
components/confluence/actions/create-page/create-page.mjs, components/confluence/actions/create-post/create-post.mjs, components/confluence/actions/delete-post/delete-post.mjs, components/confluence/actions/search-content/search-content.mjs, components/confluence/actions/update-post/update-post.mjs, components/confluence/sources/new-page-or-blog-post/new-page-or-blog-post.mjs, components/confluence/sources/watch-blog-posts/watch-blog-posts.mjs, components/confluence/sources/watch-pages/watch-pages.mjs
Incremental version updates across actions and sources; no functional changes beyond version metadata.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant Action as "Get Page by ID Action"
  participant Util as "parseObjectEntries"
  participant API as "Confluence API"

  Note over User,Action: invoke action with props (id, bodyFormat, getDraft, status, version, additionalOptions)
  User->>Action: run(props)
  Action->>Util: parseObjectEntries(additionalOptions)
  Util-->>Action: parsedOptions
  Action->>API: GET /wiki/rest/api/content/{id}\nparams: {"body-format": bodyFormat, "get-draft": getDraft, "status": status, "version": version, ...parsedOptions}
  API-->>Action: 200 OK (page payload)
  Action-->>User: return page response
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Inspect components/confluence/common/utils.mjs::parseObjectEntries for JSON parsing edge cases and proper ConfigurationError usage.
  • Verify hyphenated API parameter keys ("body-format", "get-draft", etc.) are consistent across get-pages, get-pages-in-space, and get-page-by-id.
  • Review removal of subType in get-pages-in-space for UI/prop compatibility and any external callers.
  • Confirm BODY_FORMAT_FULL_OPTIONS includes all intended Confluence formats and that confluence.app.mjs uses BODY_FORMAT_OPTIONS where expected.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only contains two issue closure references without providing any context about the changes, implementation details, or following the required template structure. Expand the description to include a 'WHY' section explaining the motivation for these changes and briefly summarize what was implemented.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Confluence adjustments' is vague and generic, using non-descriptive terminology that does not clearly convey the specific changes being made. Replace with a more specific title such as 'Add body-format support to Get Page by ID and fix Get Pages parameter names' to better reflect the main changes.
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR successfully implements all coding requirements: adds body-format support with full options to Get Page by ID [#19217], fixes the body-format parameter naming in both Get Pages and Get Pages in Space actions [#19219], and introduces shared constants and utilities.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issues: version bumps for affected actions maintain consistency, constants/utils are introduced to support the new functionality, and the Confluence app is updated to reference the new constants.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch confluence-adjustments

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13197e6 and 3ca2d5f.

📒 Files selected for processing (1)
  • components/confluence/actions/get-page-by-id/get-page-by-id.mjs (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/confluence/actions/get-page-by-id/get-page-by-id.mjs (2)
components/confluence/common/constants.mjs (2)
  • BODY_FORMAT_FULL_OPTIONS (6-13)
  • BODY_FORMAT_FULL_OPTIONS (6-13)
components/confluence/common/utils.mjs (1)
  • parseObjectEntries (15-33)
⏰ 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: Publish TypeScript components
  • GitHub Check: Verify TypeScript components
  • GitHub Check: Lint Code Base
🔇 Additional comments (2)
components/confluence/actions/get-page-by-id/get-page-by-id.mjs (2)

24-30: Good reuse of shared bodyFormat prop and expansion to full body formats

Hooking bodyFormat up via the app propDefinition and then overriding options with BODY_FORMAT_FULL_OPTIONS cleanly reuses the shared configuration while exposing all supported body representations for this endpoint. This also addresses the prior review asking to use the app’s bodyFormat prop.


9-9: New query props and params wiring match the v2 Get page by id capabilities

The version bump to 0.1.0, addition of getDraft, status, version, and additionalOptions props, and passing them through as "body-format", "get-draft", "status", and "version" (plus parsed additionalOptions) line up with the Confluence v2 GET /pages/{id} query surface and give callers access to include-* flags and other advanced options via additionalOptions + parseObjectEntries. This meets the linked issues’ goals for richer body-format handling and extra query parameters.

Also applies to: 31-64, 74-79


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

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8af1783 and 30cc379.

📒 Files selected for processing (7)
  • components/confluence/actions/get-page-by-id/get-page-by-id.mjs (3 hunks)
  • components/confluence/actions/get-pages-in-space/get-pages-in-space.mjs (2 hunks)
  • components/confluence/actions/get-pages/get-pages.mjs (2 hunks)
  • components/confluence/common/constants.mjs (1 hunks)
  • components/confluence/common/utils.mjs (1 hunks)
  • components/confluence/confluence.app.mjs (2 hunks)
  • components/confluence/package.json (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/confluence/confluence.app.mjs
🧬 Code graph analysis (1)
components/confluence/actions/get-page-by-id/get-page-by-id.mjs (2)
components/confluence/common/constants.mjs (2)
  • BODY_FORMAT_FULL_OPTIONS (6-13)
  • BODY_FORMAT_FULL_OPTIONS (6-13)
components/confluence/common/utils.mjs (1)
  • parseObjectEntries (11-29)
⏰ 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 (7)
components/confluence/package.json (1)

3-3: Version bump looks appropriate

Updating the Confluence components package to 0.4.0 is consistent with the new action and utility additions.

components/confluence/common/constants.mjs (1)

1-13: Centralizing body-format options is clean and matches requirements

BODY_FORMAT_OPTIONS / BODY_FORMAT_FULL_OPTIONS capture the documented body-format values and enable reuse across actions.

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

2-3: Body format prop now correctly reuses shared constants

Importing BODY_FORMAT_OPTIONS and wiring it into the bodyFormat prop avoids duplication and keeps options consistent with other actions.

Also applies to: 192-197

components/confluence/actions/get-pages/get-pages.mjs (1)

7-7: Query param names now align with the expected API surface

Using explicit string keys (including "body-format" instead of bodyFormat, and "title", "subtype", "cursor", "limit") should make the request payload match Confluence’s expected query parameters; this addresses the bug in #19219. Please smoke‑test the action with a bodyFormat like atlas_doc_format to confirm the body representation is returned as expected.

Also applies to: 67-73

components/confluence/actions/get-pages-in-space/get-pages-in-space.mjs (2)

7-7: Param key normalization matches get-pages behavior

Switching to explicit string keys ("sort", "status", "title", "body-format", "cursor", "limit") keeps this action consistent with get-pages and should align with the API’s query parameter names; this should ensure body-format is honored when listing pages in a space.

Also applies to: 68-73


14-58: Verify current API support and workflow usage for subtype parameter before deciding on restoration

The review identifies a legitimate concern: subType was removed from this action between v0.0.2 and v0.0.3. The prop definition exists in confluence.app.mjs (with options ["live", "page"]), and the similar get-pages action still uses it, suggesting workflows may depend on this filtering capability.

However, there's conflicting documentation about whether the Confluence Cloud REST API v2 endpoint GET /spaces/{id}/pages actually supports the subtype query parameter. One authoritative source states it's supported on both the generic pages endpoint and the space-scoped endpoint, while another official parameter reference for the space-scoped endpoint does not list it.

Additionally, the old implementation had a bug—it used "subType" (unquoted camelCase) as the parameter key instead of the correct "subtype" (lowercase quoted), which this PR fixed along with other parameter key formatting.

Action required: Verify whether existing workflows rely on the subtype filter for this action and confirm the current API endpoint's actual support for the parameter before deciding whether to restore it.

components/confluence/actions/get-page-by-id/get-page-by-id.mjs (1)

2-3: Get Page by ID: new query options look correct; clarify override and status-array behavior

The additions here (full bodyFormat support via BODY_FORMAT_FULL_OPTIONS, getDraft, status, version, and JSON-parsed additionalOptions) line up with the desired API features and are mapped to appropriate query params ("body-format", "get-draft", "status", "version"), which should satisfy #19217. Two points to double‑check:

  • status is a string[]; verify that the underlying request layer serializes this into the form Confluence expects for multi-valued status filters.
  • ...parseObjectEntries(this.additionalOptions) comes last, so any overlapping keys (e.g., "body-format" or "status") in additionalOptions will override the explicit props; confirm this override behavior is intentional.

Also applies to: 9-10, 24-64, 74-80

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

♻️ Duplicate comments (1)
components/confluence/common/utils.mjs (1)

20-27: Minor readability nit: avoid inner value shadowing outer helper param

Inside the Object.entries map, the destructured value name shadows the value parameter of optionalParseAsJSON. It’s not incorrect, but slightly reduces clarity when scanning. Renaming the entry variable would make the flow a bit clearer, e.g.:

-  return Object.fromEntries(
-    Object.entries(obj || {}).map(([
-      key,
-      value,
-    ]) => [
-      key,
-      optionalParseAsJSON(value),
-    ]),
-  );
+  return Object.fromEntries(
+    Object.entries(obj || {}).map(([
+      key,
+      entryValue,
+    ]) => [
+      key,
+      optionalParseAsJSON(entryValue),
+    ]),
+  );
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 30cc379 and ccdd7c6.

📒 Files selected for processing (1)
  • components/confluence/common/utils.mjs (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-12T07:49:36.125Z
Learnt from: matyascimbulka
Repo: PipedreamHQ/pipedream PR: 18308
File: components/apify/actions/run-task-synchronously/run-task-synchronously.mjs:70-0
Timestamp: 2025-09-12T07:49:36.125Z
Learning: The Apify Task object always contains the `options` field according to the official API documentation, making nested destructuring like `options: { build }` safe to use without additional checks.

Applied to files:

  • components/confluence/common/utils.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: Publish TypeScript components
  • GitHub Check: Lint Code Base
  • GitHub Check: Verify TypeScript components
  • GitHub Check: pnpm publish
🔇 Additional comments (1)
components/confluence/common/utils.mjs (1)

1-29: Overall utility behavior looks solid

The JSON-aware parsing, error handling with ConfigurationError, and normalization via parseObjectEntries all look correct and align with the intended usage for Confluence request options. No blocking issues from a correctness or safety perspective.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a30be42 and 13197e6.

📒 Files selected for processing (1)
  • components/confluence/actions/get-page-by-id/get-page-by-id.mjs (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/confluence/actions/get-page-by-id/get-page-by-id.mjs (1)
components/confluence/common/utils.mjs (1)
  • parseObjectEntries (15-33)
⏰ 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: Lint Code Base
  • GitHub Check: Publish TypeScript components
  • GitHub Check: pnpm publish
  • GitHub Check: Verify TypeScript components
🔇 Additional comments (1)
components/confluence/actions/get-page-by-id/get-page-by-id.mjs (1)

23-62: Body / draft / status / version / additionalOptions props align well with the v2 Get page by id API

The new props look well thought through and map cleanly onto the Confluence v2 query parameters:

  • bodyFormat now reuses the app-level bodyFormat prop via propDefinition, which addresses the earlier concern about duplicating that config.
  • getDraft mirrors the get-draft boolean flag and defaults to false, which is consistent with the API semantics.
  • status as string[] with options like current, archived, trashed, draft, etc., matches how the v2 API models status as an array of strings; just ensure this option list stays in sync with what Confluence actually accepts and with the other actions that expose status.
  • version as an integer lines up with the version query param that retrieves a previous published version.
  • additionalOptions plus the JSON-aware parsing gives advanced users access to include-* flags and any future query params without another code change, which is a nice extensibility point.

I’d only suggest confirming that the shared bodyFormat prop in confluence.app.mjs exposes the full set of representations you intend to support for this endpoint (e.g., storage, atlas_doc_format, view, export_view, anonymous_export_view, styled_view, and possibly editor if/when that’s fully supported by Atlassian), so that this action doesn’t unnecessarily constrain valid body-format values compared to the API docs. (developer.atlassian.com)

michelle0927
michelle0927 previously approved these changes Nov 25, 2025
Copy link
Collaborator

@michelle0927 michelle0927 left a comment

Choose a reason for hiding this comment

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

Approved!

@GTFalcao GTFalcao merged commit 64f3488 into master Nov 25, 2025
9 of 10 checks passed
@GTFalcao GTFalcao deleted the confluence-adjustments branch November 25, 2025 19:35
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.

[BUG] "Confluence - Get Pages" action passes incorrect body-format parameter name [ACTION] Add body-format to Confluence - Get Page by ID

3 participants