Repository navigation
feat(hub): configure repository build workflows - #319
Merged
weastler merged 4 commits intoNov 20, 2026
Merged
Conversation
Read build workflow selection from the repository default branch for webhook imports and recovery, preserving legacy defaults and immutable Builds. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject symbolic-link configuration sources before GitHub dereferences their contents, and distinguish missing files from provider failures at a pinned revision. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Workflow-selection handling can leave builds permanently unfinished and miss screenshot recovery, while synchronous GitHub lookups risk exceeding the webhook acknowledgement deadline.
5 open issues
Reject ineligible workflow jobs before loading configuration · New Settle unfinished Builds when their workflow is deselected · New Track screenshot recovery completion per contributing run · New Avoid sequential provider reads in the webhook response path · New Upgrade pinned action before documenting the unsupported builds field · New
What changed in this PR
Enables Hub to import compatible Builds from repository-selected GitHub Actions workflows instead of only replica.yml.
Changes:
- Validates workflow selections from configuration pinned to the repository’s default-branch commit.
- Applies selections across webhook intake, import workers, and recovery discovery.
- Adds build-action compatibility, documentation, and regression coverage.
| File | Description |
|---|---|
hub/server/workers/github-recovery.test.ts |
Tests selection refresh between recovery polls. |
hub/server/utils/read-build-workflow-paths/index.ts |
Validates workflow paths and legacy defaults. |
hub/server/utils/read-build-workflow-paths/index.test.ts |
Covers valid selections and invalid configuration. |
hub/server/routes/api/github/webhooks/create-github-webhook-route-dependencies/index.ts |
Filters connected repositories’ workflow events by selection. |
hub/server/routes/api/github/webhooks/create-github-webhook-route-dependencies/index.db.test.ts |
Tests webhook selection and failure handling. |
hub/server/repositories/repository-access/find-connected-github-repository/index.ts |
Adds a connected-repository lookup. |
hub/server/integrations/github/create-github-actions-client/index.ts |
Reads pinned configuration and discovers selected workflows. |
hub/server/integrations/github/create-github-actions-client/index.test.ts |
Covers configuration reads, safety checks, and discovery. |
hub/server/index.ts |
Wires configuration reads into webhook handling. |
hub/server/domains/github-builds/prepare-github-workflow-run-build/index.ts |
Checks runs against selected workflow paths. |
hub/server/domains/github-builds/import-github-workflow-run/types.ts |
Extends the importer’s client contract. |
hub/server/domains/github-builds/import-github-workflow-run/index.ts |
Loads workflow selection before preparing imports. |
hub/server/domains/github-builds/import-github-workflow-run/index.db.test.ts |
Tests custom callers and shared Build behavior. |
hub/server/domains/github-builds/constants.ts |
Removes the fixed workflow-path constant. |
hub/docs/github-actions-builds.md |
Documents selection, compatibility, and recovery behavior. |
actions/build/scripts/validate-templates/index.test.mjs |
Tests build configuration acceptance and metadata exclusion. |
actions/build/scripts/validate-templates/index.mjs |
Validates builds without packaging it as template metadata. |
.github/extensions/replica-prototype/discover-hub/index.test.mjs |
Confirms Hub discovery tolerates build selection metadata. |
Review effort: Max (adaptive)
Keep provider reads out of webhook acknowledgements, stop deselected unfinished Builds, and recover screenshots per contributing run without changing dist ownership. Document compatible action pins. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Check the named foreign-key constraint and retained Build references instead of a PostgreSQL-version-specific SQLSTATE. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.


Why
Hub currently imports Builds only from
replica.yml. Repositories such as Mini-Foundry already publish through a different top-level workflow, so Hub ignores those runs even when they produce compatible artifacts.What changes
Repositories can select build workflows with
builds.workflowsin.github/replica.jsonon their actual default branch. Webhook imports and recovery use the same validated selection from a pinned default-branch commit. Explicit selections replace the legacy workflow; omitted configuration keeps it. Existing prototype branches need no configuration update.Hub rejects invalid or symbolic-link configuration instead of choosing another publisher. Existing Build ownership, artifact validation, and screenshot matching remain unchanged. The build action accepts the new field alongside Hub and template metadata without including it in packaged templates. The guide includes Mini-Foundry's
publish-proto.ymlcaller example.Live GitHub delivery and hosted Mini-Foundry publishing have not been verified. This change does not deploy Hub or activate downstream workflows.