Repository navigation
feat: implement GitHub webhook receiver and TemplateUpdateService to … - #96
Merged
Merged
Conversation
…propagate template changes to user repositories
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.propagateUpdateto accepttemplateOwnerandtemplateBranch, 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…propagate template changes to user repositories