Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

0037_pr_auto_merge.sql

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

0037_pr_auto_merge.sqlBlame22 lines · 1 contributor
21ff9beClaude1-- Block J16 — PR auto-merge opt-in.
2--
3-- One row per PR captures the owner's intent to auto-merge the PR once all
4-- commit statuses on the head SHA reach "success". The actual merge is
5-- performed by the regular PR merge path; this table just tracks the
6-- subscription + the merge strategy the owner wanted.
7
8CREATE TABLE IF NOT EXISTS "pr_auto_merge" (
9 "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
10 "pull_request_id" uuid NOT NULL REFERENCES "pull_requests"("id") ON DELETE CASCADE,
11 "enabled_by" uuid REFERENCES "users"("id") ON DELETE SET NULL,
12 "merge_method" text NOT NULL DEFAULT 'merge', -- merge | squash | rebase
13 "commit_title" text,
14 "commit_message" text,
15 "enabled_at" timestamp NOT NULL DEFAULT now(),
16 "last_checked_at" timestamp,
17 "last_status" text, -- 'pending' | 'success' | 'failure' | 'error'
18 "notified_ready" boolean NOT NULL DEFAULT false
19);
20
21CREATE UNIQUE INDEX IF NOT EXISTS "pr_auto_merge_pr_unique"
22 ON "pr_auto_merge" ("pull_request_id");