Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

22 linesCodeBlameRaw
1-- Forks people make into their workspaces (network.rs). Unlike a pull
2-- request's working copy (`fork_of`, namespace `pulls`, hidden), a fork is
3-- an ordinary repository of its workspace that remembers where it came
4-- from, so it can be synced and can open pull requests there. Cleared
5-- when the fork is detached, or when its parent changes who can see it.
6ALTER TABLE repos ADD COLUMN parent_id TEXT REFERENCES repos(id);
7CREATE INDEX repos_parent ON repos(parent_id) WHERE parent_id IS NOT NULL;
8-- What it was made a fork of, never cleared: what forks start with
9-- (Actions and issues off) holds once it is detached, and its pull
10-- requests into the parent still merge. No reference, as the parent may
11-- be purged.
12ALTER TABLE repos ADD COLUMN forked_from TEXT;
13
14-- When the hourly sweep last checked that whoever made a private fork can
15-- still read its parent (network.rs); a fork whose maker cannot is
16-- deleted, restorable for 30 days.
17ALTER TABLE repos ADD COLUMN fork_checked_ms INTEGER;
18CREATE INDEX repos_private_forks ON repos(fork_checked_ms) WHERE parent_id IS NOT NULL AND is_private = 1;
19
20-- A private repository's admins let others fork it. Public repositories
21-- can always be forked.
22ALTER TABLE repos ADD COLUMN allow_forking INTEGER NOT NULL DEFAULT 0;