mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
8259f9b7fa
# 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>
13 lines
413 B
Python
13 lines
413 B
Python
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)
|