Skip to content

feat: implement GitHub webhook receiver and TemplateUpdateService to … - #96

Merged
Sourodip-1 merged 1 commit into
mainfrom
Local-Development
Aug 18, 2026
Merged

Sourodip-1 merged 1 commit into
mainfrom
Local-Development

Conversation

@Sourodip-1

Copy link
Copy Markdown
Collaborator

…propagate template changes to user repositories

…propagate template changes to user repositories
Copilot AI lite review requested due to automatic review settings August 18, 2026 12:03
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
postpipe-2-0 Ready Ready Preview Aug 18, 2026 12:03pm

@Sourodip-1
Sourodip-1 merged commit 334325a into main Aug 18, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the template propagation pipeline so that template updates can be propagated based on the actual template repository owner and default branch coming from a GitHub push webhook, rather than assuming a fixed owner/branch.

Changes:

  • Extended TemplateUpdateService.propagateUpdate to accept templateOwner and templateBranch, and updated GitHub API calls accordingly.
  • Updated the GitHub webhook handler to derive the template repo owner and default branch from the push payload and pass them into propagation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/lib/services/TemplateUpdateService.ts Adds optional templateOwner/templateBranch parameters and uses them for template repo GitHub API requests.
src/app/api/github/webhooks/route.ts Extracts repository owner/default branch from webhook payload and forwards them to the template propagation service.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

* Propagates a template update to all generated repositories of a specific type.
*/
static async propagateUpdate(type: string, newVersion: string) {
static async propagateUpdate(type: string, newVersion: string, templateOwner: string = 'PostPipe', templateBranch: string = 'main') {
Comment on lines +43 to 45
const repoOwner = payload.repository?.owner?.login || payload.repository?.owner?.name || 'PostPipe';
const repoName = payload.repository?.name;
let templateType: string | null = null;

This branch was successfully deployed

1 active deployment
Preview — ebd1a059 Deployed Aug 18, 2026 by vercel[bot]
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