mirror of
https://github.com/status-im/open-bounty.git
synced 2025-01-11 01:55:58 +00:00
d35b794ca4
Secure Github webhooks (Fixes #18) * Use a unique random secret for webhooks * Validate payload signature when receiving webhook Make enabling + disabling a repo more robust * store repository state instead of enabled flag in DB * atomic toggle UI button (Fixes #17) New UX for managing repos * group repos by owner * look and feel according to UI spec General improvements * only request user's repos via Github API once per session * fix issue with cljs code figwheel reload * simplify app-db structure
16 lines
603 B
SQL
16 lines
603 B
SQL
|
|
CREATE TABLE "public"."repo_state" (
|
|
"id" int,
|
|
"description" character varying(32) NOT NULL,
|
|
PRIMARY KEY ("id")
|
|
);
|
|
|
|
INSERT INTO "public"."repo_state"("id", "description") VALUES(0, 'Not enabled');
|
|
INSERT INTO "public"."repo_state"("id", "description") VALUES(1, 'Creating hook');
|
|
INSERT INTO "public"."repo_state"("id", "description") VALUES(2, 'Enabled');
|
|
INSERT INTO "public"."repo_state"("id", "description") VALUES(-1, 'Failed to create hook');
|
|
|
|
ALTER TABLE "public"."repositories" DROP COLUMN "enabled";
|
|
ALTER TABLE "public"."repositories"
|
|
ADD COLUMN "state" int NOT NULL DEFAULT 0;
|