VersionControl:PRs/magenta/333: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
DrivingThatTrain (talk | contribs)
cryptograss/magenta#333, as GitHub has it
 
DrivingThatTrain (talk | contribs)
cryptograss/magenta#333, as GitHub has it
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
|url=https://github.com/cryptograss/magenta/pull/333
|url=https://github.com/cryptograss/magenta/pull/333
|author=magent-cryptograss
|author=magent-cryptograss
|state=open
|state=merged
|base=main
|base=main
|branch=magent/branch-autocomplete
|branch=magent/branch-autocomplete
|opened=2026-11-01 01:37:26
|opened=2026-11-01 01:37:26
|pushed=2026-11-01 01:37:22
|pushed=2026-11-06 04:31:19
|merged=
|merged=2026-11-06 05:44:15
|closed=
|closed=
|worked_on_by=magent, justin, re
|worked_on_by=magent, justin, re
|moods=ramp
|moods=ramp
|deploy=redeploy maybelle (memory-lane), after maybelle-config#250 is deployed on hunter
|deploy=redeploy maybelle (memory-lane), after maybelle-config#250
}}
}}
<pre class="pr-body">Justin, in #ramp (1 Nov): mergeables are named `&lt;repo&gt;:&lt;branch&gt;` (`maybelle-config:re/fix-mtime-guard`), never PR numbers, and "make sure autocomplete is a thing from the start."
In the Mood composer, typing a repository's name and a colon (`maybelle-config:`), or an owner's name and a slash (`re/`), suggests mergeables from githouse's `branches.json` (maybelle-config#250). Live ones come first (🟢), then merged (🟣), then closed (⚫), because a name is used once and a merged one is still worth naming. After `repo:`, any part of the branch name matches (`maybelle-config:mtime`); after `re/`, it matches from the start. It only triggers after a space, a bracket or a backtick, so URLs and paths (`https://x.com/re/fix`) and times (`10:30`) don't open it. The list is fetched once, 4 s after the page loads (or on the first word that looks like one).
**Where the list comes from:** `/api/branches/` on magenta itself (`views_settings.api_branches`), which reads `branches.json` from `settings.GITHOUSE_DIR` (default `/srv/git`). maybelle-config#250 mounts maybelle's githouse copy there read-only; until it's deployed, the endpoint answers `{}` and the composer suggests nothing. Same origin, so no CORS, and no new hostname.
Checked: the matching and the sorting, in node, against a sample branches.json; `test_branches_api` (3 tests: what githouse wrote, nothing yet, not an object); full `conversations.tests` on sqlite, 1549 OK. No test covers the composer's JS, and it hasn't been tried in a browser with real data.
Deploy: redeploy maybelle (memory-lane), after maybelle-config#250
Worked on by: magent, Justin, re, in #ramp</pre>

Latest revision as of 16:06, 9 November 2026

magenta#333: Autocomplete for mergeables: repo:branch
State 🟣 merged 2026-11-06 05:44:15
Worked on by magent, justin, re
Moods #ramp
Deploy redeploy maybelle (memory-lane), after maybelle-config#250
Branch magent/branch-autocomplete → main, by magent-cryptograss
Opened · last pushed 2026-11-01 01:37:26 · 2026-11-06 04:31:19
Justin, in #ramp (1 Nov): mergeables are named `<repo>:<branch>` (`maybelle-config:re/fix-mtime-guard`), never PR numbers, and "make sure autocomplete is a thing from the start."

In the Mood composer, typing a repository's name and a colon (`maybelle-config:`), or an owner's name and a slash (`re/`), suggests mergeables from githouse's `branches.json` (maybelle-config#250). Live ones come first (🟢), then merged (🟣), then closed (⚫), because a name is used once and a merged one is still worth naming. After `repo:`, any part of the branch name matches (`maybelle-config:mtime`); after `re/`, it matches from the start. It only triggers after a space, a bracket or a backtick, so URLs and paths (`https://x.com/re/fix`) and times (`10:30`) don't open it. The list is fetched once, 4 s after the page loads (or on the first word that looks like one).

**Where the list comes from:** `/api/branches/` on magenta itself (`views_settings.api_branches`), which reads `branches.json` from `settings.GITHOUSE_DIR` (default `/srv/git`). maybelle-config#250 mounts maybelle's githouse copy there read-only; until it's deployed, the endpoint answers `{}` and the composer suggests nothing. Same origin, so no CORS, and no new hostname.

Checked: the matching and the sorting, in node, against a sample branches.json; `test_branches_api` (3 tests: what githouse wrote, nothing yet, not an object); full `conversations.tests` on sqlite, 1549 OK. No test covers the composer's JS, and it hasn't been tried in a browser with real data.

Deploy: redeploy maybelle (memory-lane), after maybelle-config#250
Worked on by: magent, Justin, re, in #ramp