-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Confluence adjustments #19226
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
Confluence adjustments #19226
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
WalkthroughAdds 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)components/confluence/actions/get-page-by-id/get-page-by-id.mjs (2)
⏰ 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)
🔇 Additional comments (2)
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 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 appropriateUpdating the Confluence components package to
0.4.0is consistent with the new action and utility additions.components/confluence/common/constants.mjs (1)
1-13: Centralizingbody-formatoptions is clean and matches requirements
BODY_FORMAT_OPTIONS/BODY_FORMAT_FULL_OPTIONScapture 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 constantsImporting
BODY_FORMAT_OPTIONSand wiring it into thebodyFormatprop 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 surfaceUsing explicit string keys (including
"body-format"instead ofbodyFormat, 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 abodyFormatlikeatlas_doc_formatto confirm thebodyrepresentation 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 matchesget-pagesbehaviorSwitching to explicit string keys (
"sort","status","title","body-format","cursor","limit") keeps this action consistent withget-pagesand should align with the API’s query parameter names; this should ensurebody-formatis 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 restorationThe review identifies a legitimate concern:
subTypewas removed from this action between v0.0.2 and v0.0.3. The prop definition exists inconfluence.app.mjs(with options["live", "page"]), and the similarget-pagesaction 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}/pagesactually supports thesubtypequery 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
subtypefilter 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 behaviorThe additions here (full
bodyFormatsupport viaBODY_FORMAT_FULL_OPTIONS,getDraft,status,version, and JSON-parsedadditionalOptions) 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:
statusis astring[]; verify that the underlying request layer serializes this into the form Confluence expects for multi-valuedstatusfilters....parseObjectEntries(this.additionalOptions)comes last, so any overlapping keys (e.g.,"body-format"or"status") inadditionalOptionswill override the explicit props; confirm this override behavior is intentional.Also applies to: 9-10, 24-64, 74-80
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
♻️ Duplicate comments (1)
components/confluence/common/utils.mjs (1)
20-27: Minor readability nit: avoid innervalueshadowing outer helper paramInside the
Object.entriesmap, the destructuredvaluename shadows thevalueparameter ofoptionalParseAsJSON. 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
📒 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 solidThe JSON-aware parsing, error handling with
ConfigurationError, and normalization viaparseObjectEntriesall 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>
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/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 APIThe new props look well thought through and map cleanly onto the Confluence v2 query parameters:
bodyFormatnow reuses the app-levelbodyFormatprop viapropDefinition, which addresses the earlier concern about duplicating that config.getDraftmirrors theget-draftboolean flag and defaults tofalse, which is consistent with the API semantics.statusasstring[]with options likecurrent,archived,trashed,draft, etc., matches how the v2 API modelsstatusas an array of strings; just ensure this option list stays in sync with what Confluence actually accepts and with the other actions that exposestatus.versionas an integer lines up with theversionquery param that retrieves a previous published version.additionalOptionsplus the JSON-aware parsing gives advanced users access toinclude-*flags and any future query params without another code change, which is a nice extensibility point.I’d only suggest confirming that the shared
bodyFormatprop inconfluence.app.mjsexposes 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 possiblyeditorif/when that’s fully supported by Atlassian), so that this action doesn’t unnecessarily constrain validbody-formatvalues compared to the API docs. (developer.atlassian.com)
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.
Approved!
Closes #19217
Closes #19219
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.