merge-pull takes a list of one or more members {repository, number, head} and
by, judges no branch protection and answers once, at the call's end, the call
and each member's outcome {repository, number, state, commit|why} (H-A-21,
H-A-22); its caller id goes, and it names a timeout of 120 s (H-A-43). The
seat says merge-called on merge-called.<call>, kept 30 days and 64 MiB on
SEAT_git_merge-called, its body in bodies; the state calls keeps each call
with said (H-A-47). branch answers no protected.
Builds: design 47 H §734, §735, §736, §766, §767, §764 (the single-pull form, the protection judgement); lead answers H-A-21, H-A-22, H-A-23, H-A-24, H-A-43, H-A-47
Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
109 lines
3.3 KiB
JavaScript
109 lines
3.3 KiB
JavaScript
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
|
|
|
// The contract of the seat "git", defined whole (seats/git/seat.json): The forge: every read and act a delivery part makes of the mesh's git repositories, and what the forge says happened (design 47 *The seat git*, ADR 0596 §1, §2). A failed read answers an error, never an empty answer.
|
|
|
|
export const seat = "git";
|
|
|
|
export const verbs = {
|
|
pull: "pull",
|
|
branch: "branch",
|
|
openPulls: "open-pulls",
|
|
tags: "tags",
|
|
trees: "trees",
|
|
file: "file",
|
|
contains: "contains",
|
|
statuses: "statuses",
|
|
status: "status",
|
|
comment: "comment",
|
|
view: "view",
|
|
note: "note",
|
|
mergePull: "merge-pull",
|
|
tag: "tag",
|
|
};
|
|
|
|
export const events = {
|
|
pullUpdated: "pull-updated",
|
|
pullMerged: "pull-merged",
|
|
pullClosed: "pull-closed",
|
|
forgePull: "forge-pull",
|
|
forgeStatus: "forge-status",
|
|
forgeDelete: "forge-delete",
|
|
repoWritable: "repo-writable",
|
|
branchMoved: "branch-moved",
|
|
mergeCalled: "merge-called",
|
|
};
|
|
|
|
export const family = { name: "git.events", maxAgeDays: 7 };
|
|
|
|
export const pullUpdatedSubject = "mesh.seat.git.event.pull-updated";
|
|
|
|
export const pullMergedSubject = "mesh.seat.git.event.pull-merged";
|
|
|
|
export const pullClosedSubject = "mesh.seat.git.event.pull-closed";
|
|
|
|
export const forgePullSubject = "mesh.seat.git.event.forge-pull";
|
|
|
|
export const forgeStatusSubject = "mesh.seat.git.event.forge-status";
|
|
|
|
export const forgeDeleteSubject = "mesh.seat.git.event.forge-delete";
|
|
|
|
export const repoWritableSubject = "mesh.seat.git.event.repo-writable";
|
|
|
|
export const branchMovedStream = "SEAT_git_branch-moved";
|
|
|
|
export const branchMovedSubject = "mesh.seat.git.event.branch-moved";
|
|
|
|
export const mergeCalledStream = "SEAT_git_merge-called";
|
|
|
|
export function mergeCalledSubject(call) {
|
|
return "mesh.seat.git.event.merge-called." + call;
|
|
}
|
|
|
|
export const mergeCalledSubjectAll = "mesh.seat.git.event.merge-called.*";
|
|
|
|
export const states = {
|
|
failedSteps: "failed-steps",
|
|
calls: "calls",
|
|
};
|
|
|
|
/** The key of one value of the state failed-steps under the form "<module>.<fingerprint>.<step>". */
|
|
export function failedStepsByModuleFingerprintStepKey(module, fingerprint, step) {
|
|
return module + "." + fingerprint + "." + step;
|
|
}
|
|
|
|
/** The parts of a key of the form "<module>.<fingerprint>.<step>", or undefined for a key of another form. */
|
|
export function parseFailedStepsByModuleFingerprintStepKey(_key) {
|
|
let _rest = _key;
|
|
const _at0 = _rest.indexOf(".");
|
|
if (_at0 <= 0) return undefined;
|
|
const module = _rest.slice(0, _at0);
|
|
_rest = _rest.slice(_at0 + 1);
|
|
const _at2 = _rest.indexOf(".");
|
|
if (_at2 <= 0) return undefined;
|
|
const fingerprint = _rest.slice(0, _at2);
|
|
_rest = _rest.slice(_at2 + 1);
|
|
if (_rest === "") return undefined;
|
|
const step = _rest;
|
|
_rest = "";
|
|
if (_rest !== "") return undefined;
|
|
return { module, fingerprint, step };
|
|
}
|
|
|
|
/** The key of one value of the state calls under the form "call.<call>". */
|
|
export function callsByCallCallKey(call) {
|
|
return "call." + call;
|
|
}
|
|
|
|
/** The parts of a key of the form "call.<call>", or undefined for a key of another form. */
|
|
export function parseCallsByCallCallKey(_key) {
|
|
let _rest = _key;
|
|
if (!_rest.startsWith("call.")) return undefined;
|
|
_rest = _rest.slice(5);
|
|
if (_rest === "") return undefined;
|
|
const call = _rest;
|
|
_rest = "";
|
|
if (_rest !== "") return undefined;
|
|
return { call };
|
|
}
|
|
|