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

0033_commit_statuses.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.

0033_commit_statuses.sqlBlame24 lines · 1 contributor
0cdfd89Claude1-- Block J8 — Commit statuses (GitHub-parity external CI signal).
2--
3-- External systems post per-commit (sha, context) statuses that appear on
4-- commit detail views and fuel future merge-gating. Per (repo, sha, context)
5-- upsert semantics — a repost with the same context replaces the prior row.
6
7CREATE TABLE IF NOT EXISTS "commit_statuses" (
8 "id" uuid PRIMARY KEY DEFAULT gen_random_uuid(),
9 "repository_id" uuid NOT NULL REFERENCES "repositories"("id") ON DELETE CASCADE,
10 "commit_sha" text NOT NULL,
11 "state" text NOT NULL, -- 'pending' | 'success' | 'failure' | 'error'
12 "context" text NOT NULL DEFAULT 'default',
13 "description" text,
14 "target_url" text,
15 "creator_id" uuid REFERENCES "users"("id") ON DELETE SET NULL,
16 "created_at" timestamp NOT NULL DEFAULT now(),
17 "updated_at" timestamp NOT NULL DEFAULT now()
18);
19
20CREATE UNIQUE INDEX IF NOT EXISTS "commit_statuses_repo_sha_context_unique"
21 ON "commit_statuses" ("repository_id", "commit_sha", "context");
22
23CREATE INDEX IF NOT EXISTS "commit_statuses_repo_sha_idx"
24 ON "commit_statuses" ("repository_id", "commit_sha");