Skip to content
This repository was archived by the owner on Jun 26, 2026. It is now read-only.

Fix: Create page owner preset, registry, and repo creation. - #19

Merged
twoGiants merged 2 commits into
masterfrom
018-create-page-fixes
May 3, 2026
Merged

twoGiants merged 2 commits into
masterfrom
018-create-page-fixes

Conversation

@twoGiants

@twoGiants twoGiants commented May 2, 2026 •

Copy link
Copy Markdown
Collaborator

Changes

  • 🐛 Fix owner field: preset from ForgeConnectionContext (disabled input) instead of empty editable field
  • 🐛 Fix registry field: preset to OCP internal registry and disabled
  • 🎁 Add repo creation to create flow: check existence, create with auto_init, rename branch if not main, add serverless-function topic, push files
  • 🧹 Extend ForgeConnectionProvider with ForgeUser state, wrap all pages with provider (OCP routes mount independently)
  • 🧹 Rename push to createRepo on SourceControlService interface
  • 🐛 Add error alert to list page when repo fetching fails
  • 🧹 Improve errorMessage to include HTTP status for Octokit errors
  • 🎁 Cache created repos in GithubService so they appear in the list immediately (GitHub search has eventual consistency)

twoGiants and others added 2 commits May 2, 2026 13:31
The create page had several issues. Owner was an empty editable
field, registry required manual input, and push assumed the repo
already existed on GitHub.

Owner is now preset from ForgeConnectionContext (disabled input).
ForgeConnectionProvider extended with ForgeUser state so all
pages can access the authenticated user. Each page wraps itself
with the provider since OCP routes mount independently.

Registry is preset to the OCP internal registry and disabled.
The backend uses this value to skip registry login in the CI
workflow.

push renamed to createRepo. It checks if the repo exists (error
if taken), creates it with auto_init (GitHub's Git Data API
needs at least one commit), renames the default branch if not
main, adds the serverless-function topic, then pushes files.

errorMessage now includes HTTP status for Octokit errors. List
page shows a danger alert on fetch failure.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
GitHub's search API has eventual consistency. After
createRepo, the new repo may not appear in search results
for several seconds. listFunctionRepos now merges search
results with a local cache of repos added by createRepo.
Fetched results take priority, cached entries only survive
until the search index catches up.

setupCreateRepoHandlers parameterized with repoName and
moved to top level for reuse across test groups.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Stanislav Jakuschevskij <sjakusch@redhat.com>
@twoGiants
twoGiants marked this pull request as ready for review May 3, 2026 12:19
@twoGiants twoGiants self-assigned this May 3, 2026
@twoGiants twoGiants changed the title 018 create page fixes Fix: Create page owner preset, registry, and repo creation. May 3, 2026
@twoGiants
twoGiants merged commit f911b43 into master May 3, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant