mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-14 05:56:40 +00:00
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:
12
tests/integration_tests/document_loaders/test_github.py
Normal file
12
tests/integration_tests/document_loaders/test_github.py
Normal 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)
|
Reference in New Issue
Block a user