repository-provider 32.7.15 → 32.7.17
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 +1 -1
- package/src/branch.mjs +5 -8
- package/src/named-object.mjs +11 -1
- package/src/repository-group.mjs +0 -2
- package/src/repository.mjs +4 -2
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
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
|
package/src/named-object.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
* Object with a name.
|
|
11
11
|
* @param {string} name
|
|
12
12
|
* @param {Object} [options]
|
|
13
|
-
* @param {Object} [additionalProperties
|
|
13
|
+
* @param {Object} [additionalProperties]
|
|
14
14
|
*
|
|
15
15
|
* @property {string} name
|
|
16
16
|
*/
|
|
@@ -30,6 +30,16 @@ export class NamedObject extends BaseObject {
|
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
#name;
|
|
34
|
+
|
|
35
|
+
get name() {
|
|
36
|
+
return this.#name;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
set name(name) {
|
|
40
|
+
this.#name = name;
|
|
41
|
+
}
|
|
42
|
+
|
|
33
43
|
/**
|
|
34
44
|
* Check for equality.
|
|
35
45
|
* @param {NamedObject} other
|
package/src/repository-group.mjs
CHANGED
|
@@ -14,13 +14,11 @@ import {
|
|
|
14
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.mjs
CHANGED
|
@@ -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
|
/**
|