@simplysf/simply-gitlab 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,124 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://simplysf.github.io/simply-cli/schema/baseline-v1.json",
4
+ "title": "Simply GitLab configuration baseline",
5
+ "description": "What a set of GitLab projects should have in common. Read by `simply gitlab config plan` and `simply gitlab config apply`. Advisory: the CLI's own validator is what runs, and its errors name the exact path that is wrong.",
6
+ "type": "object",
7
+ "required": ["version"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "$schema": { "type": "string" },
11
+ "version": {
12
+ "const": 1,
13
+ "description": "Config format version. Only 1 exists."
14
+ },
15
+ "targets": { "$ref": "#/$defs/targets" },
16
+ "group": { "$ref": "#/$defs/groupDesired" },
17
+ "project": { "$ref": "#/$defs/projectDesired" },
18
+ "overrides": {
19
+ "type": "object",
20
+ "description": "Per-target exceptions, keyed by full project or group path.",
21
+ "additionalProperties": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "project": { "$ref": "#/$defs/projectDesired" },
26
+ "group": { "$ref": "#/$defs/groupDesired" }
27
+ }
28
+ }
29
+ }
30
+ },
31
+ "$defs": {
32
+ "targets": {
33
+ "type": "object",
34
+ "description": "What the run acts on. Groups expand through their subgroups.",
35
+ "additionalProperties": false,
36
+ "anyOf": [{ "required": ["groups"] }, { "required": ["projects"] }],
37
+ "properties": {
38
+ "groups": {
39
+ "type": "array",
40
+ "description": "Group paths or ids. Each expands to every project in the group and its subgroups.",
41
+ "items": { "type": "string", "minLength": 1 }
42
+ },
43
+ "projects": {
44
+ "type": "array",
45
+ "description": "Individual project paths or ids, added to whatever the groups expanded to.",
46
+ "items": { "type": "string", "minLength": 1 }
47
+ },
48
+ "exclude": {
49
+ "type": "array",
50
+ "description": "Removed from the union. A trailing * drops a whole subtree.",
51
+ "items": { "type": "string", "minLength": 1 }
52
+ }
53
+ }
54
+ },
55
+ "groupDesired": {
56
+ "type": "object",
57
+ "additionalProperties": false,
58
+ "properties": {
59
+ "settings": {
60
+ "type": "object",
61
+ "description": "Attributes for PUT /groups/:id. Names are GitLab's own."
62
+ }
63
+ }
64
+ },
65
+ "projectDesired": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "settings": {
70
+ "type": "object",
71
+ "description": "Attributes for PUT /projects/:id — merge method, CI config path, build timeout, and the rest. Names are GitLab's own; only what you declare is compared."
72
+ },
73
+ "protectedBranches": {
74
+ "$ref": "#/$defs/section",
75
+ "description": "Branch protections, keyed by name. Corrected in place with PATCH."
76
+ },
77
+ "protectedTags": {
78
+ "$ref": "#/$defs/section",
79
+ "description": "Tag protections, keyed by name. GitLab has no update endpoint, so a change is a delete and a create."
80
+ },
81
+ "approvals": {
82
+ "type": "object",
83
+ "description": "Project approval settings (Premium/Ultimate)."
84
+ },
85
+ "approvalRules": {
86
+ "$ref": "#/$defs/section",
87
+ "description": "Approval rules, keyed by name (Premium/Ultimate). Accepts `usernames`, group paths under `groups`, and branch names under `protectedBranches`; the ids are resolved for you."
88
+ },
89
+ "pushRules": {
90
+ "type": "object",
91
+ "description": "Push rules (Premium/Ultimate)."
92
+ },
93
+ "variables": {
94
+ "$ref": "#/$defs/section",
95
+ "description": "CI/CD variable metadata, keyed by key + environment_scope. Reported only, never written: creating or updating a variable requires its value, and this file holds none."
96
+ }
97
+ }
98
+ },
99
+ "section": {
100
+ "description": "A list section: a bare array, or an object that can also prune or replace.",
101
+ "oneOf": [
102
+ { "type": "array", "items": { "type": "object" } },
103
+ {
104
+ "type": "object",
105
+ "required": ["entries"],
106
+ "additionalProperties": false,
107
+ "properties": {
108
+ "prune": {
109
+ "type": "boolean",
110
+ "description": "Delete entries that exist on the instance but are not declared here. Off by default, so a first run cannot remove a protection that predates the config.",
111
+ "default": false
112
+ },
113
+ "$replace": {
114
+ "type": "boolean",
115
+ "description": "In an override, replace the baseline's entries entirely instead of merging into them by key.",
116
+ "default": false
117
+ },
118
+ "entries": { "type": "array", "items": { "type": "object" } }
119
+ }
120
+ }
121
+ ]
122
+ }
123
+ }
124
+ }