Skip to content

Feat/data connectors#90

Merged
preet-bhadra merged 8 commits intomainfrom
feat/data-connectors
Jan 17, 2025
Merged

Feat/data connectors#90
preet-bhadra merged 8 commits intomainfrom
feat/data-connectors

Conversation

@preet-bhadra
Copy link
Copy Markdown
Collaborator

@preet-bhadra preet-bhadra commented Jan 16, 2025

Important

Add GitHub and YouTube data connectors, update configurations, and dependencies.

  • New Features:
    • Add GitHubListPullRequestsNode in github_list_pull_requests.py to fetch pull requests from a specified GitHub repository.
    • Add YouTubeTranscriptNode in youtube_transcript.py to fetch transcripts from a specified YouTube video.
  • Configuration:
    • Add GITHUB_ACCESS_TOKEN to .env.example for GitHub OAuth configuration.
  • Node Types:
    • Register GitHubListPullRequestsNode and YouTubeTranscriptNode in node_types.py.
  • Dependencies:
    • Add phidata==2.7.8, youtube_transcript_api==0.6.3, and PyGithub==2.5.0 to requirements.txt.
  • API Changes:
    • Add StoreGoogleAccessTokenResponse and GoogleAccessTokenValidationResponse interfaces in api.ts.

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

Update the return type of the validateGoogleAccessToken function to be a Promise of GoogleAccessTokenValidationResponse interface. This ensures that the function returns the expected response format.
This commit adds a new file, `youtube_transcript.py`, which contains the implementation of the `YouTubeTranscriptNode` class. This class is responsible for fetching the transcript of a YouTube video based on the provided video URL.

Additionally, the commit includes updates to the `requirements.txt` file to add the necessary dependencies: `phidata`, `youtube_transcript_api`.
- Update .env.example to include a comment explaining how to use the GITHUB_ACCESS_TOKEN environment variable for GitHub OAuth configuration.
- Add a new file, backend/app/nodes/integrations/github_list_pull_requests.py, which contains the implementation of the GitHubListPullRequestsNode.
- Update backend/app/nodes/node_types.py to include the GitHubListPullRequestsNode in the list of supported node types.
Copy link
Copy Markdown
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.

❌ Changes requested. Reviewed everything up to 87a6f5a in 1 minute and 51 seconds

More details
  • Looked at 187 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. backend/app/nodes/integrations/youtube_transcript.py:12
  • Draft comment:
    Ensure that the transcript field is correctly typed. If the transcript is structured or has multiple parts, consider using a list or another structured type instead of a string.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The YouTubeTranscriptNodeOutput class is using a string type for transcript, which might be correct if the transcript is a single string. However, if the transcript is structured or has multiple parts, a different type might be more appropriate.
2. backend/app/nodes/integrations/youtube_transcript.py:31
  • Draft comment:
    Consider handling specific exceptions instead of a generic Exception to provide more meaningful error messages and better debugging information.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_SJxbeOfmYQOBA897


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Comment thread backend/app/nodes/integrations/github_list_pull_requests.py
Comment thread backend/app/nodes/integrations/github_list_pull_requests.py Outdated
Comment thread backend/app/nodes/integrations/github_list_pull_requests.py Outdated
Comment thread frontend/src/utils/api.ts
Copy link
Copy Markdown
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.

❌ Changes requested. Incremental review on 7c39c7b in 51 seconds

More details
  • Looked at 44 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. backend/app/nodes/integrations/youtube_transcript.py:34
  • Draft comment:
    Returning an empty string on error can lead to confusion. Consider returning None or raising a custom exception to better handle errors.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_Vb6IAH8vtQFRn01v


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

return GitHubListPullRequestsNodeOutput(pull_requests=pull_requests)
except Exception as e:
logging.error(f"Failed to get pull requests: {e}")
return GitHubListPullRequestsNodeOutput(pull_requests="")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Returning an empty string on error can lead to confusion. Consider returning None or raising a custom exception to better handle errors.

@preet-bhadra preet-bhadra merged commit 7087be5 into main Jan 17, 2025
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