repository-provider 32.7.14 → 32.7.16
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 +43 -52
- package/package.json +2 -2
- package/src/attribute-extras.mjs +2 -2
- package/src/base-object.mjs +3 -3
- package/src/base-provider.mjs +11 -11
- package/src/branch.mjs +7 -10
- package/src/commit.mjs +1 -1
- package/src/multi-group-provider.mjs +3 -3
- package/src/named-object.mjs +2 -2
- package/src/owned-object.mjs +5 -5
- package/src/pull-request.mjs +6 -6
- package/src/ref.mjs +1 -1
- package/src/repository-group.mjs +1 -3
- package/src/repository-owner.mjs +7 -7
- package/src/repository.mjs +17 -15
package/README.md
CHANGED
|
@@ -422,7 +422,7 @@ mapAttributes({a:1},{a:"a'"}) // {"a'": 1}
|
|
|
422
422
|
|
|
423
423
|
### Parameters
|
|
424
424
|
|
|
425
|
-
* `object` **
|
|
425
|
+
* `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
426
426
|
* `mapping` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
427
427
|
|
|
428
428
|
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** keys renamed after mapping
|
|
@@ -435,7 +435,7 @@ Filters out null, undefined and empty strings
|
|
|
435
435
|
### Parameters
|
|
436
436
|
|
|
437
437
|
* `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
438
|
-
* `mapping` **
|
|
438
|
+
* `mapping` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
439
439
|
|
|
440
440
|
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** keys renamed after mapping
|
|
441
441
|
|
|
@@ -520,8 +520,8 @@ Creates an instance of BaseObject.
|
|
|
520
520
|
|
|
521
521
|
### Parameters
|
|
522
522
|
|
|
523
|
-
* `options` **
|
|
524
|
-
* `additionalProperties` **
|
|
523
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
524
|
+
* `additionalProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
525
525
|
|
|
526
526
|
### updateAttributes
|
|
527
527
|
|
|
@@ -529,7 +529,7 @@ Takes values from options.
|
|
|
529
529
|
|
|
530
530
|
#### Parameters
|
|
531
531
|
|
|
532
|
-
* `options` **
|
|
532
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
533
533
|
* `additionalProperties`  
|
|
534
534
|
|
|
535
535
|
### update
|
|
@@ -651,7 +651,7 @@ Does the provider support the base name.
|
|
|
651
651
|
|
|
652
652
|
#### Parameters
|
|
653
653
|
|
|
654
|
-
* `base` **
|
|
654
|
+
* `base` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** to be checked
|
|
655
655
|
|
|
656
656
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if base is supported or base is undefined
|
|
657
657
|
|
|
@@ -700,7 +700,7 @@ base, group, repository and branch.
|
|
|
700
700
|
|
|
701
701
|
#### Parameters
|
|
702
702
|
|
|
703
|
-
* `name` **
|
|
703
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
|
|
704
704
|
* `focus` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** where lies the focus if only one path component is given (optional, default `"repository"`)
|
|
705
705
|
|
|
706
706
|
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** with separated attributes
|
|
@@ -712,7 +712,7 @@ Create a repository.
|
|
|
712
712
|
#### Parameters
|
|
713
713
|
|
|
714
714
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of group and repository
|
|
715
|
-
* `options` **
|
|
715
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
716
716
|
|
|
717
717
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Repository](#repository)>** 
|
|
718
718
|
|
|
@@ -731,7 +731,7 @@ List projects.
|
|
|
731
731
|
|
|
732
732
|
#### Parameters
|
|
733
733
|
|
|
734
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
734
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
735
735
|
|
|
736
736
|
Returns **AsyncIterator<[Project](#project)>** all matching projects of the provider
|
|
737
737
|
|
|
@@ -741,7 +741,7 @@ List milestones.
|
|
|
741
741
|
|
|
742
742
|
#### Parameters
|
|
743
743
|
|
|
744
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
744
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
745
745
|
|
|
746
746
|
Returns **AsyncIterator<[Milestone](#milestone)>** all matching milestones of the provider
|
|
747
747
|
|
|
@@ -751,7 +751,7 @@ List repositories.
|
|
|
751
751
|
|
|
752
752
|
#### Parameters
|
|
753
753
|
|
|
754
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
754
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
755
755
|
|
|
756
756
|
Returns **AsyncIterator<[Repository](#repository)>** all matching repos of the provider
|
|
757
757
|
|
|
@@ -761,7 +761,7 @@ List branches.
|
|
|
761
761
|
|
|
762
762
|
#### Parameters
|
|
763
763
|
|
|
764
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
764
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
765
765
|
|
|
766
766
|
Returns **AsyncIterator<[Branch](#branch)>** all matching branches of the provider
|
|
767
767
|
|
|
@@ -771,7 +771,7 @@ List tags.
|
|
|
771
771
|
|
|
772
772
|
#### Parameters
|
|
773
773
|
|
|
774
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
774
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
775
775
|
|
|
776
776
|
Returns **AsyncIterator<[Tag](#tag)>** all matching tags of the provider
|
|
777
777
|
|
|
@@ -781,7 +781,7 @@ List hooks.
|
|
|
781
781
|
|
|
782
782
|
#### Parameters
|
|
783
783
|
|
|
784
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
784
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
785
785
|
|
|
786
786
|
Returns **AsyncIterator<[Hook](#hook)>** all matching hooks of the provider
|
|
787
787
|
|
|
@@ -791,7 +791,7 @@ List pull requests.
|
|
|
791
791
|
|
|
792
792
|
#### Parameters
|
|
793
793
|
|
|
794
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
794
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
795
795
|
|
|
796
796
|
Returns **AsyncIterator<[PullRequest](#pullrequest)>** all matching pullRequests of the provider
|
|
797
797
|
|
|
@@ -841,7 +841,7 @@ Object with the detected key value pairs is delivered.
|
|
|
841
841
|
|
|
842
842
|
#### Parameters
|
|
843
843
|
|
|
844
|
-
* `env` **
|
|
844
|
+
* `env` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** as from process.env
|
|
845
845
|
* `instanceIdentifier` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** part of variable name. (optional, default `this.instanceIdentifier`)
|
|
846
846
|
|
|
847
847
|
Returns **([Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** undefined if no suitable environment variables have been found
|
|
@@ -947,7 +947,7 @@ Add commits into a pull request.
|
|
|
947
947
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
948
948
|
|
|
949
949
|
* `options.pullRequestBranch` **([Branch](#branch) | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))** to commit into
|
|
950
|
-
* `options.dry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** do not create a branch and do not commit only create dummy PR
|
|
950
|
+
* `options.dry` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** do not create a branch and do not commit only create dummy PR (optional, default `false`)
|
|
951
951
|
* `options.skipWithoutCommits` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** do not create a PR if no commits are given
|
|
952
952
|
* `options.bodyFromCommitMessages` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** generate body from commit messages
|
|
953
953
|
* `options.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** body of the PR
|
|
@@ -969,7 +969,7 @@ Create a pull request.
|
|
|
969
969
|
#### Parameters
|
|
970
970
|
|
|
971
971
|
* `toBranch` **[Branch](#branch)** 
|
|
972
|
-
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
972
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
973
973
|
|
|
974
974
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>** 
|
|
975
975
|
|
|
@@ -981,7 +981,7 @@ Simply calls Repository.createBranch() with the receiver as source branch
|
|
|
981
981
|
#### Parameters
|
|
982
982
|
|
|
983
983
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** the new branch
|
|
984
|
-
* `options` **
|
|
984
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** passed through
|
|
985
985
|
|
|
986
986
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** newly created branch (or already present old one with the same name)
|
|
987
987
|
|
|
@@ -1063,7 +1063,7 @@ List groups.
|
|
|
1063
1063
|
|
|
1064
1064
|
#### Parameters
|
|
1065
1065
|
|
|
1066
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))
|
|
1066
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1067
1067
|
|
|
1068
1068
|
Returns **AsyncIterator<[RepositoryGroup](#repositorygroup)>** all matching repositories groups of the provider
|
|
1069
1069
|
|
|
@@ -1075,7 +1075,7 @@ If there is already a group for the given name it will be returend instead
|
|
|
1075
1075
|
#### Parameters
|
|
1076
1076
|
|
|
1077
1077
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the group
|
|
1078
|
-
* `options` **
|
|
1078
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1079
1079
|
|
|
1080
1080
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[RepositoryGroup](#repositorygroup)>** 
|
|
1081
1081
|
|
|
@@ -1086,7 +1086,7 @@ Add a new repository group (not provider specific actions are executed).
|
|
|
1086
1086
|
#### Parameters
|
|
1087
1087
|
|
|
1088
1088
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the group
|
|
1089
|
-
* `options` **
|
|
1089
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1090
1090
|
|
|
1091
1091
|
Returns **[RepositoryGroup](#repositorygroup)** 
|
|
1092
1092
|
|
|
@@ -1099,8 +1099,9 @@ Object with a name.
|
|
|
1099
1099
|
### Parameters
|
|
1100
1100
|
|
|
1101
1101
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1102
|
-
* `options` **
|
|
1103
|
-
* `additionalProperties`
|
|
1102
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1103
|
+
* `additionalProperties`  
|
|
1104
|
+
* `Object` |
|
|
1104
1105
|
|
|
1105
1106
|
### Properties
|
|
1106
1107
|
|
|
@@ -1225,32 +1226,22 @@ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference
|
|
|
1225
1226
|
|
|
1226
1227
|
By default we use the owners implementation.
|
|
1227
1228
|
|
|
1228
|
-
Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
|
|
1229
|
-
|
|
1230
1229
|
### branchClass
|
|
1231
1230
|
|
|
1232
1231
|
By default we use the owners implementation.
|
|
1233
1232
|
|
|
1234
|
-
Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
|
|
1235
|
-
|
|
1236
1233
|
### tagClass
|
|
1237
1234
|
|
|
1238
1235
|
By default we use the owners implementation.
|
|
1239
1236
|
|
|
1240
|
-
Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
|
|
1241
|
-
|
|
1242
1237
|
### entryClass
|
|
1243
1238
|
|
|
1244
1239
|
By default we use the owners implementation.
|
|
1245
1240
|
|
|
1246
|
-
Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
|
|
1247
|
-
|
|
1248
1241
|
### hookClass
|
|
1249
1242
|
|
|
1250
1243
|
By default we use the owners implementation.
|
|
1251
1244
|
|
|
1252
|
-
Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
|
|
1253
|
-
|
|
1254
1245
|
### addMethodName
|
|
1255
1246
|
|
|
1256
1247
|
Method name to be called to register one instance in the owner.
|
|
@@ -1281,7 +1272,7 @@ Abstract pull request.
|
|
|
1281
1272
|
* `source` **[Branch](#branch)** merge source
|
|
1282
1273
|
* `owner` **[Branch](#branch)** merge target
|
|
1283
1274
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1284
|
-
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1275
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1285
1276
|
|
|
1286
1277
|
* `options.title` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
|
|
1287
1278
|
* `options.state` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** 
|
|
@@ -1369,10 +1360,10 @@ Result will be filtered by source branch, destination branch and states
|
|
|
1369
1360
|
#### Parameters
|
|
1370
1361
|
|
|
1371
1362
|
* `repository` **[Repository](#repository)** 
|
|
1372
|
-
* `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1363
|
+
* `filter` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1373
1364
|
|
|
1374
|
-
* `filter.source` **[Branch](#branch)
|
|
1375
|
-
* `filter.destination` **[Branch](#branch)
|
|
1365
|
+
* `filter.source` **[Branch](#branch)??** 
|
|
1366
|
+
* `filter.destination` **[Branch](#branch)??** 
|
|
1376
1367
|
* `filter.states` **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>?** 
|
|
1377
1368
|
|
|
1378
1369
|
Returns **AsyncIterator<[PullRequest](#pullrequest)>** 
|
|
@@ -1385,7 +1376,7 @@ Open a pull request
|
|
|
1385
1376
|
|
|
1386
1377
|
* `source` **[Branch](#branch)** 
|
|
1387
1378
|
* `destination` **[Branch](#branch)** 
|
|
1388
|
-
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1379
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1389
1380
|
|
|
1390
1381
|
## state
|
|
1391
1382
|
|
|
@@ -1447,7 +1438,7 @@ List entries of the branch.
|
|
|
1447
1438
|
|
|
1448
1439
|
#### Parameters
|
|
1449
1440
|
|
|
1450
|
-
* `matchingPatterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
1441
|
+
* `matchingPatterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1451
1442
|
|
|
1452
1443
|
Returns **AsyncIterator<[ContentEntry](#contententry)>** all matching entries in the branch
|
|
1453
1444
|
|
|
@@ -1557,7 +1548,7 @@ Abstract repository collection.
|
|
|
1557
1548
|
|
|
1558
1549
|
* `provider` **[BaseProvider](#baseprovider)** 
|
|
1559
1550
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the group
|
|
1560
|
-
* `options` **
|
|
1551
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1561
1552
|
|
|
1562
1553
|
* `options.description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** human readable description
|
|
1563
1554
|
* `options.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** internal id
|
|
@@ -1599,7 +1590,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
1599
1590
|
|
|
1600
1591
|
* `owner` **[RepositoryOwner](#repositoryowner)** 
|
|
1601
1592
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (#branch) will be removed
|
|
1602
|
-
* `options` **
|
|
1593
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1603
1594
|
|
|
1604
1595
|
* `options.description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** human readable description
|
|
1605
1596
|
* `options.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** internal id
|
|
@@ -1640,7 +1631,7 @@ List entries of the default branch.
|
|
|
1640
1631
|
|
|
1641
1632
|
#### Parameters
|
|
1642
1633
|
|
|
1643
|
-
* `
|
|
1634
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1644
1635
|
|
|
1645
1636
|
Returns **AsyncIterator<[ContentEntry](#contententry)>** all matching entries in the branch
|
|
1646
1637
|
|
|
@@ -1660,7 +1651,7 @@ List commits of the default branch.
|
|
|
1660
1651
|
|
|
1661
1652
|
#### Parameters
|
|
1662
1653
|
|
|
1663
|
-
* `options` **
|
|
1654
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1664
1655
|
|
|
1665
1656
|
Returns **AsyncIterator<[Commit](#commit)>** all matching commits in the repository
|
|
1666
1657
|
|
|
@@ -1737,7 +1728,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
1737
1728
|
|
|
1738
1729
|
#### Parameters
|
|
1739
1730
|
|
|
1740
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))
|
|
1731
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1741
1732
|
|
|
1742
1733
|
Returns **AsyncIterator<[Branch](#branch)>** of all branches
|
|
1743
1734
|
|
|
@@ -1749,7 +1740,7 @@ Create a new [Branch](#branch) by cloning a given source branch.
|
|
|
1749
1740
|
|
|
1750
1741
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new branch
|
|
1751
1742
|
* `source` **[Branch](#branch)** branch defaults to the defaultBranch
|
|
1752
|
-
* `options` **
|
|
1743
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1753
1744
|
|
|
1754
1745
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** newly created branch (or already present old one with the same name)
|
|
1755
1746
|
|
|
@@ -1761,7 +1752,7 @@ Internal branch creation does not call repository.initialize()
|
|
|
1761
1752
|
#### Parameters
|
|
1762
1753
|
|
|
1763
1754
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new branch
|
|
1764
|
-
* `options` **
|
|
1755
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** to be passed to the branch
|
|
1765
1756
|
|
|
1766
1757
|
Returns **[Branch](#branch)** newly created branch
|
|
1767
1758
|
|
|
@@ -1789,7 +1780,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
1789
1780
|
|
|
1790
1781
|
#### Parameters
|
|
1791
1782
|
|
|
1792
|
-
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))
|
|
1783
|
+
* `patterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1793
1784
|
|
|
1794
1785
|
Returns **AsyncIterator<[Tag](#tag)>** of all tags
|
|
1795
1786
|
|
|
@@ -1801,7 +1792,7 @@ Internal tag creation does not call repository.initialize()
|
|
|
1801
1792
|
#### Parameters
|
|
1802
1793
|
|
|
1803
1794
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new tag
|
|
1804
|
-
* `options` **
|
|
1795
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1805
1796
|
|
|
1806
1797
|
Returns **[Tag](#tag)** newly created tag
|
|
1807
1798
|
|
|
@@ -1813,7 +1804,7 @@ Create a pull request (or deliver an already present for the given name).
|
|
|
1813
1804
|
|
|
1814
1805
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the pr
|
|
1815
1806
|
* `source` **[Branch](#branch)** branch
|
|
1816
|
-
* `options` **
|
|
1807
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1817
1808
|
|
|
1818
1809
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>** 
|
|
1819
1810
|
|
|
@@ -1825,7 +1816,7 @@ Add a pull request.
|
|
|
1825
1816
|
|
|
1826
1817
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1827
1818
|
* `source` **[Branch](#branch)** 
|
|
1828
|
-
* `options` **
|
|
1819
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1829
1820
|
|
|
1830
1821
|
Returns **[PullRequest](#pullrequest)** 
|
|
1831
1822
|
|
|
@@ -1862,7 +1853,7 @@ Add a new [Hook](#hook).
|
|
|
1862
1853
|
#### Parameters
|
|
1863
1854
|
|
|
1864
1855
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new hoook name
|
|
1865
|
-
* `options` **
|
|
1856
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** 
|
|
1866
1857
|
|
|
1867
1858
|
Returns **[Hook](#hook)** newly created hook
|
|
1868
1859
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.7.
|
|
3
|
+
"version": "32.7.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"browser-ava": "^1.3.38",
|
|
38
38
|
"c8": "^7.13.0",
|
|
39
39
|
"documentation": "^14.0.1",
|
|
40
|
-
"repository-provider-test-support": "^2.3.
|
|
40
|
+
"repository-provider-test-support": "^2.3.5",
|
|
41
41
|
"semantic-release": "^21.0.2",
|
|
42
42
|
"typescript": "^5.0.4"
|
|
43
43
|
},
|
package/src/attribute-extras.mjs
CHANGED
|
@@ -155,7 +155,7 @@ export function optionJSON(
|
|
|
155
155
|
* ```js
|
|
156
156
|
* mapAttributes({a:1},{a:"a'"}) // {"a'": 1}
|
|
157
157
|
* ```
|
|
158
|
-
* @param {Object
|
|
158
|
+
* @param {Object} [object]
|
|
159
159
|
* @param {Object} mapping
|
|
160
160
|
* @return {Object} keys renamed after mapping
|
|
161
161
|
*/
|
|
@@ -178,7 +178,7 @@ export function mapAttributes(object, mapping) {
|
|
|
178
178
|
* Same as mapAttributes but with the inverse mapping.
|
|
179
179
|
* Filters out null, undefined and empty strings
|
|
180
180
|
* @param {Object} object
|
|
181
|
-
* @param {Object
|
|
181
|
+
* @param {Object} [mapping]
|
|
182
182
|
* @return {Object} keys renamed after mapping
|
|
183
183
|
*/
|
|
184
184
|
export function mapAttributesInverse(object, mapping) {
|
package/src/base-object.mjs
CHANGED
|
@@ -6,8 +6,8 @@ import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Creates an instance of BaseObject.
|
|
9
|
-
* @param {Object
|
|
10
|
-
* @param {Object
|
|
9
|
+
* @param {Object} [options]
|
|
10
|
+
* @param {Object} [additionalProperties]
|
|
11
11
|
*/
|
|
12
12
|
export class BaseObject {
|
|
13
13
|
/**
|
|
@@ -63,7 +63,7 @@ import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Takes values from options.
|
|
66
|
-
* @param {Object
|
|
66
|
+
* @param {Object} [options]
|
|
67
67
|
*/
|
|
68
68
|
updateAttributes(options, additionalProperties) {
|
|
69
69
|
definePropertiesFromOptions(
|
package/src/base-provider.mjs
CHANGED
|
@@ -47,7 +47,7 @@ export class BaseProvider extends BaseObject {
|
|
|
47
47
|
* Extract options suitable for the constructor.
|
|
48
48
|
* Form the given set of environment variables.
|
|
49
49
|
* Object with the detected key value pairs is delivered.
|
|
50
|
-
* @param {Object
|
|
50
|
+
* @param {Object} [env] as from process.env
|
|
51
51
|
* @param {string} instanceIdentifier part of variable name.
|
|
52
52
|
* @return {Object|undefined} undefined if no suitable environment variables have been found
|
|
53
53
|
*/
|
|
@@ -178,7 +178,7 @@ export class BaseProvider extends BaseObject {
|
|
|
178
178
|
|
|
179
179
|
/**
|
|
180
180
|
* Does the provider support the base name.
|
|
181
|
-
* @param {string
|
|
181
|
+
* @param {string} [base] to be checked
|
|
182
182
|
* @return {boolean} true if base is supported or base is undefined
|
|
183
183
|
*/
|
|
184
184
|
supportsBase(base) {
|
|
@@ -234,7 +234,7 @@ export class BaseProvider extends BaseObject {
|
|
|
234
234
|
/**
|
|
235
235
|
* Parses repository name and tries to split it into
|
|
236
236
|
* base, group, repository and branch.
|
|
237
|
-
* @param {string
|
|
237
|
+
* @param {string} [name]
|
|
238
238
|
* @param {string} focus where lies the focus if only one path component is given
|
|
239
239
|
* @return {Object} with separated attributes
|
|
240
240
|
*/
|
|
@@ -292,7 +292,7 @@ export class BaseProvider extends BaseObject {
|
|
|
292
292
|
/**
|
|
293
293
|
* Create a repository.
|
|
294
294
|
* @param {string} name of group and repository
|
|
295
|
-
* @param {Object
|
|
295
|
+
* @param {Object} [options]
|
|
296
296
|
* @returns {Promise<Repository>}
|
|
297
297
|
*/
|
|
298
298
|
async createRepository(name, options) {
|
|
@@ -328,7 +328,7 @@ export class BaseProvider extends BaseObject {
|
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
* List projects.
|
|
331
|
-
* @param {string[]|string
|
|
331
|
+
* @param {string[]|string} [patterns]
|
|
332
332
|
* @return {AsyncIterator<Project>} all matching projects of the provider
|
|
333
333
|
*/
|
|
334
334
|
async *projects(patterns) {
|
|
@@ -337,7 +337,7 @@ export class BaseProvider extends BaseObject {
|
|
|
337
337
|
|
|
338
338
|
/**
|
|
339
339
|
* List milestones.
|
|
340
|
-
* @param {string[]|string
|
|
340
|
+
* @param {string[]|string} [patterns]
|
|
341
341
|
* @return {AsyncIterator<Milestone>} all matching milestones of the provider
|
|
342
342
|
*/
|
|
343
343
|
async *milestones(patterns) {
|
|
@@ -346,7 +346,7 @@ export class BaseProvider extends BaseObject {
|
|
|
346
346
|
|
|
347
347
|
/**
|
|
348
348
|
* List repositories.
|
|
349
|
-
* @param {string[]|string
|
|
349
|
+
* @param {string[]|string} [patterns]
|
|
350
350
|
* @return {AsyncIterator<Repository>} all matching repos of the provider
|
|
351
351
|
*/
|
|
352
352
|
async *repositories(patterns) {
|
|
@@ -355,7 +355,7 @@ export class BaseProvider extends BaseObject {
|
|
|
355
355
|
|
|
356
356
|
/**
|
|
357
357
|
* List branches.
|
|
358
|
-
* @param {string[]|string
|
|
358
|
+
* @param {string[]|string} [patterns]
|
|
359
359
|
* @return {AsyncIterator<Branch>} all matching branches of the provider
|
|
360
360
|
*/
|
|
361
361
|
async *branches(patterns) {
|
|
@@ -364,7 +364,7 @@ export class BaseProvider extends BaseObject {
|
|
|
364
364
|
|
|
365
365
|
/**
|
|
366
366
|
* List tags.
|
|
367
|
-
* @param {string[]|string
|
|
367
|
+
* @param {string[]|string} [patterns]
|
|
368
368
|
* @return {AsyncIterator<Tag>} all matching tags of the provider
|
|
369
369
|
*/
|
|
370
370
|
async *tags(patterns) {
|
|
@@ -373,7 +373,7 @@ export class BaseProvider extends BaseObject {
|
|
|
373
373
|
|
|
374
374
|
/**
|
|
375
375
|
* List hooks.
|
|
376
|
-
* @param {string[]|string
|
|
376
|
+
* @param {string[]|string} [patterns]
|
|
377
377
|
* @return {AsyncIterator<Hook>} all matching hooks of the provider
|
|
378
378
|
*/
|
|
379
379
|
async *hooks(patterns) {
|
|
@@ -382,7 +382,7 @@ export class BaseProvider extends BaseObject {
|
|
|
382
382
|
|
|
383
383
|
/**
|
|
384
384
|
* List pull requests.
|
|
385
|
-
* @param {string[]|string
|
|
385
|
+
* @param {string[]|string} [patterns]
|
|
386
386
|
* @return {AsyncIterator<PullRequest>} all matching pullRequests of the provider
|
|
387
387
|
*/
|
|
388
388
|
async *pullRequests(patterns) {
|
package/src/branch.mjs
CHANGED
|
@@ -22,15 +22,14 @@ import { Commit } from "./commit.mjs";
|
|
|
22
22
|
* @property {string} name
|
|
23
23
|
*/
|
|
24
24
|
export class Branch extends Ref {
|
|
25
|
-
|
|
26
25
|
static get addMethodName() {
|
|
27
26
|
return "_addBranch";
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
static get deleteMethodName() {
|
|
31
|
-
return "_deleteBranch";
|
|
30
|
+
return "_deleteBranch";
|
|
32
31
|
}
|
|
33
|
-
|
|
32
|
+
|
|
34
33
|
static get collectionName() {
|
|
35
34
|
return "branches";
|
|
36
35
|
}
|
|
@@ -44,9 +43,7 @@ export class Branch extends Ref {
|
|
|
44
43
|
* @return {string} 'repoUrl#branch'
|
|
45
44
|
*/
|
|
46
45
|
get url() {
|
|
47
|
-
return this.isDefault
|
|
48
|
-
? this.owner.url
|
|
49
|
-
: `${this.owner.url}#${this.name}`;
|
|
46
|
+
return this.isDefault ? this.owner.url : `${this.owner.url}#${this.name}`;
|
|
50
47
|
}
|
|
51
48
|
|
|
52
49
|
/**
|
|
@@ -68,7 +65,7 @@ export class Branch extends Ref {
|
|
|
68
65
|
!this.isProtected
|
|
69
66
|
);
|
|
70
67
|
}
|
|
71
|
-
|
|
68
|
+
|
|
72
69
|
/**
|
|
73
70
|
* Are we the default branch.
|
|
74
71
|
* @return {boolean} true if name matches the repository default branch
|
|
@@ -101,7 +98,7 @@ export class Branch extends Ref {
|
|
|
101
98
|
* @param {Commit|AsyncIterator<Commit>} commits to be commited
|
|
102
99
|
* @param {Object} options
|
|
103
100
|
* @param {Branch|string} options.pullRequestBranch to commit into
|
|
104
|
-
* @param {boolean} options.dry do not create a branch and do not commit only create dummy PR
|
|
101
|
+
* @param {boolean} [options.dry=false] do not create a branch and do not commit only create dummy PR
|
|
105
102
|
* @param {boolean} options.skipWithoutCommits do not create a PR if no commits are given
|
|
106
103
|
* @param {boolean} options.bodyFromCommitMessages generate body from commit messages
|
|
107
104
|
* @param {string} [options.body] body of the PR
|
|
@@ -182,7 +179,7 @@ export class Branch extends Ref {
|
|
|
182
179
|
/**
|
|
183
180
|
* Create a pull request.
|
|
184
181
|
* @param {Branch} toBranch
|
|
185
|
-
* @param {Object
|
|
182
|
+
* @param {Object} [options]
|
|
186
183
|
* @return {Promise<PullRequest>}
|
|
187
184
|
*/
|
|
188
185
|
async createPullRequest(toBranch, options) {
|
|
@@ -201,7 +198,7 @@ export class Branch extends Ref {
|
|
|
201
198
|
* Create a new {@link Branch} by cloning a given source branch.
|
|
202
199
|
* Simply calls Repository.createBranch() with the receiver as source branch
|
|
203
200
|
* @param {string} name the new branch
|
|
204
|
-
* @param {Object
|
|
201
|
+
* @param {Object} [options] passed through
|
|
205
202
|
* @return {Promise<Branch>} newly created branch (or already present old one with the same name)
|
|
206
203
|
*/
|
|
207
204
|
async createBranch(name, options) {
|
package/src/commit.mjs
CHANGED
|
@@ -70,7 +70,7 @@ export class MultiGroupProvider extends BaseProvider {
|
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* List groups.
|
|
73
|
-
* @param {string[]|string} patterns
|
|
73
|
+
* @param {string[]|string} [patterns]
|
|
74
74
|
* @return {AsyncIterator<RepositoryGroup>} all matching repositories groups of the provider
|
|
75
75
|
*/
|
|
76
76
|
async *repositoryGroups(patterns) {
|
|
@@ -90,7 +90,7 @@ export class MultiGroupProvider extends BaseProvider {
|
|
|
90
90
|
* Create a new repository group.
|
|
91
91
|
* If there is already a group for the given name it will be returend instead
|
|
92
92
|
* @param {string} name of the group
|
|
93
|
-
* @param {Object
|
|
93
|
+
* @param {Object} [options]
|
|
94
94
|
* @return {Promise<RepositoryGroup>}
|
|
95
95
|
*/
|
|
96
96
|
async createRepositoryGroup(name, options) {
|
|
@@ -100,7 +100,7 @@ export class MultiGroupProvider extends BaseProvider {
|
|
|
100
100
|
/**
|
|
101
101
|
* Add a new repository group (not provider specific actions are executed).
|
|
102
102
|
* @param {string} name of the group
|
|
103
|
-
* @param {Object
|
|
103
|
+
* @param {Object} [options]
|
|
104
104
|
* @return {RepositoryGroup}
|
|
105
105
|
*/
|
|
106
106
|
addRepositoryGroup(name, options) {
|
package/src/named-object.mjs
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
/**
|
|
10
10
|
* Object with a name.
|
|
11
11
|
* @param {string} name
|
|
12
|
-
* @param {Object
|
|
13
|
-
* @param {Object
|
|
12
|
+
* @param {Object} [options]
|
|
13
|
+
* @param {Object} [additionalProperties|
|
|
14
14
|
*
|
|
15
15
|
* @property {string} name
|
|
16
16
|
*/
|
package/src/owned-object.mjs
CHANGED
|
@@ -135,7 +135,7 @@ export class OwnedObject extends NamedObject {
|
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* By default we use the owners implementation.
|
|
138
|
-
* @return {
|
|
138
|
+
* @return {typeof PullRequest} as defined in the owner
|
|
139
139
|
*/
|
|
140
140
|
get pullRequestClass() {
|
|
141
141
|
return this.owner.pullRequestClass;
|
|
@@ -143,7 +143,7 @@ export class OwnedObject extends NamedObject {
|
|
|
143
143
|
|
|
144
144
|
/**
|
|
145
145
|
* By default we use the owners implementation.
|
|
146
|
-
* @return {
|
|
146
|
+
* @return {typeof Branch} as defined in the owner
|
|
147
147
|
*/
|
|
148
148
|
get branchClass() {
|
|
149
149
|
return this.owner.branchClass;
|
|
@@ -151,7 +151,7 @@ export class OwnedObject extends NamedObject {
|
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
153
|
* By default we use the owners implementation.
|
|
154
|
-
* @return {
|
|
154
|
+
* @return {typeof Tag} as defined in the owner
|
|
155
155
|
*/
|
|
156
156
|
get tagClass() {
|
|
157
157
|
return this.owner.tagClass;
|
|
@@ -159,7 +159,7 @@ export class OwnedObject extends NamedObject {
|
|
|
159
159
|
|
|
160
160
|
/**
|
|
161
161
|
* By default we use the owners implementation.
|
|
162
|
-
* @return {
|
|
162
|
+
* @return {typeof ContentEntry} as defined in the owner
|
|
163
163
|
*/
|
|
164
164
|
get entryClass() {
|
|
165
165
|
return this.owner.entryClass;
|
|
@@ -167,7 +167,7 @@ export class OwnedObject extends NamedObject {
|
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* By default we use the owners implementation.
|
|
170
|
-
* @return {
|
|
170
|
+
* @return {typeof Hook} as defined in the owner
|
|
171
171
|
*/
|
|
172
172
|
get hookClass() {
|
|
173
173
|
return this.owner.hookClass;
|
package/src/pull-request.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
* @param {Branch} source merge source
|
|
19
19
|
* @param {Branch} owner merge target
|
|
20
20
|
* @param {string} name
|
|
21
|
-
* @param {Object} options
|
|
21
|
+
* @param {Object} [options]
|
|
22
22
|
* @param {string} [options.title]
|
|
23
23
|
* @param {string} [options.state]
|
|
24
24
|
* @param {boolean} [options.merged]
|
|
@@ -71,10 +71,10 @@ export class PullRequest extends OwnedObject {
|
|
|
71
71
|
* List all pull request for a given repo.
|
|
72
72
|
* Result will be filtered by source branch, destination branch and states
|
|
73
73
|
* @param {Repository} repository
|
|
74
|
-
* @param {Object} filter
|
|
75
|
-
* @param {Branch?} filter.source
|
|
76
|
-
* @param {Branch?} filter.destination
|
|
77
|
-
* @param {Set<string
|
|
74
|
+
* @param {Object} [filter]
|
|
75
|
+
* @param {Branch?} [filter.source]
|
|
76
|
+
* @param {Branch?} [filter.destination]
|
|
77
|
+
* @param {Set<string>} [filter.states]
|
|
78
78
|
* @return {AsyncIterator<PullRequest>}
|
|
79
79
|
*/
|
|
80
80
|
static async *list(repository, filter) {}
|
|
@@ -84,7 +84,7 @@ export class PullRequest extends OwnedObject {
|
|
|
84
84
|
*
|
|
85
85
|
* @param {Branch} source
|
|
86
86
|
* @param {Branch} destination
|
|
87
|
-
* @param {Object} options
|
|
87
|
+
* @param {Object} [options]
|
|
88
88
|
*/
|
|
89
89
|
static async open(source, destination, options) {
|
|
90
90
|
return new this(source, destination, "-1", options);
|
package/src/ref.mjs
CHANGED
|
@@ -54,7 +54,7 @@ export class Ref extends OwnedObject {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* List entries of the branch.
|
|
57
|
-
* @param {string[]|string
|
|
57
|
+
* @param {string[]|string} [matchingPatterns]
|
|
58
58
|
* @return {AsyncIterator<ContentEntry>} all matching entries in the branch
|
|
59
59
|
*/
|
|
60
60
|
async *entries(matchingPatterns) {}
|
package/src/repository-group.mjs
CHANGED
|
@@ -11,16 +11,14 @@ import {
|
|
|
11
11
|
* Abstract repository collection.
|
|
12
12
|
* @param {BaseProvider} provider
|
|
13
13
|
* @param {string} name of the group
|
|
14
|
-
* @param {Object
|
|
14
|
+
* @param {Object} [options]
|
|
15
15
|
* @param {string} [options.description] human readable description
|
|
16
16
|
* @param {string} [options.id] internal id
|
|
17
|
-
* @param {string} [options.uuid] internal id
|
|
18
17
|
* @param {string} [options.url] home
|
|
19
18
|
*
|
|
20
19
|
* @property {BaseProvider} provider
|
|
21
20
|
* @property {string} name
|
|
22
21
|
*/
|
|
23
|
-
|
|
24
22
|
export class RepositoryGroup extends RepositoryOwner(OwnedObject) {
|
|
25
23
|
static get addMethodName() {
|
|
26
24
|
return "_addRepositoryGroup";
|
package/src/repository-owner.mjs
CHANGED
|
@@ -41,7 +41,7 @@ export function RepositoryOwner(base) {
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Lookup a repository.
|
|
44
|
-
* @param {string
|
|
44
|
+
* @param {string} [name] of the repository may contain a #branch
|
|
45
45
|
* @return {Promise<Repository|undefined>}
|
|
46
46
|
*/
|
|
47
47
|
async repository(name) {
|
|
@@ -53,7 +53,7 @@ export function RepositoryOwner(base) {
|
|
|
53
53
|
|
|
54
54
|
/**
|
|
55
55
|
* List repositories for the owner.
|
|
56
|
-
* @param {string[]|string
|
|
56
|
+
* @param {string[]|string} [patterns]
|
|
57
57
|
* @return {AsyncIterator<Repository>} all matching repositories of the owner
|
|
58
58
|
*/
|
|
59
59
|
async *repositories(patterns) {
|
|
@@ -84,7 +84,7 @@ export function RepositoryOwner(base) {
|
|
|
84
84
|
/**
|
|
85
85
|
* Lookup entity of a given type and name.
|
|
86
86
|
* @param {string} type
|
|
87
|
-
* @param {string
|
|
87
|
+
* @param {string} [name]
|
|
88
88
|
* @param {function} [split]
|
|
89
89
|
* @param {Object} [defaultItem]
|
|
90
90
|
* @returns {Promise<NamedObject|undefined>} from a repository
|
|
@@ -111,7 +111,7 @@ export function RepositoryOwner(base) {
|
|
|
111
111
|
/**
|
|
112
112
|
* List entities for a given type and pattern.
|
|
113
113
|
* @param {string} type
|
|
114
|
-
* @param {string[]|string} patterns
|
|
114
|
+
* @param {string[]|string} [patterns]
|
|
115
115
|
* @param {function} [split]
|
|
116
116
|
* @param {Object} [defaultItem]
|
|
117
117
|
* @return {AsyncIterator<NamedObject>} matching type and pattern
|
|
@@ -147,7 +147,7 @@ export function RepositoryOwner(base) {
|
|
|
147
147
|
* Create a new {@link Repository} in the provider.
|
|
148
148
|
* If there is already if repository for the given name it will be returned.
|
|
149
149
|
* @param {string} name
|
|
150
|
-
* @param {Object
|
|
150
|
+
* @param {Object} [options]
|
|
151
151
|
* @return {Promise<Repository>} newly created repository (if not already present)
|
|
152
152
|
*/
|
|
153
153
|
async createRepository(name, options) {
|
|
@@ -158,7 +158,7 @@ export function RepositoryOwner(base) {
|
|
|
158
158
|
* Add a {@link Repository} to the group.
|
|
159
159
|
* Only adds the repository to the in memory representation (does not execute any provider actions).
|
|
160
160
|
* @param {string} name
|
|
161
|
-
* @param {Object
|
|
161
|
+
* @param {Object} [options]
|
|
162
162
|
* @return {Promise<Repository>} newly created repository
|
|
163
163
|
*/
|
|
164
164
|
addRepository(name, options) {
|
|
@@ -205,7 +205,7 @@ export function RepositoryOwner(base) {
|
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
* List branches for the owner.
|
|
208
|
-
* @param {string[]|string} patterns
|
|
208
|
+
* @param {string[]|string} [patterns]
|
|
209
209
|
* @return {AsyncIterator<Branch>} all matching branches of the owner
|
|
210
210
|
*/
|
|
211
211
|
async *branches(patterns) {
|
package/src/repository.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
* @class Repository
|
|
24
24
|
* @param {RepositoryOwner} owner
|
|
25
25
|
* @param {string} name (#branch) will be removed
|
|
26
|
-
* @param {Object
|
|
26
|
+
* @param {Object} [options]
|
|
27
27
|
* @param {string} [options.description] human readable description
|
|
28
28
|
* @param {string} [options.id] internal id
|
|
29
29
|
*
|
|
@@ -49,6 +49,8 @@ export class Repository extends OwnedObject {
|
|
|
49
49
|
return "repositories";
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
+
static defaultBranchName = "master";
|
|
53
|
+
|
|
52
54
|
/**
|
|
53
55
|
* options
|
|
54
56
|
*/
|
|
@@ -61,7 +63,7 @@ export class Repository extends OwnedObject {
|
|
|
61
63
|
* The name of the default branch
|
|
62
64
|
* @return {string}
|
|
63
65
|
*/
|
|
64
|
-
defaultBranchName: { ...default_attribute, default:
|
|
66
|
+
defaultBranchName: { ...default_attribute, default: Repository.defaultBranchName },
|
|
65
67
|
|
|
66
68
|
cloneURL: url_attribute,
|
|
67
69
|
|
|
@@ -99,7 +101,7 @@ export class Repository extends OwnedObject {
|
|
|
99
101
|
|
|
100
102
|
get defaultBranchName()
|
|
101
103
|
{
|
|
102
|
-
return
|
|
104
|
+
return Repository.defaultBranchName;
|
|
103
105
|
}
|
|
104
106
|
|
|
105
107
|
/**
|
|
@@ -113,11 +115,11 @@ export class Repository extends OwnedObject {
|
|
|
113
115
|
|
|
114
116
|
/**
|
|
115
117
|
* List entries of the default branch.
|
|
116
|
-
* @param {string[]|string}
|
|
118
|
+
* @param {string[]|string} [patterns]
|
|
117
119
|
* @return {AsyncIterator<ContentEntry>} all matching entries in the branch
|
|
118
120
|
*/
|
|
119
|
-
async *entries(
|
|
120
|
-
yield* (await this.defaultBranch).entries(
|
|
121
|
+
async *entries(patterns) {
|
|
122
|
+
yield* (await this.defaultBranch).entries(patterns);
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
/**
|
|
@@ -131,7 +133,7 @@ export class Repository extends OwnedObject {
|
|
|
131
133
|
|
|
132
134
|
/**
|
|
133
135
|
* List commits of the default branch.
|
|
134
|
-
* @param {Object
|
|
136
|
+
* @param {Object} [options]
|
|
135
137
|
* @return {AsyncIterator<Commit>} all matching commits in the repository
|
|
136
138
|
*/
|
|
137
139
|
async *commits(options) {}
|
|
@@ -231,7 +233,7 @@ export class Repository extends OwnedObject {
|
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
/**
|
|
234
|
-
* @param {string[]|string} patterns
|
|
236
|
+
* @param {string[]|string} [patterns]
|
|
235
237
|
* @return {AsyncIterator<Branch>} of all branches
|
|
236
238
|
*/
|
|
237
239
|
async *branches(patterns) {
|
|
@@ -245,7 +247,7 @@ export class Repository extends OwnedObject {
|
|
|
245
247
|
* Create a new {@link Branch} by cloning a given source branch.
|
|
246
248
|
* @param {string} name of the new branch
|
|
247
249
|
* @param {Branch} source branch defaults to the defaultBranch
|
|
248
|
-
* @param {Object
|
|
250
|
+
* @param {Object} [options]
|
|
249
251
|
* @return {Promise<Branch>} newly created branch (or already present old one with the same name)
|
|
250
252
|
*/
|
|
251
253
|
async createBranch(name, source, options) {
|
|
@@ -257,7 +259,7 @@ export class Repository extends OwnedObject {
|
|
|
257
259
|
* Add a new {@link Branch}.
|
|
258
260
|
* Internal branch creation does not call repository.initialize()
|
|
259
261
|
* @param {string} name of the new branch
|
|
260
|
-
* @param {Object
|
|
262
|
+
* @param {Object} [options] to be passed to the branch
|
|
261
263
|
* @return {Branch} newly created branch
|
|
262
264
|
*/
|
|
263
265
|
addBranch(name, options) {
|
|
@@ -297,7 +299,7 @@ export class Repository extends OwnedObject {
|
|
|
297
299
|
}
|
|
298
300
|
|
|
299
301
|
/**
|
|
300
|
-
* @param {string[]|string} patterns
|
|
302
|
+
* @param {string[]|string} [patterns]
|
|
301
303
|
* @return {AsyncIterator<Tag>} of all tags
|
|
302
304
|
*/
|
|
303
305
|
async *tags(patterns) {
|
|
@@ -312,7 +314,7 @@ export class Repository extends OwnedObject {
|
|
|
312
314
|
* Add a new {@link Tag}.
|
|
313
315
|
* Internal tag creation does not call repository.initialize()
|
|
314
316
|
* @param {string} name of the new tag
|
|
315
|
-
* @param {Object
|
|
317
|
+
* @param {Object} [options]
|
|
316
318
|
* @return {Tag} newly created tag
|
|
317
319
|
*/
|
|
318
320
|
addTag(name, options) {
|
|
@@ -327,7 +329,7 @@ export class Repository extends OwnedObject {
|
|
|
327
329
|
* Create a pull request (or deliver an already present for the given name).
|
|
328
330
|
* @param {string} name of the pr
|
|
329
331
|
* @param {Branch} source branch
|
|
330
|
-
* @param {Object
|
|
332
|
+
* @param {Object} [options]
|
|
331
333
|
* @return {Promise<PullRequest>}
|
|
332
334
|
*/
|
|
333
335
|
async createPullRequest(name, source, options) {
|
|
@@ -339,7 +341,7 @@ export class Repository extends OwnedObject {
|
|
|
339
341
|
* Add a pull request.
|
|
340
342
|
* @param {string} name
|
|
341
343
|
* @param {Branch} source
|
|
342
|
-
* @param {Object
|
|
344
|
+
* @param {Object} [options]
|
|
343
345
|
* @return {PullRequest}
|
|
344
346
|
*/
|
|
345
347
|
addPullRequest(name, source, options) {
|
|
@@ -389,7 +391,7 @@ export class Repository extends OwnedObject {
|
|
|
389
391
|
/**
|
|
390
392
|
* Add a new {@link Hook}.
|
|
391
393
|
* @param {string} name of the new hoook name
|
|
392
|
-
* @param {Object
|
|
394
|
+
* @param {Object} [options]
|
|
393
395
|
* @return {Hook} newly created hook
|
|
394
396
|
*/
|
|
395
397
|
addHook(name, options) {
|