Skip to content

Add autonomous blog post generation, review, and publishing pipeline#1

Closed
ucguy4u with Copilot wants to merge 2 commits into
mainfrom
copilot/generate-review-publish-blog-posts
Closed

Add autonomous blog post generation, review, and publishing pipeline#1
ucguy4u with Copilot wants to merge 2 commits into
mainfrom
copilot/generate-review-publish-blog-posts

Conversation

Copilot AI commented Apr 4, 2026

Copy link
Copy Markdown

BrewPress needed an end-to-end pipeline to transform merged GitHub PRs into published DevelopersCoffee blog posts with a human review gate in between.

Pipeline

PR merged → AI draft generated → review PR opened → editor merges → post published

Changes

Scripts (scripts/)

  • generate_post.py — fetches PR metadata (title, body, commits, file diff) via PyGithub, calls an OpenAI-compatible model, parses structured AI output into a YAML front-matter markdown file saved to posts/drafts/
  • publish_post.py — finds all drafts, flips draft: true → false, stamps published_date, moves files to posts/published/
  • requirements.txtopenai>=1.0.0, PyGithub>=2.0.0

Workflows (.github/workflows/)

  • generate-blog-post.yml — triggers on pull_request: closed (merged) to main or workflow_dispatch (manual, accepts pr_number + optional source_repo); runs generation, commits draft to a blog-draft/* branch, opens a labeled review PR
  • publish-blog-post.yml — triggers when a blog-draft/* PR is merged; runs publish script, commits the moved post back to main

Post format

Each draft is a markdown file with YAML front-matter:

---
title: "How We Rewrote Our Cache Layer"
date: 2026-04-04
author: "devuser"
tags: ["redis", "performance", "backend"]
summary: "One-sentence SEO description"
source_pr: 42
source_repo: "DevelopersCoffee/api"
draft: true
---

Credential precedence

OPENAI_API_KEYGITHUB_MODELS_TOKENGITHUB_TOKEN (GitHub Models endpoint fallback). Model overrideable via AI_MODEL repository variable (default: gpt-4o).

Original prompt

Generate, review, and publish DevelopersCoffee blog posts from real engineering work

Copilot AI changed the title [WIP] Add process for generating and publishing DevelopersCoffee blog posts Add autonomous blog post generation, review, and publishing pipeline Apr 4, 2026
Copilot AI requested a review from ucguy4u April 4, 2026 17:30
@ucguy4u

ucguy4u commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Closing in favor of the BrewPress CLI architecture implemented in PRs #2 and #3. This Copilot-generated pipeline (OpenAI + flat markdown files) conflicts with our Gemini-based CLI + WP REST API design. The functionality is fully covered by brewpress draft and brewpress approve-publish.

@ucguy4u ucguy4u closed this Apr 5, 2026
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.

2 participants