Skip to content

Conversation

@ose0221
Copy link
Contributor

@ose0221 ose0221 commented Feb 8, 2026

🚀 PR 요약

목적이 무엇인가요? - 지우고 작성

✨ PR 상세 내용

어떤 부분이 어떻게 변경이 되었나요? - 지우고 작성

🚨 주의 사항

주의할 부분이 무엇인가요? - 지우고 작성

✅ 체크 리스트

  • 리뷰어 설정했나요?
  • Label 설정했나요?
  • 제목 양식 맞췄나요? (ex. feat: 기능 추가)
  • 변경 사항에 대한 테스트를 진행했나요?

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced metadata extraction reliability for article images and content
    • Improved HTTP request handling with increased timeout and additional headers
    • Strengthened error handling for missing article metadata

@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

Modified article metadata extraction adapter to increase HTTP request timeout from 5000 to 8000 milliseconds, add referrer and Accept-Language headers, and refactor meta content extraction to differentiate absolute URL handling for specific metadata fields like og:image.

Changes

Cohort / File(s) Summary
Article Metadata Extraction
infrastructure/src/main/java/com/pinback/infrastructure/article/service/ArticleMetadataAdapter.java
Increased HTTP timeout to 8000 ms, added referrer and Accept-Language headers to requests. Refactored extractMetaContent method to accept boolean parameter isUrl to handle absolute URL content extraction; og:image now uses abs:content attribute with fallback to content, while og:title uses content directly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With longer waits and headers sent,
Our metadata extraction's now more diligent,
Absolute URLs for images we now discern,
While titles stay humble—a lesson we learn.
Better timeouts, better headers, better care, 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description check ⚠️ Warning PR description contains only template placeholders without any substantive content about changes, purpose, or impact. Complete all sections with actual details: explain the refactoring purpose, describe specific changes to HTTP timeout and headers, document behavioral changes to extractMetaContent method, and confirm testing was performed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly indicates a refactoring of article metadata saving functionality, which directly corresponds to the actual changes made to ArticleMetadataAdapter.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
infrastructure/src/main/java/com/pinback/infrastructure/article/service/ArticleMetadataAdapter.java (1)

77-83: Avoid duplicate doc.select(selector) call when isUrl is true.

When isUrl is true, doc.select(selector) is evaluated twice (lines 79–80). Cache the selected element to avoid the redundant DOM traversal.

♻️ Proposed refactor
 private String extractMetaContent(Document doc, String selector, boolean isUrl) {
+    var element = doc.select(selector);
     if (isUrl) {
-        String absContent = doc.select(selector).attr("abs:content").trim();
-        return absContent.isEmpty() ? doc.select(selector).attr("content").trim() : absContent;
+        String absContent = element.attr("abs:content").trim();
+        return absContent.isEmpty() ? element.attr("content").trim() : absContent;
     }
-    return doc.select(selector).attr("content").trim();
+    return element.attr("content").trim();
 }

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ose0221 ose0221 merged commit 9516548 into main Feb 8, 2026
8 checks passed
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.

1 participant