Skip to content

Commit

Permalink
refactor(pr-review-club): follow existing schema
Browse files Browse the repository at this point in the history
Use the `number` field instead of `issue` to refer to the
number of the related pull request. This follows the same
schema used for github metadata
  • Loading branch information
kouloumos committed Dec 23, 2024
1 parent fa2fa03 commit 22f5b89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions scraper/models/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class BitcoinTranscriptDocument(ScrapedDocument):


class PRReviewClubDocument(ScrapedDocument):
issue: Optional[int] = Field(
number: Optional[int] = Field(
default_factory=None,
description="Bitcoin Core issue number associated with the meeting",
description="Bitcoin Core PR number associated with the meeting",
)
host: Optional[str] = Field(
default=None, description="The person hosting the meeting"
Expand Down
4 changes: 2 additions & 2 deletions scraper/scrapers/pr_review_club.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ def customize_document(
For Bitcoin Core PRs, uses PR number and metadata.
For other content, identifies topics from filename.
"""
document_data["issue"] = metadata.get("pr", None)
document_data["number"] = metadata.get("pr", None)
document_data["host"] = metadata.get("host", [])
document_data["tags"] = metadata.get("components", []) or []

# If no PR number exists, this is not a Bitcoin Core PR review
if not document_data["issue"]:
if not document_data["number"]:
# Extract title from filename
title = self._extract_title_from_jekyll_filename(file_path)

Expand Down

0 comments on commit 22f5b89

Please sign in to comment.