-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Confluence - Search Content #16207
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 - Search Content #16207
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
WalkthroughA new Confluence search action has been introduced. The module defines an action with a unique key ( Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ActionModule as confluence-search-content
participant API as Confluence API
User->>ActionModule: Initiate search with CQL query
ActionModule->>API: Call searchContent(cloudId, query, options)
API-->>ActionModule: Return paginated search results
ActionModule->>ActionModule: Aggregate results through pagination
ActionModule-->>User: Return summary of search results
Assessment against linked issues
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
components/confluence/actions/search-content/search-content.mjsOops! Something went wrong! :( ESLint: 8.57.1 Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'jsonc-eslint-parser' imported from /eslint.config.mjs ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (2)
components/confluence/actions/search-content/search-content.mjs (2)
34-48: Consider adding error handling for the API request.While the pagination implementation looks good, consider adding explicit error handling for API failures or invalid CQL queries to provide more helpful error messages to users.
async run({ $ }) { const cloudId = await this.confluence.getCloudId({ $, }); + + try { const items = this.confluence.paginate({ resourceFn: this.searchContent, args: { $, cloudId, params: { cql: this.cql, }, }, max: this.maxResults, }); + } catch (error) { + throw new Error(`Error searching Confluence content: ${error.message}`); + }
1-61: Consider adding example CQL queries in the description.To improve user experience, consider adding a few common CQL query examples in the description or as default/placeholder text for the CQL property.
cql: { type: "string", label: "CQL", description: "The CQL query to be used for the search. See [Advanced Searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) for instructions on how to build a CQL query.", + placeholder: "Example: type = \"page\" AND space = \"DEV\" AND text ~ \"api\"", },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
components/confluence/actions/search-content/search-content.mjs(1 hunks)components/confluence/package.json(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
- GitHub Check: Publish TypeScript components
- GitHub Check: pnpm publish
- GitHub Check: Verify TypeScript components
🔇 Additional comments (6)
components/confluence/package.json (2)
3-3: Version update looks appropriate.The version bump from 0.0.2 to 0.1.0 follows semantic versioning principles, correctly reflecting the addition of new functionality (search content) without breaking changes.
16-16:❓ Verification inconclusive
Significant platform dependency upgrade.
Upgrading from
@pipedream/platform^1.6.0 to ^3.0.3 is a major version jump. Ensure all component functionality has been tested with this new platform version to verify compatibility.
🏁 Script executed:
#!/bin/bash # Check if other Confluence components might be affected by the platform update find components/confluence -type f -name "*.mjs" -not -path "*/actions/search-content/*" | xargs grep -l "@pipedream/platform" || echo "No other files directly import @pipedream/platform"Length of output: 271
Major Dependency Upgrade: Verify All Impacted Files
Upgrading
@pipedream/platformfrom ^1.6.0 to ^3.0.3 is a significant change. In addition to the update reflected incomponents/confluence/package.json(line 16), our investigation shows that the following files also import this dependency:
components/confluence/actions/update-post/update-post.mjscomponents/confluence/confluence.app.mjscomponents/confluence/sources/common/base.mjsPlease ensure that all component functionality—especially in the files listed above—has been thoroughly tested for compatibility with the new platform version.
components/confluence/actions/search-content/search-content.mjs (4)
3-8: Action metadata looks good.The action definition includes all necessary metadata with a descriptive name, clear description with documentation link, and appropriate versioning (0.0.1) for a new action.
9-23: Props are well-defined with descriptive labels and documentation.The props include:
- Confluence app instance reference
- CQL property with helpful documentation link
- Optional maxResults property with a sensible default (100)
All props have appropriate types, labels, and descriptions.
24-33: API request method is properly structured.The searchContent method is well-implemented, taking the cloudId and additional options and using the app's _makeRequest method to make the API call.
50-59: Results collection and summary output look good.The code correctly:
- Collects all results into an array
- Handles singular/plural text in the summary message
- Returns the complete result set
The use of
for awaitwith the paginated results is appropriate for handling async iteration.
Resolves #16171
Summary by CodeRabbit
New Features
Chores