@simplysf/simply-gitlab 0.5.0 → 0.6.1
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.
package/README.md
CHANGED
|
@@ -150,6 +150,7 @@ exitCode, status?, body?}}` — and nothing to stdout. Exit codes are identical
|
|
|
150
150
|
- [`simply gitlab mr list`](#simply-gitlab-mr-list)
|
|
151
151
|
- [`simply gitlab mr update`](#simply-gitlab-mr-update)
|
|
152
152
|
- [`simply gitlab mr view`](#simply-gitlab-mr-view)
|
|
153
|
+
- [`simply gitlab project create`](#simply-gitlab-project-create)
|
|
153
154
|
- [`simply gitlab project list`](#simply-gitlab-project-list)
|
|
154
155
|
- [`simply gitlab project view`](#simply-gitlab-project-view)
|
|
155
156
|
- [`simply gitlab release list`](#simply-gitlab-release-list)
|
|
@@ -197,7 +198,7 @@ FLAG DESCRIPTIONS
|
|
|
197
198
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
198
199
|
```
|
|
199
200
|
|
|
200
|
-
_See code: [lib/commands/gitlab/branch/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
201
|
+
_See code: [lib/commands/gitlab/branch/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/branch/create.js)_
|
|
201
202
|
|
|
202
203
|
## `simply gitlab branch list`
|
|
203
204
|
|
|
@@ -240,7 +241,7 @@ FLAG DESCRIPTIONS
|
|
|
240
241
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
241
242
|
```
|
|
242
243
|
|
|
243
|
-
_See code: [lib/commands/gitlab/branch/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
244
|
+
_See code: [lib/commands/gitlab/branch/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/branch/list.js)_
|
|
244
245
|
|
|
245
246
|
## `simply gitlab ci environment list`
|
|
246
247
|
|
|
@@ -286,7 +287,7 @@ FLAG DESCRIPTIONS
|
|
|
286
287
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
287
288
|
```
|
|
288
289
|
|
|
289
|
-
_See code: [lib/commands/gitlab/ci/environment/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
290
|
+
_See code: [lib/commands/gitlab/ci/environment/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/environment/list.js)_
|
|
290
291
|
|
|
291
292
|
## `simply gitlab ci job list`
|
|
292
293
|
|
|
@@ -330,7 +331,7 @@ FLAG DESCRIPTIONS
|
|
|
330
331
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
331
332
|
```
|
|
332
333
|
|
|
333
|
-
_See code: [lib/commands/gitlab/ci/job/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
334
|
+
_See code: [lib/commands/gitlab/ci/job/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/list.js)_
|
|
334
335
|
|
|
335
336
|
## `simply gitlab ci job log`
|
|
336
337
|
|
|
@@ -375,7 +376,7 @@ FLAG DESCRIPTIONS
|
|
|
375
376
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
376
377
|
```
|
|
377
378
|
|
|
378
|
-
_See code: [lib/commands/gitlab/ci/job/log.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
379
|
+
_See code: [lib/commands/gitlab/ci/job/log.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/job/log.js)_
|
|
379
380
|
|
|
380
381
|
## `simply gitlab ci variable list`
|
|
381
382
|
|
|
@@ -426,7 +427,7 @@ FLAG DESCRIPTIONS
|
|
|
426
427
|
where this output is going.
|
|
427
428
|
```
|
|
428
429
|
|
|
429
|
-
_See code: [lib/commands/gitlab/ci/variable/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
430
|
+
_See code: [lib/commands/gitlab/ci/variable/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/ci/variable/list.js)_
|
|
430
431
|
|
|
431
432
|
## `simply gitlab commit create`
|
|
432
433
|
|
|
@@ -486,7 +487,7 @@ FLAG DESCRIPTIONS
|
|
|
486
487
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
487
488
|
```
|
|
488
489
|
|
|
489
|
-
_See code: [lib/commands/gitlab/commit/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
490
|
+
_See code: [lib/commands/gitlab/commit/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/create.js)_
|
|
490
491
|
|
|
491
492
|
## `simply gitlab commit diff`
|
|
492
493
|
|
|
@@ -528,7 +529,7 @@ FLAG DESCRIPTIONS
|
|
|
528
529
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
529
530
|
```
|
|
530
531
|
|
|
531
|
-
_See code: [lib/commands/gitlab/commit/diff.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
532
|
+
_See code: [lib/commands/gitlab/commit/diff.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/diff.js)_
|
|
532
533
|
|
|
533
534
|
## `simply gitlab commit list`
|
|
534
535
|
|
|
@@ -579,7 +580,7 @@ FLAG DESCRIPTIONS
|
|
|
579
580
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
580
581
|
```
|
|
581
582
|
|
|
582
|
-
_See code: [lib/commands/gitlab/commit/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
583
|
+
_See code: [lib/commands/gitlab/commit/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/list.js)_
|
|
583
584
|
|
|
584
585
|
## `simply gitlab commit view`
|
|
585
586
|
|
|
@@ -620,7 +621,7 @@ FLAG DESCRIPTIONS
|
|
|
620
621
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
621
622
|
```
|
|
622
623
|
|
|
623
|
-
_See code: [lib/commands/gitlab/commit/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
624
|
+
_See code: [lib/commands/gitlab/commit/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/commit/view.js)_
|
|
624
625
|
|
|
625
626
|
## `simply gitlab config apply`
|
|
626
627
|
|
|
@@ -687,7 +688,7 @@ FLAG DESCRIPTIONS
|
|
|
687
688
|
the config does not target is an error rather than a silent no-op.
|
|
688
689
|
```
|
|
689
690
|
|
|
690
|
-
_See code: [lib/commands/gitlab/config/apply.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
691
|
+
_See code: [lib/commands/gitlab/config/apply.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/config/apply.js)_
|
|
691
692
|
|
|
692
693
|
## `simply gitlab config export`
|
|
693
694
|
|
|
@@ -738,7 +739,7 @@ FLAG DESCRIPTIONS
|
|
|
738
739
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
739
740
|
```
|
|
740
741
|
|
|
741
|
-
_See code: [lib/commands/gitlab/config/export.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
742
|
+
_See code: [lib/commands/gitlab/config/export.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/config/export.js)_
|
|
742
743
|
|
|
743
744
|
## `simply gitlab config plan`
|
|
744
745
|
|
|
@@ -806,7 +807,7 @@ FLAG DESCRIPTIONS
|
|
|
806
807
|
the config does not target is an error rather than a silent no-op.
|
|
807
808
|
```
|
|
808
809
|
|
|
809
|
-
_See code: [lib/commands/gitlab/config/plan.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
810
|
+
_See code: [lib/commands/gitlab/config/plan.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/config/plan.js)_
|
|
810
811
|
|
|
811
812
|
## `simply gitlab file create`
|
|
812
813
|
|
|
@@ -858,7 +859,7 @@ FLAG DESCRIPTIONS
|
|
|
858
859
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
859
860
|
```
|
|
860
861
|
|
|
861
|
-
_See code: [lib/commands/gitlab/file/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
862
|
+
_See code: [lib/commands/gitlab/file/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/file/create.js)_
|
|
862
863
|
|
|
863
864
|
## `simply gitlab file update`
|
|
864
865
|
|
|
@@ -911,7 +912,7 @@ FLAG DESCRIPTIONS
|
|
|
911
912
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
912
913
|
```
|
|
913
914
|
|
|
914
|
-
_See code: [lib/commands/gitlab/file/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
915
|
+
_See code: [lib/commands/gitlab/file/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/file/update.js)_
|
|
915
916
|
|
|
916
917
|
## `simply gitlab file view`
|
|
917
918
|
|
|
@@ -957,7 +958,7 @@ FLAG DESCRIPTIONS
|
|
|
957
958
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
958
959
|
```
|
|
959
960
|
|
|
960
|
-
_See code: [lib/commands/gitlab/file/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
961
|
+
_See code: [lib/commands/gitlab/file/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/file/view.js)_
|
|
961
962
|
|
|
962
963
|
## `simply gitlab mr create`
|
|
963
964
|
|
|
@@ -1018,7 +1019,7 @@ FLAG DESCRIPTIONS
|
|
|
1018
1019
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1019
1020
|
```
|
|
1020
1021
|
|
|
1021
|
-
_See code: [lib/commands/gitlab/mr/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1022
|
+
_See code: [lib/commands/gitlab/mr/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/create.js)_
|
|
1022
1023
|
|
|
1023
1024
|
## `simply gitlab mr list`
|
|
1024
1025
|
|
|
@@ -1072,7 +1073,7 @@ FLAG DESCRIPTIONS
|
|
|
1072
1073
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1073
1074
|
```
|
|
1074
1075
|
|
|
1075
|
-
_See code: [lib/commands/gitlab/mr/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1076
|
+
_See code: [lib/commands/gitlab/mr/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/list.js)_
|
|
1076
1077
|
|
|
1077
1078
|
## `simply gitlab mr update`
|
|
1078
1079
|
|
|
@@ -1136,7 +1137,7 @@ FLAG DESCRIPTIONS
|
|
|
1136
1137
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1137
1138
|
```
|
|
1138
1139
|
|
|
1139
|
-
_See code: [lib/commands/gitlab/mr/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1140
|
+
_See code: [lib/commands/gitlab/mr/update.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/update.js)_
|
|
1140
1141
|
|
|
1141
1142
|
## `simply gitlab mr view`
|
|
1142
1143
|
|
|
@@ -1177,7 +1178,89 @@ FLAG DESCRIPTIONS
|
|
|
1177
1178
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1178
1179
|
```
|
|
1179
1180
|
|
|
1180
|
-
_See code: [lib/commands/gitlab/mr/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1181
|
+
_See code: [lib/commands/gitlab/mr/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/mr/view.js)_
|
|
1182
|
+
|
|
1183
|
+
## `simply gitlab project create`
|
|
1184
|
+
|
|
1185
|
+
Create a project, blank or from a template.
|
|
1186
|
+
|
|
1187
|
+
```
|
|
1188
|
+
USAGE
|
|
1189
|
+
$ simply gitlab project create [--json] [-e <value>] [--gitlab-url <value>] [--gitlab-token <value>] [--dry-run] [--name
|
|
1190
|
+
<value>] [--path <value>] [--namespace <value>] [--description <value>] [--visibility private|internal|public]
|
|
1191
|
+
[--default-branch <value>] [--initialize-with-readme] [--topics <value>] [--template <value>] [--custom-template]
|
|
1192
|
+
[--template-group <value>] [--template-project <value>] [--body <value> | --body-file <value>]
|
|
1193
|
+
|
|
1194
|
+
FLAGS
|
|
1195
|
+
--body=<value> Raw JSON request body.
|
|
1196
|
+
--body-file=<value> Path to a file holding the raw JSON request body.
|
|
1197
|
+
--custom-template Look --template up among the instance's custom project templates rather than the built-in
|
|
1198
|
+
ones.
|
|
1199
|
+
--default-branch=<value> Name of the default branch.
|
|
1200
|
+
--description=<value> Project description.
|
|
1201
|
+
--dry-run Print the request that would be sent and exit without sending it.
|
|
1202
|
+
--initialize-with-readme Create a first commit holding a README, so the repository is not empty.
|
|
1203
|
+
--name=<value> Project name. The path is derived from it when --path is not given.
|
|
1204
|
+
--namespace=<value> Group or user namespace to create the project in, by id or full path.
|
|
1205
|
+
--path=<value> Repository path, the URL slug. The name is derived from it when --name is not given.
|
|
1206
|
+
--template=<value> Template to create from: a built-in name, or with --custom-template or --template-group a
|
|
1207
|
+
custom one.
|
|
1208
|
+
--template-group=<value> Group whose custom project templates --template or --template-project names, by id or full
|
|
1209
|
+
path.
|
|
1210
|
+
--template-project=<value> Custom template project to create from, by id or full path. Cannot be combined with
|
|
1211
|
+
--template.
|
|
1212
|
+
--topics=<value> Comma-separated topics to label the project with.
|
|
1213
|
+
--visibility=<option> Who can see the project.
|
|
1214
|
+
<options: private|internal|public>
|
|
1215
|
+
|
|
1216
|
+
CONNECTION FLAGS
|
|
1217
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1218
|
+
--gitlab-token=<value> [env: GITLAB_TOKEN] Personal, project, or group access token.
|
|
1219
|
+
--gitlab-url=<value> [env: GITLAB_URL] Base URL of the GitLab instance. Defaults to https://gitlab.com.
|
|
1220
|
+
|
|
1221
|
+
GLOBAL FLAGS
|
|
1222
|
+
--json Format output as json.
|
|
1223
|
+
|
|
1224
|
+
DESCRIPTION
|
|
1225
|
+
Create a project, blank or from a template.
|
|
1226
|
+
|
|
1227
|
+
Creates the project in --namespace, or in the namespace of the token owner when none is given. Give it --name or
|
|
1228
|
+
--path; GitLab derives whichever one is missing.
|
|
1229
|
+
|
|
1230
|
+
--template names one of the built-in templates GitLab ships, such as express or rails. To create from a custom
|
|
1231
|
+
template instead, add --custom-template for one the instance administrator registered, --template-group for one in a
|
|
1232
|
+
group, or use --template-project to name the template project itself by id or path — which GitLab prefers, because a
|
|
1233
|
+
name can be ambiguous. Add --template-group to --template-project when the template belongs to a group rather than the
|
|
1234
|
+
instance. Custom templates need a Premium or Ultimate instance.
|
|
1235
|
+
|
|
1236
|
+
A template is applied asynchronously: this command returns as soon as the project record exists, with an import status
|
|
1237
|
+
of "scheduled", and the files arrive a few seconds later. Check "project view" until its import_status reads
|
|
1238
|
+
"finished" before writing to the repository. --dry-run prints the exact request body; a namespace or template given as
|
|
1239
|
+
a path is still looked up, so the printed ids are the ones that would be sent.
|
|
1240
|
+
|
|
1241
|
+
EXAMPLES
|
|
1242
|
+
$ simply gitlab project create --name new-service --namespace platform/apps
|
|
1243
|
+
|
|
1244
|
+
$ simply gitlab project create --name new-service --namespace platform/apps --template express --visibility internal
|
|
1245
|
+
|
|
1246
|
+
$ simply gitlab project create --name new-service --namespace platform/apps --template service-skeleton --template-group platform/templates
|
|
1247
|
+
|
|
1248
|
+
$ simply gitlab project create --path new-service --template-project platform/templates/service-skeleton --dry-run
|
|
1249
|
+
|
|
1250
|
+
$ simply gitlab project create --name new-service --template-project platform/templates/service-skeleton --template-group platform/templates
|
|
1251
|
+
|
|
1252
|
+
FLAG DESCRIPTIONS
|
|
1253
|
+
-e, --env-file=<value> Path to a .env file holding connection settings.
|
|
1254
|
+
|
|
1255
|
+
Loaded before anything else. Variables already present in the environment win, so the file never overrides an
|
|
1256
|
+
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1257
|
+
|
|
1258
|
+
--namespace=<value> Group or user namespace to create the project in, by id or full path.
|
|
1259
|
+
|
|
1260
|
+
Defaults to the namespace of the token owner.
|
|
1261
|
+
```
|
|
1262
|
+
|
|
1263
|
+
_See code: [lib/commands/gitlab/project/create.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/project/create.js)_
|
|
1181
1264
|
|
|
1182
1265
|
## `simply gitlab project list`
|
|
1183
1266
|
|
|
@@ -1224,7 +1307,7 @@ FLAG DESCRIPTIONS
|
|
|
1224
1307
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1225
1308
|
```
|
|
1226
1309
|
|
|
1227
|
-
_See code: [lib/commands/gitlab/project/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1310
|
+
_See code: [lib/commands/gitlab/project/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/project/list.js)_
|
|
1228
1311
|
|
|
1229
1312
|
## `simply gitlab project view`
|
|
1230
1313
|
|
|
@@ -1263,7 +1346,7 @@ FLAG DESCRIPTIONS
|
|
|
1263
1346
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1264
1347
|
```
|
|
1265
1348
|
|
|
1266
|
-
_See code: [lib/commands/gitlab/project/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1349
|
+
_See code: [lib/commands/gitlab/project/view.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/project/view.js)_
|
|
1267
1350
|
|
|
1268
1351
|
## `simply gitlab release list`
|
|
1269
1352
|
|
|
@@ -1304,7 +1387,7 @@ FLAG DESCRIPTIONS
|
|
|
1304
1387
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1305
1388
|
```
|
|
1306
1389
|
|
|
1307
|
-
_See code: [lib/commands/gitlab/release/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1390
|
+
_See code: [lib/commands/gitlab/release/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/release/list.js)_
|
|
1308
1391
|
|
|
1309
1392
|
## `simply gitlab search`
|
|
1310
1393
|
|
|
@@ -1359,7 +1442,7 @@ FLAG DESCRIPTIONS
|
|
|
1359
1442
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1360
1443
|
```
|
|
1361
1444
|
|
|
1362
|
-
_See code: [lib/commands/gitlab/search.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1445
|
+
_See code: [lib/commands/gitlab/search.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/search.js)_
|
|
1363
1446
|
|
|
1364
1447
|
## `simply gitlab tag list`
|
|
1365
1448
|
|
|
@@ -1406,7 +1489,7 @@ FLAG DESCRIPTIONS
|
|
|
1406
1489
|
explicit export, and only GitLab connection variables are read from it. A path that cannot be read is an error.
|
|
1407
1490
|
```
|
|
1408
1491
|
|
|
1409
|
-
_See code: [lib/commands/gitlab/tag/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.
|
|
1492
|
+
_See code: [lib/commands/gitlab/tag/list.js](https://github.com/SimplySF/simply-gitlab/blob/@simplysf/simply-gitlab@0.5.0/packages/simply-gitlab/lib/commands/gitlab/tag/list.js)_
|
|
1410
1493
|
<!-- commandsstop -->
|
|
1411
1494
|
|
|
1412
1495
|
## License
|
|
@@ -3,9 +3,9 @@ title: Write safety
|
|
|
3
3
|
description: The layers between a Simply GitLab command and a change to your repository, which of them is a real boundary, and why CI variable values are hidden by default.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
`mr create`, and `mr update`. Nothing in this CLI deletes anything. Those
|
|
8
|
-
layers, and only the last is a real boundary.
|
|
6
|
+
Seven commands change data — `project create`, `branch create`, `file create`, `file update`,
|
|
7
|
+
`commit create`, `mr create`, and `mr update`. Nothing in this CLI deletes anything. Those seven sit
|
|
8
|
+
behind several layers, and only the last is a real boundary.
|
|
9
9
|
|
|
10
10
|
## No `--confirm`, deliberately
|
|
11
11
|
|
|
@@ -19,8 +19,9 @@ something is the one that brings it back.
|
|
|
19
19
|
|
|
20
20
|
## `--dry-run`
|
|
21
21
|
|
|
22
|
-
Accepted by all
|
|
23
|
-
is the cheapest way to see what is about to happen
|
|
22
|
+
Accepted by all seven. It prints the exact request body that would be sent and sends nothing, which
|
|
23
|
+
is the cheapest way to see what is about to happen. The one nuance is `project create`: a namespace
|
|
24
|
+
or template given as a path is still looked up, so the printed ids are the ones that would be sent.
|
|
24
25
|
|
|
25
26
|
```sh
|
|
26
27
|
simply gitlab mr create --project group/project \
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { GitLabCommand } from '../../../shared/base-command.js';
|
|
2
|
+
export default class GitlabProjectCreate extends GitLabCommand<typeof GitlabProjectCreate> {
|
|
3
|
+
static isWrite: boolean;
|
|
4
|
+
static readonly summary = "Create a project, blank or from a template.";
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly flags: {
|
|
8
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
path: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
namespace: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
visibility: import("@oclif/core/interfaces").OptionFlag<"private" | "internal" | "public" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'default-branch': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'initialize-with-readme': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
topics: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
template: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
17
|
+
'custom-template': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
18
|
+
'template-group': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
19
|
+
'template-project': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
20
|
+
body: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
21
|
+
'body-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
22
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
23
|
+
};
|
|
24
|
+
run(): Promise<unknown>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags } from '@oclif/core';
|
|
17
|
+
import { formatKeyValue, parseBodyInput, prepareProjectCreate } from '@simplysf/simply-gitlab-core';
|
|
18
|
+
import { GitLabCommand, parseList, writeFlags } from '../../../shared/base-command.js';
|
|
19
|
+
export default class GitlabProjectCreate extends GitLabCommand {
|
|
20
|
+
static isWrite = true;
|
|
21
|
+
static summary = 'Create a project, blank or from a template.';
|
|
22
|
+
static description = 'Creates the project in --namespace, or in the namespace of the token owner when none is ' +
|
|
23
|
+
'given. Give it --name or --path; GitLab derives whichever one is missing.\n\n' +
|
|
24
|
+
'--template names one of the built-in templates GitLab ships, such as express or rails. To ' +
|
|
25
|
+
'create from a custom template instead, add --custom-template for one the instance ' +
|
|
26
|
+
'administrator registered, --template-group for one in a group, or use --template-project ' +
|
|
27
|
+
'to name the template project itself by id or path — which GitLab prefers, because a name ' +
|
|
28
|
+
'can be ambiguous. Add --template-group to --template-project when the template belongs to ' +
|
|
29
|
+
'a group rather than the instance. Custom templates need a Premium or Ultimate instance.\n\n' +
|
|
30
|
+
'A template is applied asynchronously: this command returns as soon as the project record ' +
|
|
31
|
+
'exists, with an import status of "scheduled", and the files arrive a few seconds later. ' +
|
|
32
|
+
'Check "project view" until its import_status reads "finished" before writing to the ' +
|
|
33
|
+
'repository. --dry-run prints the exact request body; a namespace or template given as a ' +
|
|
34
|
+
'path is still looked up, so the printed ids are the ones that would be sent.';
|
|
35
|
+
static examples = [
|
|
36
|
+
'<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps',
|
|
37
|
+
'<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template express --visibility internal',
|
|
38
|
+
'<%= config.bin %> <%= command.id %> --name new-service --namespace platform/apps --template service-skeleton --template-group platform/templates',
|
|
39
|
+
'<%= config.bin %> <%= command.id %> --path new-service --template-project platform/templates/service-skeleton --dry-run',
|
|
40
|
+
'<%= config.bin %> <%= command.id %> --name new-service --template-project platform/templates/service-skeleton --template-group platform/templates',
|
|
41
|
+
];
|
|
42
|
+
static flags = {
|
|
43
|
+
...writeFlags,
|
|
44
|
+
name: Flags.string({ summary: 'Project name. The path is derived from it when --path is not given.' }),
|
|
45
|
+
path: Flags.string({
|
|
46
|
+
summary: 'Repository path, the URL slug. The name is derived from it when --name is not given.',
|
|
47
|
+
}),
|
|
48
|
+
namespace: Flags.string({
|
|
49
|
+
summary: 'Group or user namespace to create the project in, by id or full path.',
|
|
50
|
+
description: 'Defaults to the namespace of the token owner.',
|
|
51
|
+
}),
|
|
52
|
+
description: Flags.string({ summary: 'Project description.' }),
|
|
53
|
+
visibility: Flags.option({
|
|
54
|
+
summary: 'Who can see the project.',
|
|
55
|
+
options: ['private', 'internal', 'public'],
|
|
56
|
+
})(),
|
|
57
|
+
'default-branch': Flags.string({ summary: 'Name of the default branch.' }),
|
|
58
|
+
'initialize-with-readme': Flags.boolean({
|
|
59
|
+
summary: 'Create a first commit holding a README, so the repository is not empty.',
|
|
60
|
+
default: false,
|
|
61
|
+
}),
|
|
62
|
+
topics: Flags.string({ summary: 'Comma-separated topics to label the project with.' }),
|
|
63
|
+
template: Flags.string({
|
|
64
|
+
summary: 'Template to create from: a built-in name, or with --custom-template or --template-group a custom one.',
|
|
65
|
+
}),
|
|
66
|
+
'custom-template': Flags.boolean({
|
|
67
|
+
summary: "Look --template up among the instance's custom project templates rather than the built-in ones.",
|
|
68
|
+
default: false,
|
|
69
|
+
}),
|
|
70
|
+
'template-group': Flags.string({
|
|
71
|
+
summary: 'Group whose custom project templates --template or --template-project names, by id or full path.',
|
|
72
|
+
}),
|
|
73
|
+
'template-project': Flags.string({
|
|
74
|
+
summary: 'Custom template project to create from, by id or full path. Cannot be combined with --template.',
|
|
75
|
+
}),
|
|
76
|
+
body: Flags.string({ summary: 'Raw JSON request body.', exclusive: ['body-file'] }),
|
|
77
|
+
'body-file': Flags.string({ summary: 'Path to a file holding the raw JSON request body.' }),
|
|
78
|
+
};
|
|
79
|
+
async run() {
|
|
80
|
+
const client = this.gitlab();
|
|
81
|
+
const request = await prepareProjectCreate(client, {
|
|
82
|
+
name: this.flags.name,
|
|
83
|
+
path: this.flags.path,
|
|
84
|
+
namespace: this.flags.namespace,
|
|
85
|
+
description: this.flags.description,
|
|
86
|
+
visibility: this.flags.visibility,
|
|
87
|
+
defaultBranch: this.flags['default-branch'],
|
|
88
|
+
initializeWithReadme: this.flags['initialize-with-readme'] || undefined,
|
|
89
|
+
topics: parseList(this.flags.topics),
|
|
90
|
+
template: this.flags.template,
|
|
91
|
+
customTemplate: this.flags['custom-template'] || undefined,
|
|
92
|
+
templateGroup: this.flags['template-group'],
|
|
93
|
+
templateProject: this.flags['template-project'],
|
|
94
|
+
body: parseBodyInput(this.flags.body, this.flags['body-file']),
|
|
95
|
+
});
|
|
96
|
+
if (this.flags['dry-run']) {
|
|
97
|
+
this.log('Dry run — not sent. Request body:');
|
|
98
|
+
this.logSafe(JSON.stringify(request, null, 2));
|
|
99
|
+
return request;
|
|
100
|
+
}
|
|
101
|
+
const created = (await client.createProject(request));
|
|
102
|
+
this.logSafe(formatKeyValue([
|
|
103
|
+
['Created', created.path_with_namespace ?? this.flags.name ?? this.flags.path],
|
|
104
|
+
['ID', created.id],
|
|
105
|
+
['Visibility', created.visibility],
|
|
106
|
+
['Default branch', created.default_branch],
|
|
107
|
+
['Import status', created.import_status],
|
|
108
|
+
['URL', created.web_url],
|
|
109
|
+
]));
|
|
110
|
+
return created;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/project/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,iCA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