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

[Improvement] improve github loader #984

Merged
merged 5 commits into from
Dec 1, 2023
Merged

[Improvement] improve github loader #984

merged 5 commits into from
Dec 1, 2023

Conversation

deven298
Copy link
Contributor

@deven298 deven298 commented Dec 1, 2023

Description

This PR adds functionality to load issues and PR from github repos.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

  • Unit Test
  • Test Script (check docs)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@deven298 deven298 requested a review from deshraj December 1, 2023 04:27
Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 138 lines in your changes are missing coverage. Please review.

Comparison is base (406c46e) 65.13% compared to head (af222f0) 64.34%.
Report is 1 commits behind head on main.

Files Patch % Lines
embedchain/loaders/github.py 15.43% 137 Missing ⚠️
embedchain/loaders/discord.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #984      +/-   ##
==========================================
- Coverage   65.13%   64.34%   -0.79%     
==========================================
  Files         118      118              
  Lines        4302     4406     +104     
==========================================
+ Hits         2802     2835      +33     
- Misses       1500     1571      +71     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

}
data.append(
{
"content": clean_string(content),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this going to strip the new lines?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure if this is still needed but feel free to change in the follow up PR.

Copy link
Collaborator

@deshraj deshraj 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 generally. Left some minor comments.

@deshraj
Copy link
Collaborator

deshraj commented Dec 1, 2023

@deven298 I am a bit confused with the type as code and repo. What is the difference between these two? We should clarify this in the documentation.

@deshraj deshraj closed this Dec 1, 2023
@deshraj deshraj reopened this Dec 1, 2023
@deshraj
Copy link
Collaborator

deshraj commented Dec 1, 2023

Sorry, closed the pull request by mistake.

@deven298
Copy link
Contributor Author

deven298 commented Dec 1, 2023

@deshraj code type is for searching code and repo is for searching repos on github. For code search query is lexically searched through all the files in the repo, while repo will only give us repo names and details.

@deven298 deven298 requested a review from deshraj December 1, 2023 16:36
@deshraj deshraj merged commit 36af1a7 into main Dec 1, 2023
3 of 5 checks passed
@deshraj deshraj deleted the improve/github_loader branch December 1, 2023 19:24
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