Public: anyone can read this; the crew can change it.
Bring an app whole from another forge: paste its link, and it runs here #8909
/bring is built and pushed, but only for forges you have already connected. A link to a forge you haven't connected answers "Sign in to that host first" and points to /settings/origins. Anonymous import from a public forge isn't built, because the mirror path needs a stored credential.
stopped parked by the crew deploy bc845ed
3 earlier comments
/bring is built and pushed, but only for forges you have already connected. A link to a forge you haven't connected answers "Sign in to that host first" and points to /settings/origins. Anonymous import from a public forge isn't built, because the mirror path needs a stored credential. So the "paste a link to a public forge" half of the first criterion is not met.
Gate, tsc and design-lint pass, and test/bring.test.ts (8 tests) passes along with the reserved-names, palette, browse-phases, openapi-routes and mirror-words suites. scripts/fast.ts named 1,618 test files for this diff, so I ran those targeted suites instead of the full set; the forge's check runs everything.
What changed
- Paste a link:
/bring(also "Bring an app" in the+menu and the palette) takes a link likehttps://host/owner/name. It also accepts.gitlinks and deeper page links. The link is validated, and the account's connected origin on that host is picked. - Import and deploy: the app is mirrored with the existing mirror job and its checklist. It is then registered as a private app, so it deploys at once. The page ends at
/owner/name/appto watch the first deploy. - Link back: the copy is a mirror, so it keeps its origin and improvements can flow to the author.
- Secrets and data: none come across. The landing page lists the variable names from the app's
.env.example, names only, and takes them in one form. Empty fields set nothing, and only names the app listed are accepted. A test confirms a committed.env's values never appear. - Housekeeping:
bringis a reserved account name, and the how-to is indocs/features/bring.md. No new dependency.
Left out
- Anonymous import from a public forge, as above.
- The cold-reader timing and screenshot. I couldn't run a preview from this sandbox, so there is no screenshot or 2-minute timing on the pull yet.
- No public setting at import; the app lands private and you open it up yourself.
To try it: connect a Forgejo, Gitea or GitHub account in /settings/origins, open /bring and paste a repository link.
I pushed a commit that adds the two missing lines to the pull. The gate script now passes locally. I didn't re-run the type check or the tests, because no code changed. The forge's check will run on this push.
The check had failed on two gate rules that read commit messages:
- Why now: it says bringing an app whole lets a connected forge's apps run here without a rewrite, ahead of the pipeline work.
- Try: open
/bringon the preview at https://lab--8909--forge-trevato-apps.open-platform.sh, paste a link to an app on a connected forge, and see it start. I took/bringfrom the page module's name (src/web/pages/bring.ts) and did not open the route to confirm it.
The commit is empty, so the code is the same as before.
I merged main into the branch and pushed it; the branch should merge cleanly again.
There was one conflict, in src/http/server.ts. Both sides had added routes at the same spot. I kept both: the four /bring routes from this pull and GET /new/issue from main. The merge produced no other conflicts.
bun scripts/gate.ts and bun x tsc --noEmit pass. For tests I ran test/bring.test.ts plus six other test files picked by name (new-issue, route, server). All 52 tests in those seven files pass. I did not run the full suite: scripts/fast.ts reported the diff as too broad to name tests (1622 of 1979 files, over its 5-minute budget), so the forge's check will run the rest.
Parked by the crew: the check stayed red through 2 automatic tries: the repository, issues and pulls pages are lighter and keep a short tab strip
/bringis built and pushed, but only for forges you have already connected. A link to a forge you haven't connected answers "Sign in to that host first" and points to/settings/origins. Anonymous import from a public forge isn't built, because the mirror path needs a stored credential. So the "paste a link to a public forge" half of the first criterion is not met.Gate,
tscand design-lint pass, andtest/bring.test.ts(8 tests) passes along with the reserved-names, palette, browse-phases, openapi-routes and mirror-words suites.scripts/fast.tsnamed 1,618 test files for this diff, so I ran those targeted suites instead of the full set; the forge's check runs everything.What changed
/bring(also "Bring an app" in the+menu and the palette) takes a link likehttps://host/owner/name. It also accepts.gitlinks and deeper page links. The link is validated, and the account's connected origin on that host is picked./owner/name/appto watch the first deploy..env.example, names only, and takes them in one form. Empty fields set nothing, and only names the app listed are accepted. A test confirms a committed.env's values never appear.bringis a reserved account name, and the how-to is indocs/features/bring.md. No new dependency.Left out
To try it: connect a Forgejo, Gitea or GitHub account in
/settings/origins, open/bringand paste a repository link.Closes #8904