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.

g1t.sh
38 linesCodeBlameRaw
1-- How a repository's pull requests merge (RepoSettings in
2-- crates/contracts/src/work.rs). NULL is the default for each, so rows
3-- written before this read as the defaults: merge, squash and rebase on,
4-- fast-forward off, merge by default, default messages, updates suggested,
5-- auto-merge allowed, branches kept, no sign-off, commit comments on and
6-- issues closed by the pull requests that name them.
7ALTER TABLE repo_settings ADD COLUMN allow_merge_commit INTEGER;
8ALTER TABLE repo_settings ADD COLUMN allow_squash_merge INTEGER;
9ALTER TABLE repo_settings ADD COLUMN allow_rebase_merge INTEGER;
10ALTER TABLE repo_settings ADD COLUMN allow_fast_forward INTEGER;
11-- 'merge', 'squash', 'rebase' or 'fast_forward'.
12ALTER TABLE repo_settings ADD COLUMN default_merge_method TEXT;
13-- 'default', 'pull_title', 'pull_title_and_description',
14-- 'pull_title_and_commits' (squash only) or 'custom'.
15ALTER TABLE repo_settings ADD COLUMN merge_commit_message TEXT;
16ALTER TABLE repo_settings ADD COLUMN squash_commit_message TEXT;
17ALTER TABLE repo_settings ADD COLUMN merge_commit_template TEXT;
18ALTER TABLE repo_settings ADD COLUMN squash_commit_template TEXT;
19ALTER TABLE repo_settings ADD COLUMN suggest_updating_branches INTEGER;
20ALTER TABLE repo_settings ADD COLUMN allow_auto_merge INTEGER;
21ALTER TABLE repo_settings ADD COLUMN delete_branch_on_merge INTEGER;
22ALTER TABLE repo_settings ADD COLUMN require_web_commit_sign_off INTEGER;
23ALTER TABLE repo_settings ADD COLUMN allow_commit_comments INTEGER;
24ALTER TABLE repo_settings ADD COLUMN auto_close_issues INTEGER;
25
26-- How a pull request merged, and the commit its merge left the base at.
27ALTER TABLE pulls ADD COLUMN merge_method TEXT;
28ALTER TABLE pulls ADD COLUMN merge_commit TEXT;
29-- A person's request that it merge on its own once it may (JSON: the
30-- contract's AutoMerge, with the enabler's account as stored to act as).
31ALTER TABLE pulls ADD COLUMN auto_merge TEXT;
32-- JSON array of the issue numbers it closes when it merges into the
33-- default branch: its issue and those its title and description name.
34ALTER TABLE pulls ADD COLUMN closes TEXT;
35-- Its branch was deleted after it merged or closed (restorable).
36ALTER TABLE pulls ADD COLUMN head_branch_deleted INTEGER NOT NULL DEFAULT 0;
37-- The pull requests waiting to merge on their own, for the sweep.
38CREATE INDEX pulls_with_auto_merge ON pulls (repo_id) WHERE auto_merge IS NOT NULL;