repository-provider 26.0.3 → 26.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -66
- package/package.json +4 -4
- package/src/attribute.mjs +22 -17
- package/src/base-provider.mjs +4 -4
- package/src/branch.mjs +3 -0
- package/src/tag.mjs +3 -1
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ console.log(await readme.getString());
|
|
|
72
72
|
* [id](#id)
|
|
73
73
|
* [uuid](#uuid)
|
|
74
74
|
* [avatarURL](#avatarurl)
|
|
75
|
+
* [homePageURL](#homepageurl)
|
|
75
76
|
* [MessageDestination](#messagedestination)
|
|
76
77
|
* [Parameters](#parameters-9)
|
|
77
78
|
* [BaseProvider](#baseprovider)
|
|
@@ -94,7 +95,7 @@ console.log(await readme.getString());
|
|
|
94
95
|
* [Parameters](#parameters-16)
|
|
95
96
|
* [projects](#projects)
|
|
96
97
|
* [Parameters](#parameters-17)
|
|
97
|
-
* [
|
|
98
|
+
* [milestones](#milestones)
|
|
98
99
|
* [Parameters](#parameters-18)
|
|
99
100
|
* [repositories](#repositories)
|
|
100
101
|
* [Parameters](#parameters-19)
|
|
@@ -211,6 +212,8 @@ console.log(await readme.getString());
|
|
|
211
212
|
* [locked](#locked)
|
|
212
213
|
* [merged](#merged)
|
|
213
214
|
* [draft](#draft)
|
|
215
|
+
* [ContentEntry](#contententry)
|
|
216
|
+
* [Properties](#properties-9)
|
|
214
217
|
* [Ref](#ref)
|
|
215
218
|
* [Parameters](#parameters-52)
|
|
216
219
|
* [equals](#equals-5)
|
|
@@ -231,7 +234,7 @@ console.log(await readme.getString());
|
|
|
231
234
|
* [fullCondensedName](#fullcondensedname)
|
|
232
235
|
* [identifier](#identifier-1)
|
|
233
236
|
* [issuesURL](#issuesurl)
|
|
234
|
-
* [homePageURL](#homepageurl)
|
|
237
|
+
* [homePageURL](#homepageurl-1)
|
|
235
238
|
* [isLocked](#islocked)
|
|
236
239
|
* [isArchived](#isarchived)
|
|
237
240
|
* [isDisabled](#isdisabled)
|
|
@@ -241,7 +244,7 @@ console.log(await readme.getString());
|
|
|
241
244
|
* [isProtected](#isprotected-1)
|
|
242
245
|
* [RepositoryGroup](#repositorygroup-1)
|
|
243
246
|
* [Parameters](#parameters-58)
|
|
244
|
-
* [Properties](#properties-
|
|
247
|
+
* [Properties](#properties-10)
|
|
245
248
|
* [repositoryClass](#repositoryclass-1)
|
|
246
249
|
* [branchClass](#branchclass-1)
|
|
247
250
|
* [contentClass](#contentclass)
|
|
@@ -254,7 +257,7 @@ console.log(await readme.getString());
|
|
|
254
257
|
* [Parameters](#parameters-59)
|
|
255
258
|
* [Repository](#repository-2)
|
|
256
259
|
* [Parameters](#parameters-60)
|
|
257
|
-
* [Properties](#properties-
|
|
260
|
+
* [Properties](#properties-11)
|
|
258
261
|
* [fullName](#fullname-2)
|
|
259
262
|
* [slug](#slug)
|
|
260
263
|
* [provider](#provider-3)
|
|
@@ -271,7 +274,7 @@ console.log(await readme.getString());
|
|
|
271
274
|
* [url](#url-4)
|
|
272
275
|
* [cloneURL](#cloneurl)
|
|
273
276
|
* [issuesURL](#issuesurl-1)
|
|
274
|
-
* [homePageURL](#homepageurl-
|
|
277
|
+
* [homePageURL](#homepageurl-2)
|
|
275
278
|
* [condensedName](#condensedname)
|
|
276
279
|
* [isArchived](#isarchived-1)
|
|
277
280
|
* [isLocked](#islocked-1)
|
|
@@ -321,7 +324,6 @@ console.log(await readme.getString());
|
|
|
321
324
|
* [attributes](#attributes-2)
|
|
322
325
|
* [defaultBranchName](#defaultbranchname)
|
|
323
326
|
* [urls](#urls-1)
|
|
324
|
-
* [homePageURL](#homepageurl-2)
|
|
325
327
|
* [issuesURL](#issuesurl-2)
|
|
326
328
|
* [Review](#review)
|
|
327
329
|
* [SingleGroupProvider](#singlegroupprovider)
|
|
@@ -512,6 +514,12 @@ Avatar.
|
|
|
512
514
|
|
|
513
515
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
514
516
|
|
|
517
|
+
## homePageURL
|
|
518
|
+
|
|
519
|
+
The url of home page.
|
|
520
|
+
|
|
521
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
522
|
+
|
|
515
523
|
## MessageDestination
|
|
516
524
|
|
|
517
525
|
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
@@ -631,9 +639,9 @@ List projects.
|
|
|
631
639
|
|
|
632
640
|
* `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))**
|
|
633
641
|
|
|
634
|
-
Returns **
|
|
642
|
+
Returns **AsyncIterator<[Project](#project)>** all matching projects of the provider
|
|
635
643
|
|
|
636
|
-
###
|
|
644
|
+
### milestones
|
|
637
645
|
|
|
638
646
|
List milestones.
|
|
639
647
|
|
|
@@ -641,7 +649,7 @@ List milestones.
|
|
|
641
649
|
|
|
642
650
|
* `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))**
|
|
643
651
|
|
|
644
|
-
Returns **
|
|
652
|
+
Returns **AsyncIterator<[Milestone](#milestone)>** all matching milestones of the provider
|
|
645
653
|
|
|
646
654
|
### repositories
|
|
647
655
|
|
|
@@ -651,7 +659,7 @@ List repositories.
|
|
|
651
659
|
|
|
652
660
|
* `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))**
|
|
653
661
|
|
|
654
|
-
Returns **
|
|
662
|
+
Returns **AsyncIterator<[Repository](#repository)>** all matching repos of the provider
|
|
655
663
|
|
|
656
664
|
### branches
|
|
657
665
|
|
|
@@ -661,7 +669,7 @@ List branches.
|
|
|
661
669
|
|
|
662
670
|
* `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))**
|
|
663
671
|
|
|
664
|
-
Returns **
|
|
672
|
+
Returns **AsyncIterator<[Branch](#branch)>** all matching branches of the provider
|
|
665
673
|
|
|
666
674
|
### tags
|
|
667
675
|
|
|
@@ -671,7 +679,7 @@ List tags.
|
|
|
671
679
|
|
|
672
680
|
* `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))**
|
|
673
681
|
|
|
674
|
-
Returns **
|
|
682
|
+
Returns **AsyncIterator<[Tag](#tag)>** all matching tags of the provider
|
|
675
683
|
|
|
676
684
|
### hooks
|
|
677
685
|
|
|
@@ -681,7 +689,7 @@ List hooks.
|
|
|
681
689
|
|
|
682
690
|
* `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))**
|
|
683
691
|
|
|
684
|
-
Returns **
|
|
692
|
+
Returns **AsyncIterator<[Hook](#hook)>** all matching hooks of the provider
|
|
685
693
|
|
|
686
694
|
### pullRequests
|
|
687
695
|
|
|
@@ -691,7 +699,7 @@ List pull requests.
|
|
|
691
699
|
|
|
692
700
|
* `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))**
|
|
693
701
|
|
|
694
|
-
Returns **
|
|
702
|
+
Returns **AsyncIterator<[PullRequest](#pullrequest)>** all matching pullRequests of the provider
|
|
695
703
|
|
|
696
704
|
### repositoryGroupClass
|
|
697
705
|
|
|
@@ -711,7 +719,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
711
719
|
|
|
712
720
|
We are our own provider.
|
|
713
721
|
|
|
714
|
-
Returns **
|
|
722
|
+
Returns **[BaseProvider](#baseprovider)** this
|
|
715
723
|
|
|
716
724
|
### url
|
|
717
725
|
|
|
@@ -797,7 +805,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
797
805
|
### Properties
|
|
798
806
|
|
|
799
807
|
* `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
800
|
-
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)
|
|
808
|
+
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[ContentEntry](#contententry)>**
|
|
801
809
|
|
|
802
810
|
## Commit
|
|
803
811
|
|
|
@@ -857,7 +865,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
857
865
|
|
|
858
866
|
Delete the branch from the [Repository](#repository).
|
|
859
867
|
|
|
860
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
868
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
|
|
861
869
|
|
|
862
870
|
### commit
|
|
863
871
|
|
|
@@ -866,10 +874,10 @@ Commit entries.
|
|
|
866
874
|
#### Parameters
|
|
867
875
|
|
|
868
876
|
* `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** commit message
|
|
869
|
-
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)
|
|
877
|
+
* `updates` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[ContentEntry](#contententry)>** content to be commited
|
|
870
878
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
871
879
|
|
|
872
|
-
Returns **[CommitResult](#commitresult)
|
|
880
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[CommitResult](#commitresult)>**
|
|
873
881
|
|
|
874
882
|
### commitIntoPullRequest
|
|
875
883
|
|
|
@@ -885,7 +893,7 @@ Add commits into a pull request.
|
|
|
885
893
|
* `options.skipWithoutCommits` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** do not create a PR if no commits are given
|
|
886
894
|
* `options.bodyFromCommitMessages` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** generate body from commit messages
|
|
887
895
|
|
|
888
|
-
Returns **[PullRequest](#pullrequest)
|
|
896
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>**
|
|
889
897
|
|
|
890
898
|
### removeEntries
|
|
891
899
|
|
|
@@ -893,7 +901,7 @@ Remove entries form the branch.
|
|
|
893
901
|
|
|
894
902
|
#### Parameters
|
|
895
903
|
|
|
896
|
-
* `entries` **
|
|
904
|
+
* `entries` **AsyncIterator<[ContentEntry](#contententry)>**
|
|
897
905
|
|
|
898
906
|
### entryClass
|
|
899
907
|
|
|
@@ -1001,7 +1009,7 @@ Lookup a repository in the provider and all of its repository groups.
|
|
|
1001
1009
|
|
|
1002
1010
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the repository
|
|
1003
1011
|
|
|
1004
|
-
Returns **[Repository](#repository)
|
|
1012
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Repository](#repository)>**
|
|
1005
1013
|
|
|
1006
1014
|
### repositoryGroup
|
|
1007
1015
|
|
|
@@ -1011,7 +1019,7 @@ Lookup a repository group.
|
|
|
1011
1019
|
|
|
1012
1020
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the group
|
|
1013
1021
|
|
|
1014
|
-
Returns **[RepositoryGroup](#repositorygroup)
|
|
1022
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[RepositoryGroup](#repositorygroup)>**
|
|
1015
1023
|
|
|
1016
1024
|
### repositoryGroups
|
|
1017
1025
|
|
|
@@ -1021,7 +1029,7 @@ List groups.
|
|
|
1021
1029
|
|
|
1022
1030
|
* `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))**
|
|
1023
1031
|
|
|
1024
|
-
Returns **
|
|
1032
|
+
Returns **AsyncIterator<[RepositoryGroup](#repositorygroup)>** all matching repositories groups of the provider
|
|
1025
1033
|
|
|
1026
1034
|
### createRepositoryGroup
|
|
1027
1035
|
|
|
@@ -1033,7 +1041,7 @@ If there is already a group for the given name it will be returend instead
|
|
|
1033
1041
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the group
|
|
1034
1042
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
1035
1043
|
|
|
1036
|
-
Returns **[RepositoryGroup](#repositorygroup)
|
|
1044
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[RepositoryGroup](#repositorygroup)>**
|
|
1037
1045
|
|
|
1038
1046
|
### addRepositoryGroup
|
|
1039
1047
|
|
|
@@ -1080,7 +1088,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
1080
1088
|
|
|
1081
1089
|
### update
|
|
1082
1090
|
|
|
1083
|
-
|
|
1091
|
+
Save object attributes in the backing store.
|
|
1084
1092
|
|
|
1085
1093
|
### toJSON
|
|
1086
1094
|
|
|
@@ -1144,7 +1152,7 @@ Returns **[Repository](#repository)** destination repository
|
|
|
1144
1152
|
|
|
1145
1153
|
### provider
|
|
1146
1154
|
|
|
1147
|
-
Returns **
|
|
1155
|
+
Returns **[BaseProvider](#baseprovider)**
|
|
1148
1156
|
|
|
1149
1157
|
### equals
|
|
1150
1158
|
|
|
@@ -1178,7 +1186,7 @@ Decline the pull request.
|
|
|
1178
1186
|
|
|
1179
1187
|
### reviews
|
|
1180
1188
|
|
|
1181
|
-
Returns **
|
|
1189
|
+
Returns **AsyncIterator<[Review](#review)>**
|
|
1182
1190
|
|
|
1183
1191
|
### identifier
|
|
1184
1192
|
|
|
@@ -1218,7 +1226,7 @@ result will be filtered by source branch, destination branch and states
|
|
|
1218
1226
|
* `filter.destination` **[Branch](#branch)?**
|
|
1219
1227
|
* `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)>?**
|
|
1220
1228
|
|
|
1221
|
-
Returns **
|
|
1229
|
+
Returns **AsyncIterator<[PullRequest](#pullrequest)>**
|
|
1222
1230
|
|
|
1223
1231
|
### open
|
|
1224
1232
|
|
|
@@ -1270,6 +1278,14 @@ Draft state of the pull request.
|
|
|
1270
1278
|
|
|
1271
1279
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**
|
|
1272
1280
|
|
|
1281
|
+
## ContentEntry
|
|
1282
|
+
|
|
1283
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1284
|
+
|
|
1285
|
+
### Properties
|
|
1286
|
+
|
|
1287
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1288
|
+
|
|
1273
1289
|
## Ref
|
|
1274
1290
|
|
|
1275
1291
|
**Extends NamedObject**
|
|
@@ -1288,13 +1304,13 @@ Check for equality.
|
|
|
1288
1304
|
|
|
1289
1305
|
#### Parameters
|
|
1290
1306
|
|
|
1291
|
-
* `other` **[
|
|
1307
|
+
* `other` **[Ref](#ref)**
|
|
1292
1308
|
|
|
1293
1309
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if name and repository are equal
|
|
1294
1310
|
|
|
1295
1311
|
### ref
|
|
1296
1312
|
|
|
1297
|
-
ref name
|
|
1313
|
+
ref name.
|
|
1298
1314
|
|
|
1299
1315
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** git ref of the Ref
|
|
1300
1316
|
|
|
@@ -1306,7 +1322,7 @@ Get sha of a ref.
|
|
|
1306
1322
|
|
|
1307
1323
|
* `ref` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `this.ref`)
|
|
1308
1324
|
|
|
1309
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
1325
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** sha of the ref
|
|
1310
1326
|
|
|
1311
1327
|
### entries
|
|
1312
1328
|
|
|
@@ -1316,13 +1332,13 @@ List entries of the branch.
|
|
|
1316
1332
|
|
|
1317
1333
|
* `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)>**
|
|
1318
1334
|
|
|
1319
|
-
Returns **ContentEntry
|
|
1335
|
+
Returns **AsyncIterator<[ContentEntry](#contententry)>** all matching entries in the branch
|
|
1320
1336
|
|
|
1321
1337
|
### asyncIterator
|
|
1322
1338
|
|
|
1323
1339
|
List all entries of the branch.
|
|
1324
1340
|
|
|
1325
|
-
Returns **
|
|
1341
|
+
Returns **AsyncIterator<[ContentEntry](#contententry)>** all entries in the branch
|
|
1326
1342
|
|
|
1327
1343
|
### maybeEntry
|
|
1328
1344
|
|
|
@@ -1332,7 +1348,7 @@ Get exactly one matching entry by name or undefine if no such entry is found.
|
|
|
1332
1348
|
|
|
1333
1349
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1334
1350
|
|
|
1335
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1351
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
|
|
1336
1352
|
|
|
1337
1353
|
### entry
|
|
1338
1354
|
|
|
@@ -1342,13 +1358,13 @@ Get exactly one matching entry by name (throws if entry is not found).
|
|
|
1342
1358
|
|
|
1343
1359
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1344
1360
|
|
|
1345
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1361
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
|
|
1346
1362
|
|
|
1347
1363
|
### provider
|
|
1348
1364
|
|
|
1349
1365
|
The provider we live in.
|
|
1350
1366
|
|
|
1351
|
-
Returns **
|
|
1367
|
+
Returns **[BaseProvider](#baseprovider)**
|
|
1352
1368
|
|
|
1353
1369
|
### owner
|
|
1354
1370
|
|
|
@@ -1432,7 +1448,7 @@ Abstract repository collection.
|
|
|
1432
1448
|
|
|
1433
1449
|
### Parameters
|
|
1434
1450
|
|
|
1435
|
-
* `provider` **
|
|
1451
|
+
* `provider` **[BaseProvider](#baseprovider)**
|
|
1436
1452
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the group
|
|
1437
1453
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
1438
1454
|
|
|
@@ -1443,7 +1459,7 @@ Abstract repository collection.
|
|
|
1443
1459
|
|
|
1444
1460
|
### Properties
|
|
1445
1461
|
|
|
1446
|
-
* `provider` **
|
|
1462
|
+
* `provider` **[BaseProvider](#baseprovider)**
|
|
1447
1463
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1448
1464
|
|
|
1449
1465
|
### repositoryClass
|
|
@@ -1540,7 +1556,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
1540
1556
|
|
|
1541
1557
|
The owners provider.
|
|
1542
1558
|
|
|
1543
|
-
Returns **
|
|
1559
|
+
Returns **[BaseProvider](#baseprovider)**
|
|
1544
1560
|
|
|
1545
1561
|
### identifier
|
|
1546
1562
|
|
|
@@ -1567,7 +1583,7 @@ Lookup entries form the head of the default branch.
|
|
|
1567
1583
|
|
|
1568
1584
|
* `name`
|
|
1569
1585
|
|
|
1570
|
-
Returns **
|
|
1586
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
|
|
1571
1587
|
|
|
1572
1588
|
### entries
|
|
1573
1589
|
|
|
@@ -1577,7 +1593,7 @@ List entries of the default branch.
|
|
|
1577
1593
|
|
|
1578
1594
|
* `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)>**
|
|
1579
1595
|
|
|
1580
|
-
Returns **
|
|
1596
|
+
Returns **AsyncIterator<[ContentEntry](#contententry)>** all matching entries in the branch
|
|
1581
1597
|
|
|
1582
1598
|
### maybeEntry
|
|
1583
1599
|
|
|
@@ -1587,7 +1603,7 @@ Get exactly one matching entry by name or undefined if no such entry is found.
|
|
|
1587
1603
|
|
|
1588
1604
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1589
1605
|
|
|
1590
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1606
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
|
|
1591
1607
|
|
|
1592
1608
|
### urls
|
|
1593
1609
|
|
|
@@ -1671,7 +1687,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
1671
1687
|
|
|
1672
1688
|
* `patterns`
|
|
1673
1689
|
|
|
1674
|
-
Returns **
|
|
1690
|
+
Returns **AsyncIterator<[Branch](#branch)>** of all branches
|
|
1675
1691
|
|
|
1676
1692
|
### createBranch
|
|
1677
1693
|
|
|
@@ -1705,7 +1721,7 @@ Delete a [Branch](#branch).
|
|
|
1705
1721
|
|
|
1706
1722
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the branch
|
|
1707
1723
|
|
|
1708
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1724
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
|
|
1709
1725
|
|
|
1710
1726
|
### tags
|
|
1711
1727
|
|
|
@@ -1713,7 +1729,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
1713
1729
|
|
|
1714
1730
|
* `patterns` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)**
|
|
1715
1731
|
|
|
1716
|
-
Returns **
|
|
1732
|
+
Returns **AsyncIterator<[Tag](#tag)>** of all tags
|
|
1717
1733
|
|
|
1718
1734
|
### tag
|
|
1719
1735
|
|
|
@@ -1723,14 +1739,14 @@ Get a Tag.
|
|
|
1723
1739
|
|
|
1724
1740
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1725
1741
|
|
|
1726
|
-
Returns **[Tag](#tag)
|
|
1742
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Tag](#tag)>**
|
|
1727
1743
|
|
|
1728
1744
|
### delete
|
|
1729
1745
|
|
|
1730
1746
|
Delete the repository from the [Provider](Provider).
|
|
1731
1747
|
[Provider#deleteRepository](Provider#deleteRepository)
|
|
1732
1748
|
|
|
1733
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1749
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
|
|
1734
1750
|
|
|
1735
1751
|
### createPullRequest
|
|
1736
1752
|
|
|
@@ -1742,7 +1758,7 @@ Create a pull request (or deliver an already present for thefiven name).
|
|
|
1742
1758
|
* `source` **[Branch](#branch)** branch
|
|
1743
1759
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
|
|
1744
1760
|
|
|
1745
|
-
Returns **[PullRequest](#pullrequest)
|
|
1761
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>**
|
|
1746
1762
|
|
|
1747
1763
|
### addPullRequest
|
|
1748
1764
|
|
|
@@ -1760,7 +1776,7 @@ Returns **[PullRequest](#pullrequest)**
|
|
|
1760
1776
|
|
|
1761
1777
|
Deliver all [PullRequest](#pullrequest)s.
|
|
1762
1778
|
|
|
1763
|
-
Returns **
|
|
1779
|
+
Returns **AsyncIterator<[PullRequest](#pullrequest)>** of all pull requests
|
|
1764
1780
|
|
|
1765
1781
|
### pullRequest
|
|
1766
1782
|
|
|
@@ -1780,7 +1796,7 @@ Delete a [PullRequest](#pullrequest).
|
|
|
1780
1796
|
|
|
1781
1797
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1782
1798
|
|
|
1783
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1799
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
|
|
1784
1800
|
|
|
1785
1801
|
### addHook
|
|
1786
1802
|
|
|
@@ -1802,7 +1818,7 @@ Add a new Hook.
|
|
|
1802
1818
|
|
|
1803
1819
|
List hooks.
|
|
1804
1820
|
|
|
1805
|
-
Returns **[Hook](#hook)
|
|
1821
|
+
Returns **AsyncIterator<[Hook](#hook)>** all hooks of the repository
|
|
1806
1822
|
|
|
1807
1823
|
### hook
|
|
1808
1824
|
|
|
@@ -1812,7 +1828,7 @@ Get a Hook.
|
|
|
1812
1828
|
|
|
1813
1829
|
* `id` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number))**
|
|
1814
1830
|
|
|
1815
|
-
Returns **[Hook](#hook)
|
|
1831
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Hook](#hook)>** for the given id
|
|
1816
1832
|
|
|
1817
1833
|
### type
|
|
1818
1834
|
|
|
@@ -1828,7 +1844,7 @@ Get sha of a ref.
|
|
|
1828
1844
|
|
|
1829
1845
|
* `ref` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1830
1846
|
|
|
1831
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
1847
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** sha of the ref
|
|
1832
1848
|
|
|
1833
1849
|
### repositoryClass
|
|
1834
1850
|
|
|
@@ -1880,12 +1896,6 @@ URLs of the repository
|
|
|
1880
1896
|
|
|
1881
1897
|
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
|
|
1882
1898
|
|
|
1883
|
-
## homePageURL
|
|
1884
|
-
|
|
1885
|
-
The url of home page.
|
|
1886
|
-
|
|
1887
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1888
|
-
|
|
1889
1899
|
## issuesURL
|
|
1890
1900
|
|
|
1891
1901
|
The url of issue tracking system.
|
|
@@ -1910,7 +1920,7 @@ Lookup a repository in the provider and all of its repository groups.
|
|
|
1910
1920
|
|
|
1911
1921
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the repository
|
|
1912
1922
|
|
|
1913
|
-
Returns **[Repository](#repository)
|
|
1923
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Repository](#repository)>**
|
|
1914
1924
|
|
|
1915
1925
|
### repositoryGroup
|
|
1916
1926
|
|
|
@@ -1920,7 +1930,7 @@ Get a single group.
|
|
|
1920
1930
|
|
|
1921
1931
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1922
1932
|
|
|
1923
|
-
Returns **[RepositoryGroup](#repositorygroup)
|
|
1933
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[RepositoryGroup](#repositorygroup)>** deliver the one and only present group
|
|
1924
1934
|
|
|
1925
1935
|
### repositoryGroups
|
|
1926
1936
|
|
|
@@ -1930,7 +1940,7 @@ List groups.
|
|
|
1930
1940
|
|
|
1931
1941
|
* `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))**
|
|
1932
1942
|
|
|
1933
|
-
Returns **
|
|
1943
|
+
Returns **AsyncIterator<[RepositoryGroup](#repositorygroup)>** always deliver the one and only present group
|
|
1934
1944
|
|
|
1935
1945
|
## Tag
|
|
1936
1946
|
|
|
@@ -1968,7 +1978,7 @@ A URL auth component will be removed to.
|
|
|
1968
1978
|
|
|
1969
1979
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1970
1980
|
* `repositoryBases` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** all possible bases
|
|
1971
|
-
* `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)
|
|
1981
|
+
* `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
|
|
1972
1982
|
|
|
1973
1983
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name without base
|
|
1974
1984
|
|
|
@@ -1978,9 +1988,9 @@ Loops over names and executes stripBaseName.
|
|
|
1978
1988
|
|
|
1979
1989
|
### Parameters
|
|
1980
1990
|
|
|
1981
|
-
* `names` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)
|
|
1991
|
+
* `names` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)**
|
|
1982
1992
|
* `repositoryBases` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** all possible bases
|
|
1983
|
-
* `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)
|
|
1993
|
+
* `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
|
|
1984
1994
|
|
|
1985
1995
|
Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** names without base
|
|
1986
1996
|
|
|
@@ -1995,6 +2005,8 @@ Find a new branch name for a given pattern.
|
|
|
1995
2005
|
* `repository` **[Repository](#repository)**
|
|
1996
2006
|
* `pattern` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
1997
2007
|
|
|
2008
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
|
|
2009
|
+
|
|
1998
2010
|
# install
|
|
1999
2011
|
|
|
2000
2012
|
With [npm](http://npmjs.org) do:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "26.0
|
|
3
|
+
"version": "26.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ava": "^3.15.0",
|
|
37
|
-
"c8": "^7.
|
|
37
|
+
"c8": "^7.11.0",
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
|
-
"repository-provider-test-support": "^1.
|
|
39
|
+
"repository-provider-test-support": "^1.9.0",
|
|
40
40
|
"semantic-release": "^18.0.1",
|
|
41
|
-
"typescript": "^4.6.0-dev.
|
|
41
|
+
"typescript": "^4.6.0-dev.20211230"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=14.18.1"
|
package/src/attribute.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
/**
|
|
3
2
|
* @typedef {Object} Attribute
|
|
4
3
|
*
|
|
@@ -46,12 +45,15 @@ export function definePropertiesFromOptions(
|
|
|
46
45
|
const property = properties[first];
|
|
47
46
|
|
|
48
47
|
let value = options[name];
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
if (value === undefined) {
|
|
49
|
+
if (typeof attribute.default === "function") {
|
|
50
|
+
value = attribute.default(attribute, object);
|
|
51
|
+
} else if (
|
|
52
|
+
attribute.default !== undefined &&
|
|
53
|
+
attribute.default !== getAttribute(object, name)
|
|
54
|
+
) {
|
|
55
|
+
value = attribute.default;
|
|
56
|
+
}
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
if (attribute.set) {
|
|
@@ -112,7 +114,7 @@ export function setAttribute(object, name, value) {
|
|
|
112
114
|
const last = parts.pop();
|
|
113
115
|
|
|
114
116
|
for (const p of parts) {
|
|
115
|
-
if (object[p] === undefined || typeof object[p] !==
|
|
117
|
+
if (object[p] === undefined || typeof object[p] !== "object") {
|
|
116
118
|
object[p] = {};
|
|
117
119
|
}
|
|
118
120
|
object = object[p];
|
|
@@ -149,15 +151,18 @@ export function getAttribute(object, name) {
|
|
|
149
151
|
* @param {Object} attributes to operator on
|
|
150
152
|
* @return {Object} initial + defined values
|
|
151
153
|
*/
|
|
152
|
-
export function optionJSON(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
export function optionJSON(
|
|
155
|
+
object,
|
|
156
|
+
initial = {},
|
|
157
|
+
attributes = object.constructor.attributes
|
|
158
|
+
) {
|
|
159
|
+
return Object.keys(attributes || {}).reduce((a, c) => {
|
|
160
|
+
const value = object[c];
|
|
161
|
+
if (value !== undefined && !(value instanceof Function)) {
|
|
162
|
+
a[c] = value;
|
|
163
|
+
}
|
|
164
|
+
return a;
|
|
165
|
+
}, initial);
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
/**
|
package/src/base-provider.mjs
CHANGED
|
@@ -126,7 +126,7 @@ export class BaseProvider {
|
|
|
126
126
|
/**
|
|
127
127
|
* Creates a new provider for a given set of options.
|
|
128
128
|
* @param {Object} options additional options
|
|
129
|
-
* @param {string
|
|
129
|
+
* @param {string} [options.instanceIdentifier]
|
|
130
130
|
* @param {Object} env taken from process.env
|
|
131
131
|
* @return {BaseProvider} newly created provider or undefined if options are not sufficient to construct a provider
|
|
132
132
|
*/
|
|
@@ -167,7 +167,7 @@ export class BaseProvider {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
/**
|
|
170
|
-
* Bring a repository name into its normal form by removing any clutter
|
|
170
|
+
* Bring a repository name into its normal form by removing any clutter.
|
|
171
171
|
* like .git suffix or #branch names.
|
|
172
172
|
* @param {string} name
|
|
173
173
|
* @param {boolean} forLookup
|
|
@@ -181,7 +181,7 @@ export class BaseProvider {
|
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
/**
|
|
184
|
-
* Bring a group name into its normal form by removing any clutter
|
|
184
|
+
* Bring a group name into its normal form by removing any clutter.
|
|
185
185
|
* like .git suffix or #branch names.
|
|
186
186
|
* @param {string} name
|
|
187
187
|
* @param {boolean} forLookup
|
|
@@ -195,7 +195,7 @@ export class BaseProvider {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/**
|
|
198
|
-
* Are
|
|
198
|
+
* Are repository names case sensitive.
|
|
199
199
|
* Overwrite and return false if you want to have case insensitive repository lookup
|
|
200
200
|
* @return {boolean} true
|
|
201
201
|
*/
|
package/src/branch.mjs
CHANGED
package/src/tag.mjs
CHANGED