Skip to content

Conversation

@tushar-composio
Copy link

@tushar-composio tushar-composio commented Nov 21, 2024

Allows doing:

$ composio add linear --auth-mode oauth2

Previously this would error saying Expected {"API_KEY", "OAUTH2"}. Works now.


Important

Fixes case sensitivity for --auth-mode in composio add by converting input to uppercase, allowing lowercase inputs.

  • Behavior:
    • Fixes case sensitivity for --auth-mode in composio add by converting input to uppercase using str.upper in add.py.
    • Allows lowercase auth modes like oauth2 without error.
  • Testing:
    • Adds test_add_auth_mode_auto_uppercase in test_add.py to verify lowercase --auth-mode handling.

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

@vercel
Copy link

vercel bot commented Nov 21, 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 25, 2024 10:37am

Copy link

@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 e3283ff in 11 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/composio/cli/add.py:61
  • Draft comment:
    Using str.upper for the --auth-mode option ensures the input is automatically converted to uppercase, aligning with expected values. This is a good change.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The change to use str.upper as the type for the --auth-mode option is a good approach to ensure the input is automatically converted to uppercase. This aligns with the expected values for auth_mode.

Workflow ID: wflow_938crXRNOn3AMAW5


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

Copy link

@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 62a6321 in 19 seconds

More details
  • Looked at 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/tests/test_cli/test_add.py:28
  • Draft comment:
    The test description for test_add_github is incorrect. It should reflect that the test involves adding GitHub with authentication, not no-auth.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.

Workflow ID: wflow_I8FB0h5fPsXi6uFI


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

@github-actions
Copy link
Contributor

github-actions bot commented Nov 21, 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-11951418596/coverage/index.html

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

@shreysingla11
Copy link
Collaborator

Code Review Summary

The changes look good overall and improve the user experience by making the auth mode parameter case-insensitive. The implementation is solid and focused.

Positive Aspects

✅ Automatic uppercase conversion improves UX by making auth modes case-insensitive
✅ Added appropriate test case to verify the functionality
✅ Added metavar for better CLI help display

Suggestions for Improvement

  1. Documentation could be more explicit about the automatic uppercase conversion
  2. Test documentation could better describe what's being verified
  3. Consider maintaining test coverage for API key auth scenario

The changes are well-implemented and solve the issue effectively. The suggestions above are mainly about improving documentation and test coverage, but they're not blocking issues.

Copy link

@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 6d35b92 in 17 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/tests/test_cli/test_add.py:38
  • Draft comment:
    The test description should be more precise. Consider changing it to: Test 'composio add' with lowercase 'oauth2' for --auth-mode.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_NED4Q1uSBjK5tnoV


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

@tushar-composio tushar-composio merged commit 3816ce3 into master Dec 25, 2024
22 checks passed
@tushar-composio tushar-composio deleted the ENG-2508 branch December 25, 2024 10:43
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.

3 participants