.gitbay/wiki/Parity.org

main
gitbay/.gitbay/wiki/Parity.org rendered · source · history · blame · raw

544 lines · 28068 bytes

10 symbols in this file

Parity

Which surface can do what. The CLI is meant to be the complete interface: every capability exists over SSH, and the other surfaces dispatch the same control commands rather than reimplementing them, so they cannot drift. This page is updated in the merge request that changes a row.

Three surfaces now: the CLI over SSH, the web, and the iOS client (krz/gitbay-ios). A no in the cli column is a defect, not a preference — it means some surface reached around the registry and stranded a capability where only it can reach.

Rule

A capability lands over SSH first. If it belongs to the triage/review/respond loop, it lands on the web in the same merge request. Nothing is held back from a surface any more (#234): the registry has no flag for it, and what a caller may do is the account's rights narrowed by the scope of the key or token it arrived with, decided in one place. A no in the web or ios column is a page nobody has built yet, not a refusal.

Rows are one page or one action each. Grouped rows hide gaps, twice now: "browse, log, blame, search" read as covered while blame had no command at all, and "build list, log" read as covered while the job list a trigger can name had none (krz/gitbay#50), leaving the picker browser-only and the iOS build screen unable to say more than the log.

Merge requests

capability cli web ios
read, diff, commits yes yes yes
review and check times yes yes yes
who resolved it, when yes yes yes
comment yes yes yes
react to it or a comment yes yes no
edit title and body yes yes yes
review (approve etc.) yes yes yes
resolve a thread yes yes yes
comment on a diff line yes yes yes
suggest a change yes yes no
apply a suggestion yes yes no
merge (all strategies) yes yes yes
merge when ready, cancel yes yes no
close yes yes yes
close in favour of another yes yes yes
create yes yes yes
draft, ready yes yes yes
search title and body yes yes yes
create from a fork yes yes yes
retarget yes yes yes
milestone yes yes yes
labels yes yes yes
filter by label yes yes yes
request a review yes yes yes
choose body markup yes yes yes
preview body markup n/a yes no
TeX math as MathML n/a yes no
stacked merge requests yes yes yes
revisions yes yes yes
range-diff yes yes yes
merge gates yes yes yes

Reviews and checks carry the time they last said something, and a ci/<job> check carries how long its build ran, so a merge request reads without opening the build. Statuses posted through status set have no build and report only the time. A merged or closed merge request names who resolved it and when; a row without that stamp — a migrate import, or one merged before krz/gitbay!137 with no mr.merged event to backfill from — says neither rather than inventing a time.

A merge request whose target is another open merge request's source branch is stacked on it: mr show and the page say so both ways, and when the lower one merges, everything stacked on it is retargeted onto what it merged into with its reviews kept. A squash or rebase merge is refused while anything is stacked on the merge request, since it would rewrite the commits the stack builds on. All three surfaces show the stack both ways.

A draft merge request is open but not asking: it does not merge, and it does not appear in anyone's review queue. Draft is a flag rather than a fifth state, so every state = 'open' rule still means what it did. mr revisions lists the heads a merge request has had; the web page lists them beside the reviews they staled, and the iOS client has a Revisions section. mr range-diff compares two heads: the iOS client shows it from a revision to the one before, as text; the web renders the same view, with a "compare to previous" link on each revision after the first. Batched review — draft diff comments held with mr comment --pending and sent together with --comment=/–discard= or a verdict — is built and the web uses it: composing review comments before publishing them is the same round trip as the CLI's --pending flag.

mr review request --add <user> asks a particular person, who then carries the merge request in their queue and is notified; --remove withdraws the ask. Without one the queue is computed from involvement — what you own, are granted, or reach through an org or team — so a collaborator with write access who has not touched a thread hears nothing until they do (krz/gitbay#145).

Creating from a fork works anywhere the source can be typed as owner/name:branch. The web's source picker offers the branches of every fork the viewer can push to in that form, and the repository header has the fork control, so the whole path — fork, edit a file, propose — runs in a browser. Retargeting moves an open merge request onto another branch of the same repository and stales the reviews, since an approval was of the diff against the old branch.

Issues

capability cli web ios
read, list, filter yes yes yes
filter by label, assignee, author, milestone yes yes yes
search title and body yes yes yes
create yes yes yes
comment yes yes yes
react to it or a comment yes yes no
edit title and body yes yes yes
close and reopen yes yes yes
labels, assignees yes yes yes
milestone yes yes yes
milestone list yes yes yes
labels: list, colour yes yes yes
choose body markup yes yes yes
preview body markup n/a yes no
TeX math as MathML n/a yes no
issue templates yes yes yes
milestone create, close, reopen yes yes yes
org labels: set, list, remove yes yes yes
org milestones: create, list, close, reopen yes yes yes
closes across repositories yes yes yes

Labels are created on the fly by issue label --add and mr label --add, and managed by label list, label set <label> --color rrggbb and label remove, which takes the label off every issue and merge request. One set serves both. The web paints the stored colour on every chip and derives one from the name when none is set. The set itself is at /<owner>/<repo>/labels, linked from the issue list: create, recolour and remove, dispatching the same commands.

Org labels and milestones are managed at /<org>/-/labels and /<org>/-/milestones, where org admins see the create, colour, remove, close and reopen forms and everyone else sees the list. The repository milestones page carries create, close and reopen for writers; a milestone the org holds shows no buttons there. Uploading a release asset from the releases page streams the file to release asset add on stdin, capped at max_asset_bytes.

Issue, MR and release bodies, and their comments, carry the markup they were written in — --format md|org on create, comment and edit, stored alongside the text so changing a preference later cannot reinterpret prose that already exists. Every surface renders the stored format, and every surface now offers the choice: the web's create forms, and the iOS composer on create, edit and comment. An edit starts on the format its body was stored in, since starting elsewhere would silently reinterpret it on the next save. Diff-line comments have no format column and are always markdown. TeX math in either format renders as MathML on the web (#294); the terminal shows the source, so the CLI row is n/a.

Every web form that takes markup has a Preview button beside its own submit: issue and merge request create, their edit and comment boxes, release create and edit, and the file editor on a path the forge renders. It posts to the form's own action, which renders the draft and hands the page back without writing, so what you see is the rendering the thread will show, autolinks included. It is a round trip rather than a live preview because the instance serves no JavaScript, the same way the blob page's rendered/source toggle works. The row is n/a on the CLI: a terminal has no form to preview, and issue show already renders. Diff-line comments are left out — they sit inside the diff, where a page-level preview has nowhere to go.

The iOS client resolves no autolinks: #N and owner/name#N render as text in its threads, so a preview there will show the app's rendering rather than the one the web page shows.

Repositories

capability cli web ios
browse files yes yes yes
read a file yes yes yes
render a README yes yes yes
commit log yes yes yes
commit log at a ref yes yes yes
one commit with its patch yes yes yes
blame yes yes yes
search file contents yes yes yes
find a definition (symbols) yes yes no
jump to definition from a file n/a yes no
compare two refs yes yes yes
branches and tags yes yes yes
wiki (read) yes yes yes
download an archive yes yes n/a
edit a file yes yes yes
preview an edited markup file n/a yes no
create yes yes yes
fork yes yes yes
pin yes yes yes
bookmark yes yes yes
bookmark list yes yes yes
bookmarks on your profile n/a yes no
watch, unwatch yes yes yes
mute yes yes yes
settings, protection yes yes yes
default branch yes yes yes
merge requests only yes yes yes
protected tags yes yes yes
require codeowners yes yes yes
require contexts yes yes no
access grants yes yes yes
effective access yes yes yes
webhooks yes yes yes
runners attach, list, detach yes yes n/a
import from a remote yes yes yes
topics, website yes yes yes
visibility yes yes yes
archive (read-only flag) yes yes yes
release list, show yes yes yes
atom feeds n/a yes n/a
release create, edit yes yes yes
preview release notes n/a yes no
build list yes yes yes
build list paging (limit, cursor) yes yes no
build row names its commit yes yes no
build list filters (ref, status, job) yes yes yes
build show (one build) yes yes yes
build log yes yes yes
build log follow (until it ends) yes yes no
build failed step, duration yes yes no
build log one step yes yes no
build log tail yes no no
build jobs yes yes yes
build trigger yes yes yes
build cancel yes yes yes
job image (ci.yml) yes n/a n/a
dependency checks on/off yes yes yes
dependency status yes yes yes
delete, transfer yes yes no
rename yes yes yes
release delete yes yes yes
release asset add yes yes n/a
release asset remove yes yes yes
snippet create, edit, delete yes yes yes
snippet show, list yes yes yes
snippet file set, get, remove yes yes yes

No row is web-only any more. Blame, file editing, log at a ref, archive, the public listing and the wiki were all in that state — a handler reading git or the store directly instead of dispatching a command — until krz/gitbay!99, !101 and !102 gave them commands.

build cancel withdraws a queued build, or ends a running one: the server closes the runner's log session and the runner kills the step within a couple of seconds. Cancelling a duplicate of a commit that already passed the job puts that result back on the commit. The build page carries the button while a build is still cancellable.

A pin and a bookmark are different things and are stored separately. A pin is private quick access to what you are working on, and drives the rail; a bookmark is public, says a repository is worth coming back to, and its count is the only popularity signal on the instance. Bookmarking needs read access only — it is something you do to someone else's repository — and a repository bookmarked while public and since made private drops out of the listing rather than leaking that it exists (krz/gitbay#146).

The web's watch and pin controls dispatch repo pin=/=repo unpin and repo watch=/=repo mute=/=repo unwatch, the same commands the CLI runs (krz/gitbay#261). The single watch button cycles default, watching and muted.

Dependency checks are off until a repository's admin turns them on: the check tells a public registry what the repository depends on. repo deps status lists what is behind; the repository's settings page renders the same report under the toggle — last check, last error, the tracking issue, and the rows. The issue the worker opens, rewrites and closes is still the copy every other surface reads.

The wiki row covers reading. A wiki lives at .gitbay/wiki/ on the default branch, so editing one is editing a file in the repository — a push, or repo commit-file — and there is no wiki-specific edit row to have parity on. The web editor reaches it on any repository that permits server-authored commits; one requiring verified signatures does not, because the server signs nothing on a user's behalf, so those wikis are push-only.

n/a marks a capability deliberately absent from a surface rather than missing from it. Archive download is n/a on iOS: the read API carries a command's stdout as a JSON string, so a gzip stream cannot survive it, and the app has nowhere useful to put a tarball — the brief rules out local git, so there is no clone, checkout or build to feed. The web's route stays the way to get one. release asset add is n/a on iOS for the same reason from the other direction: the file arrives on stdin, which the API carries as a JSON string. Attaching a runner is n/a on iOS for a plainer reason: the key is generated by gitbay-runner init on the machine that will run builds, and that machine's terminal (the command init prints) or the settings page is where the paste happens. A phone has neither the key nor the runner.

A README or wiki page's org renders per surface: the web through go-org, the iOS client through the shared OrgSwift package (krz/org-swift). OrgSwift is held to orgo's output by the krz/org-conformance corpus — golden renderings from orgo, itself diffed against Emacs ox-html — so constructs the iOS client used to approximate (tables, footnotes, timestamps, heading tags, nested lists) now render the way the reference does. go-org is not yet on the corpus.

Discovery

capability cli web ios
search repositories yes yes yes
search issues and merge requests yes yes yes
saved query save, remove, pin yes no no
saved query list and results yes yes no
pinned queries on the dashboard yes yes no
browse all public repositories yes yes yes
profile page yes yes yes
profile sections as tabs n/a yes n/a
profile about and links yes yes yes
profile about as a file yes yes yes
activity feed yes yes yes
command reference yes no n/a

repo symbols and /{owner}/{repo}/symbols answer from the same store query and ranking. Jumping to a definition is a link on a name in the blob view, which a terminal has no place for; repo symbols with the name is its CLI form.

explore is the listing without a query; repo search is the one with. search is both plus the title and body of every issue and merge request the caller can read, over FTS5; the web serves it at /search with a field in the rail, and an anonymous visitor gets the public rows from the same query. issue list --search and mr list --search narrow one repository. What someone types is quoted term by term, so an FTS5 operator — c++, AND, a lone quote — is a word to match and never a syntax error. repo grep remains the per-repository file-contents search.

A saved query is a named query over issues and merge requests across every repository the caller can read (#292): query save <name> <query> (--force replaces), query list, query show with its count, query run for the rows, query remove, query pin and unpin. issue list --query <name> and mr list --query <name> run one narrowed to their kind, and --q '<query>' takes one written out. Results are newest first, always paged with {items, next} and fifty rows by default, each naming its repository. Readability is the search rule, decided in the SQL, so a private repository someone else owns is neither a row nor part of a count. dashboard carries each pinned query's count and first five rows under queries; the web shows them on the dashboard and serves /<owner>/-/queries and /<owner>/-/queries/<name>, which are a 404 under anyone else's name. Saving, removing and pinning have no web form yet.

The about text is profile/README.{md,org,markdown} on the default branch of <owner>/.gitbay, resolved in that order, so the extension picks the renderer rather than a stored format. profile show reports it as about, about_format and about_path. It reads with the repository's own access, so a private .gitbay is a profile with no about text to anyone but its owner and the admins. A repository whose name starts with a dot stays out of explore and off the profile's repository list. On the web a profile is tabs: /<owner> is About — the text, the year of squares and a log of the newest thirty events — then /<owner>/-/repositories, /<owner>/-/bookmarks, /<owner>/-/snippets, and /<owner>/-/people for an organization's members and teams. A tab nobody may open is not offered and its URL is a 404: bookmarks are the viewer's own, only a user has snippets, and people is the org admin panel. The log counts what the graph over it counts — a user's own events, an organization's repositories' — on public repositories only; activity.atom is the feed that goes back further. The CLI's profile show is unchanged and still returns all of it at once. The iOS client decodes and renders both formats, through the same OrgSwift path a README takes.

help lists the command registry. Bare it is an index, one line per command, sorted. With a prefix (help mr) it adds each command's argument syntax, which is the only place flags are written down; gitbay <cmd> --help asks the server for the same thing, and --json returns {path, summary, usage}. No web page renders it, and a native client has no use for one (krz/gitbay#57).

Accounts

capability cli web ios
SSH keys: list, add, remove yes yes yes
SSH key label yes yes yes
SSH key expiry and last use yes no no
PGP keys: list, add, remove yes yes yes
email add and verify yes yes yes
email list, remove, primary yes yes yes
dashboard aggregate yes yes yes
notification inbox yes yes yes
activity mail on, off yes yes yes
reply by mail on, off yes yes no
watch writable repos yes yes yes
push device add yes yes yes
push device list yes yes yes
push device remove yes yes yes
activity push on, off yes yes yes
web colour scheme yes yes n/a
web diff layout yes yes n/a
API token mint yes yes no
API token list, revoke yes yes no
API token revoke with what it created yes no no
account export bundle yes yes n/a
delete your own account yes yes no
profile set yes yes yes
write the profile about yes yes yes
request a login link n/a yes n/a
account import bundle yes no n/a

Notifications land in an inbox row per recipient whether or not the instance sends mail, and mail is the second half when SMTP is configured. notifications list reads it, unread by default; notifications read <id>... | --all clears it; the dashboard and the web rail carry the unread count. repo watch adds you to a repository's notifications, repo mute silences it, and repo unwatch returns you to the default from either — told about work you are part of, nothing more. notifications settings watch on widens that default to every repository you can write to, without a row per repository. A mute wins over owning the repository, having written the thread, or the preference.

Push is the third leg beside inbox and mail, delivered to Apple devices an account has registered. notifications device add runs on every surface like every other command, but no web page offers a form for it, because only the iOS app can produce an APNs device token — a browser has no way to ask Apple for one. device list and device remove have no such limit and are yes on the web like the rest.

Replying to issue and merge request mail posts a comment (#295) when the instance reads a reply mailbox ([mail.inbound]) and the account ran notifications settings reply on. The account page shows the switch only on such an instance. The reply is itself a fourth surface for issue comment and mr comment and nothing else: it is dispatched as that command, so it cannot do what the command would refuse. admin mail inbound check has no page, like the rest of instance administration.

A login link is requested from the login page by username or verified address, and arrives by mail: it works once and expires in fifteen minutes. The row is n/a for the CLI because a terminal with a registered key runs web login, which mints a link directly and needs no mail. It exists because an account with no SSH key had no way into the web at all (krz/gitbay#155). The page offers the form only when the instance has SMTP configured; there is no separate switch. The response never says whether the account exists. It is n/a on iOS for the same reason it is on the CLI, from the other end: the app authenticates with a bearer token pasted at sign-in, so a one-time link into the web unlocks nothing it can use.

The account export bundle is n/a on iOS on the archive-download argument above — a JSON bundle has nowhere useful to land on a phone, and the web route stays the way to get one.

profile set carries description, website and links; the JSON API runs it like any other write. The account settings page has the form, and so does the iOS client: --link replaces the whole set rather than appending, so a client sends every link it keeps on every save, and --link '' is how they are cleared.

The about text is not among those flags. It is a file, written by a push or repo commit-file like any other file, which is why writing it is yes on every surface: anything that can commit a file can write it. The settings page points at the file and offers to create <owner>/.gitbay when there is none.

Administration

capability cli web ios
account list, filter by state yes yes no
account show yes no no
promote, demote yes yes no
disable, enable yes yes no
account create, delete yes no no
invite yes no no
account and org quotas yes no no
worker queues yes yes no
runners yes no no
repository list, archive, visibility yes no no
rebuild a symbol index yes no no
audit log yes no no
instance statistics yes no no
inbound mail check yes no no

/admin/users carries the account list with the command's state filter and cursor, and promote, demote, disable and enable per row; demote and disable ask for the username to be typed. The rest is a page nobody has built yet rather than a refusal — see below. Account creation and deletion stay on the command line on purpose: one takes a key, the other cannot be undone.

Organizations

capability cli web ios
read members and teams yes yes yes
members add, remove, role yes yes yes
teams create, delete yes yes yes
team members yes yes yes
team repo grants yes yes yes
create, rename yes yes yes
delete yes n/a n/a
profile yes no yes

Pagination

issue list, mr list, repo list, feed, build list and repo symbols take --limit <n> and --cursor <c>. Cursors are opaque; each page carries the next one. Without the flags a list stays as it was, so existing scripts are unchanged — for build list that means the newest fifty matching builds, which is what the cursor now reaches past. The web pages the issue and merge request lists at fifty and the builds list at thirty with the same cursors; iOS pages with them too.

CLI only, for now

Build secrets, mirror configuration and tokens, custom domain claims, web session listing and revocation, deploy keys, and instance administration have no page yet. Until #234 these were refused outright on the other surfaces; the refusal is gone, so each is now a page waiting to be built rather than a rule. A credential still travels on stdin wherever it is set, since argv is world-readable in /proc and the audit log keeps flag values.

Applying a suggestion on a repository that requires signed commits is CLI-only by mechanism: the server has no key to sign the commit with, so gitbay mr apply-suggestion makes and signs it in a clone with the user's own git signing configuration and pushes it. The web shows that command in place of the button.

Deleting an organization and pruning merge request heads (admin mr prune) stay CLI-only for now. Deleting or transferring a repository is a settings section on the web and asks for the repository's path to be typed first.

n/a means a surface cannot usefully carry the capability at all — see the archive note above.