Skip to content

Adiciona fluxo de trabalho para gerar resumo semanal de notícias#44

Draft
cleissonbarbosa wants to merge 1 commit intomainfrom
feat/weekly-news
Draft

Adiciona fluxo de trabalho para gerar resumo semanal de notícias#44
cleissonbarbosa wants to merge 1 commit intomainfrom
feat/weekly-news

Conversation

@cleissonbarbosa
Copy link
Copy Markdown
Owner

This pull request introduces an automated workflow and supporting backend logic to generate a weekly news digest post using Gemini's Google Search grounding. The workflow is integrated into GitHub Actions, and the backend is extended to support content and image generation for the digest, as well as validation and automated merging of the generated post. The main highlights are the addition of a new workflow, backend service, use case, and CLI support for generating and publishing these weekly digests.

GitHub Actions Workflow Integration:

  • Added a new workflow .github/workflows/generate-weekly-digest.yml that automatically generates a weekly news digest post every Sunday, creates a pull request with the generated content and image, validates the format and image, and auto-merges the PR if validation passes.
  • Updated .github/workflows/pages-deploy.yml to trigger deployment after the new weekly digest workflow completes.

Backend: Digest Generation Support:

  • Implemented GeminiNewsDigestService in generate_post/adapters/api/gemini_news_digest_service.py to generate a weekly digest post using Gemini with Google Search grounding, including prompt creation, content generation, parsing, and source attribution.
  • Exposed GeminiNewsDigestService in the API adapter module for use in the application.
  • Added GenerateWeeklyDigestUseCase in generate_post/core/use_cases/generate_weekly_digest_use_case.py to orchestrate the generation, image creation, and saving of the weekly digest post.

CLI and Application Entry Point:

  • Updated the CLI handler to accept any use case conforming to a protocol, improving flexibility.
  • Extended generate_post/main.py to support a --weekly-digest flag, enabling digest generation from the command line, and to wire up the new use case and service accordingly. [1] [2] [3]

@cleissonbarbosa cleissonbarbosa self-assigned this Mar 27, 2026
@cleissonbarbosa cleissonbarbosa added the enhancement New feature or request label Mar 27, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new feature to generate a weekly news digest using the Gemini API with Google Search grounding. It includes a new service class, a corresponding use case, and updates to the CLI handler and main entry point to support a --weekly-digest flag. Feedback was provided regarding the use of potentially invalid model names, the unused parameter in the prompt creation method, and a suggestion to refactor the instantiation logic in the main entry point to reduce code duplication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant