gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6cc1f9436cc1f943Merge branch 'records-1112' into mainGitoria6cc1f943/lib/pullmerge.hl

1.1 KB

  1. // 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)
  2. // 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).
  3. // mergeAndAnnounce(repo, sha, user, expectHead) → { ok, mergeCommit } | { error }
  4. // 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
  5. // records follow, raising the contract's pull_request `merged` event with `sender` = that user (lib/events.hl).
  6. import { mergePullNow } from './pulls.hl'
  7. import { notifyPush } from './tickets.hl'
  8. import { syncAndRaise } from './events.hl'
  9. static mergeAndAnnounce = (repo, sha, user, expectHead) => {
  10. if (repo == null || user == null) { return { error = 'no such pull request' } }
  11. setting = repo.branch == null ? '' : repo.branch
  12. r = mergePullNow(repo.slug, setting, sha, user.name, expectHead)
  13. if (r.error != null) { return r }
  14. notifyPush(repo.slug, false)
  15. syncAndRaise(repo.slug, user.id)
  16. return r
  17. }

Branches

Latest commits

  • 6cc1f943Merge branch 'records-1112' into mainGitoria
  • 9448c438|||PR records: LOG, missions and reports since 11-09mre
  • 6dc08a8eMerge branch 'p51-public-pr-reads' into mainGitoria
  • 7b88cfe0Type publicReaderOfRequest parameters (L10)Gitoria
  • 2a4b3dc1|||PR Anonymous reads of public repos' pulls and statusesmre
  • 21b2c141Merge branch 's25-no-session-on-login-error' into mainGitoria
  • 698458e2|||PR No session for cookieless login errors: READMEmre
  • cce7b785|||PR No session for cookieless login errorsmre
  • 678d6303Merge branch 'v59' into mainGitoria
  • 5803cf4f|||PR vendor: Hybriel set-day59 and GC budget 32 MiBmre
  • 9eff6627Merge branch 'f2-api-bugs' into mainGitoria
  • 26117255|||PR apps API: review comments on files with spaces in their namemre
  • b8796cecMerge branch 'f1-broken-json' into mainGitoria
  • 2f2959c5|||PR apps API: broken JSON body gives 400 invalid_json, not 500mre
  • f7c6ca07Merge branch 'ident-chooser-selector' into mainGitoria
  • 691abb8e|||PR tests: find ident identity choice without the removed .choose classmre
  • 16a3530fMerge branch 'heap-revert' into mainGitoria
  • 220a80e0|||PR Remove temporary /__heap route and heap helper; logmre
  • 13f0c342Merge branch 'hl25-records' into mainGitoria
  • a002ecb7|||PR records: HL25 report, heap helper, logmre