Skip to content
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

fix: Added missing params for add cli command #977

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Conversation

plxity
Copy link
Contributor

@plxity plxity commented Dec 10, 2024

Important

Enhances add CLI command with new options and refactors integration and connection handling in add.ts.

  • CLI Options:
    • Added -n, --no-browser to prevent browser opening for connection verification.
    • Added -i, --integration-id <id> to specify an existing integration ID.
    • Added -a, --auth-mode <mode> to specify authentication mode.
    • Added -s, --scope <scope> to specify connection scopes.
    • Added -l, --label <label> for connected account labels.
  • Integration Handling:
    • Modified handleAction() to use integrationId if provided, otherwise list integrations.
    • Refactored createIntegration() to handle different auth modes and schemes.
    • Added handleBasicAuth() and handleOAuth() for specific auth handling.
  • Connection Setup:
    • Updated setupConnections() to handle scope and label options.
    • Improved connection status checks and user prompts in shouldForceConnectionSetup().

This description was created by Ellipsis for 1de5933. It will automatically update as commits are pushed.

Copy link

vercel bot commented Dec 10, 2024

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

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 0:46am

@plxity plxity changed the title fix: added missing params for add cli command fix: Added missing params for add cli command Dec 10, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 2e4b647 in 1 minute and 59 seconds

More details
  • Looked at 346 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. js/src/cli/add.ts:130
  • Draft comment:
    Consider defining a specific type for the options parameter instead of using any to improve type safety and code readability.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. js/src/cli/add.ts:176
  • Draft comment:
    Consider defining a specific type for the options parameter instead of using any to improve type safety and code readability.
  • Reason this comment was not posted:
    Marked as duplicate.
3. js/src/cli/add.ts:97
  • Draft comment:
    Avoid using process.exit(0) directly. Consider returning a value or throwing an error and handling the exit at a higher level for better testability and maintainability.
  • Reason this comment was not posted:
    Comment was on unchanged code.
4. js/src/cli/add.ts:161
  • Draft comment:
    Avoid using process.exit(0) directly. Consider returning a value or throwing an error and handling the exit at a higher level for better testability and maintainability.
  • Reason this comment was not posted:
    Marked as duplicate.
5. js/src/cli/add.ts:172
  • Draft comment:
    Avoid using process.exit(0) directly. Consider returning a value or throwing an error and handling the exit at a higher level for better testability and maintainability.
  • Reason this comment was not posted:
    Marked as duplicate.
6. js/src/cli/add.ts:184
  • Draft comment:
    Avoid using process.exit(0) directly. Consider returning a value or throwing an error and handling the exit at a higher level for better testability and maintainability.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_tdyripdUJhqCNzcx


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 1de5933 in 33 seconds

More details
  • Looked at 362 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. js/src/cli/add.ts:219
  • Draft comment:
    Consider providing a default value for options to avoid potential runtime errors when accessing its properties.
    options: any = {}
  • Reason this comment was not posted:
    Comment was on unchanged code.
2. js/src/cli/add.ts:298
  • Draft comment:
    Consider refactoring handleBasicAuth and handleOAuth to reduce code duplication, especially in how they call setupIntegration.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The handleBasicAuth and handleOAuth methods are very similar in structure, especially in how they call setupIntegration. This could be refactored to reduce code duplication.
3. js/src/cli/add.ts:376
  • Draft comment:
    Consider unifying displayName and display_name to a single naming convention to avoid confusion and potential errors.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The collectInputFields function uses both displayName and display_name for field names. This could be unified to avoid confusion and potential errors.

Workflow ID: wflow_7uRh75bmPjixy0MQ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Dec 10, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-12256397852/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-12256397852/html-report/report.html

@plxity plxity merged commit 9fb021a into master Dec 10, 2024
13 checks passed
@plxity plxity deleted the fix-cli-parity branch December 10, 2024 13:04
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.

2 participants