v0.28.1 cc7ba64

ci_tip.go RawHistoryFolder

1// SPDX-License-Identifier: AGPL-3.0-or-later
2
3package domain
4
5// CIRefTip records who moves a branch or a tag to an object (CI-3, D1): the
6// actor and pusher of the push or merge that sets Ref to Sha, and whether that
7// principal was trusted (TrustedActor).
8//
9// It is what a scheduled run takes its actor and its trust from (GitHub runs a
10// schedule as the author of the last commit of the default branch), and what a
11// dispatched run's trust is capped by: the default branch is not necessarily
12// the owner's work (a token limited to some branches can push the first branch
13// of an empty repository, which becomes the default branch), and an agent's
14// branch is not the owner's work either.
15//
16// The record is written BEFORE the ref moves (in the pre-receive decision of a
17// push, and inside the merge before it updates the target), so that no moment
18// exists when the tip is the new commit and its record the previous pusher's;
19// writing it after would let a slow post-receive of an agent's push leave the
20// owner's record on a tip the agent has since moved back to the same commit
21// (owner A, agent B, agent A). It names the object it was written for, and is
22// valid only while the ref still points to it. A push that is refused after the
23// record was written leaves a record that matches no tip: not trusted (fails
24// closed). A tip with no record (a push from before records existed, a record
25// that could not be written) is not trusted either.
26//
27// Two concurrent pushes of the same object by the owner and by an agent can
28// leave the owner's record: the object is the same and the owner pushed it, so
29// the content is endorsed by the owner. That case is accepted.
30type CIRefTip struct {
31	Repo RepoName
32	// Ref is the full name: "refs/heads/main" or "refs/tags/v1".
33	Ref string
34	// Sha is the object the ref is set to (the tag object for an annotated tag).
35	Sha string
36	// Actor is who the run shows, as for a push (authorOf).
37	Actor string
38	// Pusher is the principal whose rights the actions of other repositories are
39	// resolved with.
40	Pusher  CIPusher
41	Trusted bool
42}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 44

↑↓ moveenter openesc close