gitoria
All repositories: gitoria
1.1 KB
// lib/pullmerge.hl — MERGING A PULL REQUEST ON A PERSON'S BEHALF (gitoria#48): the ONE place the Merge button (components/pulls.hl, components/pull.hl)// and POST {api}/pulls/N/merge (lib/api.hl) go through. Who may merge is decided by the caller with lib/repos.hl mayPush (the rule that lets a person push).// mergeAndAnnounce(repo, sha, user, expectHead) → { ok, mergeCommit } | { error }// mergePullNow (lib/pulls.hl) does the merge (required checks, race-safe update-ref); then the tickets project hears of the push and the pull request// records follow, raising the contract's pull_request `merged` event with `sender` = that user (lib/events.hl).import { mergePullNow } from './pulls.hl'import { notifyPush } from './tickets.hl'import { syncAndRaise } from './events.hl'static mergeAndAnnounce = (repo, sha, user, expectHead) => {if (repo == null || user == null) { return { error = 'no such pull request' } }setting = repo.branch == null ? '' : repo.branchr = mergePullNow(repo.slug, setting, sha, user.name, expectHead)if (r.error != null) { return r }notifyPush(repo.slug, false)syncAndRaise(repo.slug, user.id)return r}
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- 10cdf54bGive organization repository rows their own Style referencesmre
- 0d019521Document shared class selectors in the styles-only filemre
- c67404a7Scope token labels and feedback through the token Viewmre
- 944e3dabScope key names, fingerprints and errors to the keys Viewmre
- 7bcf7bc2Nest repo navigation media rules and document selector gapsmre
- 46a76272Reference release row styles from the Viewmre
- a383f428Tie README definition and path styles to its own Viewmre
- a90812ffConsolidate add-code styles under its existing View idmre
- 89107a3eDocument the index direct-child selector remaindermre
- 07403362Scope reply form layout through the component form rulemre
- 097c52baStyle the login error through its View idmre
- c6d9c86aOwn the not-found code rule in its componentmre
- 055424c2Record W61 replacement theme gates, sidebar repro and baselinemre
- 2ed09441Use layouts theme 17e0f03 for W61 compatibilitymre
- b8609a91Merge branch 'main' into w61-stylemre
- 4639caf7Report W61 theme startup blocker and day39 Style probemre
- 81f0a0bbREADME: two caches were restored by 90b4f72; log W62mre
- 4a3f557eImport layouts theme ebd00b6 for W61 (startup blocked)mre
- ab12a257Merge W62: #25 commit page measurements and proc repromre
- 41323e49gitoria#25: measure commit request costs and reproduce blocking process waitsmre