DocumentLoader for GitHub (#5408)

# Creates GitHubLoader (#5257)

GitHubLoader is a DocumentLoader that loads issues and PRs from GitHub.

Fixes #5257

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
This commit is contained in:
UmerHA
2023-05-30 05:11:21 +02:00
committed by GitHub
parent 0b3e0dd1d2
commit 8259f9b7fa
5 changed files with 571 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
from langchain.document_loaders.github import GitHubIssuesLoader
def test_issues_load() -> None:
title = "DocumentLoader for GitHub"
loader = GitHubIssuesLoader(
repo="hwchase17/langchain", creator="UmerHA", state="all"
)
docs = loader.load()
titles = [d.metadata["title"] for d in docs]
assert title in titles
assert all(doc.metadata["creator"] == "UmerHA" for doc in docs)