repository-provider 26.3.1 → 26.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -65,8 +65,22 @@ console.log(await readme.getString());
65
65
  * [Parameters](#parameters-7)
66
66
  * [BaseObject](#baseobject)
67
67
  * [Parameters](#parameters-8)
68
+ * [update](#update)
68
69
  * [equals](#equals)
69
70
  * [Parameters](#parameters-9)
71
+ * [provider](#provider)
72
+ * [info](#info)
73
+ * [Parameters](#parameters-10)
74
+ * [warn](#warn)
75
+ * [Parameters](#parameters-11)
76
+ * [error](#error)
77
+ * [Parameters](#parameters-12)
78
+ * [repositoryClass](#repositoryclass)
79
+ * [pullRequestClass](#pullrequestclass)
80
+ * [branchClass](#branchclass)
81
+ * [tagClass](#tagclass)
82
+ * [entryClass](#entryclass)
83
+ * [hookClass](#hookclass)
70
84
  * [attributes](#attributes)
71
85
  * [writableAttributes](#writableattributes)
72
86
  * [attributeMapping](#attributemapping)
@@ -76,131 +90,131 @@ console.log(await readme.getString());
76
90
  * [avatarURL](#avatarurl)
77
91
  * [homePageURL](#homepageurl)
78
92
  * [MessageDestination](#messagedestination)
79
- * [Parameters](#parameters-10)
93
+ * [Parameters](#parameters-13)
80
94
  * [BaseProvider](#baseprovider)
81
- * [Parameters](#parameters-11)
95
+ * [Parameters](#parameters-14)
82
96
  * [Properties](#properties-1)
83
97
  * [equals](#equals-1)
84
- * [Parameters](#parameters-12)
98
+ * [Parameters](#parameters-15)
85
99
  * [repositoryBases](#repositorybases)
86
100
  * [normalizeRepositoryName](#normalizerepositoryname)
87
- * [Parameters](#parameters-13)
101
+ * [Parameters](#parameters-16)
88
102
  * [normalizeGroupName](#normalizegroupname)
89
- * [Parameters](#parameters-14)
103
+ * [Parameters](#parameters-17)
90
104
  * [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
91
105
  * [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
92
106
  * [supportsBase](#supportsbase)
93
- * [Parameters](#parameters-15)
107
+ * [Parameters](#parameters-18)
94
108
  * [parseName](#parsename)
95
- * [Parameters](#parameters-16)
109
+ * [Parameters](#parameters-19)
96
110
  * [createRepository](#createrepository)
97
- * [Parameters](#parameters-17)
111
+ * [Parameters](#parameters-20)
98
112
  * [list](#list)
99
- * [Parameters](#parameters-18)
113
+ * [Parameters](#parameters-21)
100
114
  * [projects](#projects)
101
- * [Parameters](#parameters-19)
115
+ * [Parameters](#parameters-22)
102
116
  * [milestones](#milestones)
103
- * [Parameters](#parameters-20)
117
+ * [Parameters](#parameters-23)
104
118
  * [repositories](#repositories)
105
- * [Parameters](#parameters-21)
119
+ * [Parameters](#parameters-24)
106
120
  * [branches](#branches)
107
- * [Parameters](#parameters-22)
121
+ * [Parameters](#parameters-25)
108
122
  * [tags](#tags)
109
- * [Parameters](#parameters-23)
123
+ * [Parameters](#parameters-26)
110
124
  * [hooks](#hooks)
111
- * [Parameters](#parameters-24)
125
+ * [Parameters](#parameters-27)
112
126
  * [pullRequests](#pullrequests)
113
- * [Parameters](#parameters-25)
127
+ * [Parameters](#parameters-28)
114
128
  * [name](#name)
115
- * [provider](#provider)
129
+ * [provider](#provider-1)
116
130
  * [url](#url)
117
131
  * [toJSON](#tojson)
118
132
  * [repositoryGroupClass](#repositorygroupclass)
119
- * [hookClass](#hookclass)
120
- * [repositoryClass](#repositoryclass)
121
- * [branchClass](#branchclass)
122
- * [entryClass](#entryclass)
123
- * [pullRequestClass](#pullrequestclass)
133
+ * [hookClass](#hookclass-1)
134
+ * [repositoryClass](#repositoryclass-1)
135
+ * [branchClass](#branchclass-1)
136
+ * [tagClass](#tagclass-1)
137
+ * [entryClass](#entryclass-1)
138
+ * [pullRequestClass](#pullrequestclass-1)
124
139
  * [instanceIdentifier](#instanceidentifier)
125
140
  * [optionsFromEnvironment](#optionsfromenvironment)
126
- * [Parameters](#parameters-26)
141
+ * [Parameters](#parameters-29)
127
142
  * [areOptionsSufficcient](#areoptionssufficcient)
128
- * [Parameters](#parameters-27)
143
+ * [Parameters](#parameters-30)
129
144
  * [initialize](#initialize)
130
- * [Parameters](#parameters-28)
145
+ * [Parameters](#parameters-31)
131
146
  * [priority](#priority)
132
147
  * [name](#name-1)
133
148
  * [messageDestination](#messagedestination-1)
134
149
  * [Commit](#commit)
135
150
  * [Properties](#properties-2)
136
151
  * [Commit](#commit-1)
137
- * [Parameters](#parameters-29)
152
+ * [Parameters](#parameters-32)
138
153
  * [Properties](#properties-3)
139
154
  * [CommitResult](#commitresult)
140
155
  * [Properties](#properties-4)
141
156
  * [Branch](#branch)
142
- * [Parameters](#parameters-30)
157
+ * [Parameters](#parameters-33)
143
158
  * [Properties](#properties-5)
144
159
  * [url](#url-1)
145
160
  * [refType](#reftype)
146
161
  * [isDefault](#isdefault)
147
162
  * [delete](#delete)
148
163
  * [commit](#commit-2)
149
- * [Parameters](#parameters-31)
164
+ * [Parameters](#parameters-34)
150
165
  * [commitIntoPullRequest](#commitintopullrequest)
151
- * [Parameters](#parameters-32)
166
+ * [Parameters](#parameters-35)
152
167
  * [removeEntries](#removeentries)
153
- * [Parameters](#parameters-33)
154
- * [entryClass](#entryclass-1)
168
+ * [Parameters](#parameters-36)
155
169
  * [createPullRequest](#createpullrequest)
156
- * [Parameters](#parameters-34)
157
- * [pullRequestClass](#pullrequestclass-1)
170
+ * [Parameters](#parameters-37)
158
171
  * [createBranch](#createbranch)
159
- * [Parameters](#parameters-35)
172
+ * [Parameters](#parameters-38)
160
173
  * [Hook](#hook)
161
- * [Parameters](#parameters-36)
174
+ * [Parameters](#parameters-39)
162
175
  * [Properties](#properties-6)
163
176
  * [equals](#equals-2)
164
- * [Parameters](#parameters-37)
177
+ * [Parameters](#parameters-40)
165
178
  * [toJSON](#tojson-1)
166
179
  * [Issue](#issue)
167
- * [Parameters](#parameters-38)
180
+ * [Parameters](#parameters-41)
168
181
  * [Milestone](#milestone)
169
- * [Parameters](#parameters-39)
182
+ * [Parameters](#parameters-42)
170
183
  * [MultiGroupProvider](#multigroupprovider)
171
- * [Parameters](#parameters-40)
184
+ * [Parameters](#parameters-43)
172
185
  * [repository](#repository)
173
- * [Parameters](#parameters-41)
186
+ * [Parameters](#parameters-44)
187
+ * [branch](#branch-1)
188
+ * [Parameters](#parameters-45)
174
189
  * [repositoryGroup](#repositorygroup)
175
- * [Parameters](#parameters-42)
190
+ * [Parameters](#parameters-46)
176
191
  * [repositoryGroups](#repositorygroups)
177
- * [Parameters](#parameters-43)
192
+ * [Parameters](#parameters-47)
178
193
  * [createRepositoryGroup](#createrepositorygroup)
179
- * [Parameters](#parameters-44)
194
+ * [Parameters](#parameters-48)
180
195
  * [addRepositoryGroup](#addrepositorygroup)
181
- * [Parameters](#parameters-45)
196
+ * [Parameters](#parameters-49)
182
197
  * [NamedObject](#namedobject)
183
- * [Parameters](#parameters-46)
198
+ * [Parameters](#parameters-50)
184
199
  * [Properties](#properties-7)
185
200
  * [equals](#equals-3)
186
- * [Parameters](#parameters-47)
201
+ * [Parameters](#parameters-51)
187
202
  * [displayName](#displayname)
188
- * [update](#update)
189
203
  * [toJSON](#tojson-2)
190
204
  * [Project](#project)
191
- * [Parameters](#parameters-48)
205
+ * [Parameters](#parameters-52)
192
206
  * [PullRequest](#pullrequest)
193
- * [Parameters](#parameters-49)
207
+ * [Parameters](#parameters-53)
194
208
  * [Properties](#properties-8)
195
209
  * [fullName](#fullname)
196
210
  * [url](#url-2)
197
211
  * [repository](#repository-1)
198
- * [provider](#provider-1)
212
+ * [provider](#provider-2)
199
213
  * [equals](#equals-4)
200
- * [Parameters](#parameters-50)
214
+ * [Parameters](#parameters-54)
201
215
  * [delete](#delete-1)
202
216
  * [merge](#merge)
203
- * [Parameters](#parameters-51)
217
+ * [Parameters](#parameters-55)
204
218
  * [decline](#decline)
205
219
  * [reviews](#reviews)
206
220
  * [identifier](#identifier)
@@ -208,9 +222,9 @@ console.log(await readme.getString());
208
222
  * [defaultListStates](#defaultliststates)
209
223
  * [validMergeMethods](#validmergemethods)
210
224
  * [list](#list-1)
211
- * [Parameters](#parameters-52)
225
+ * [Parameters](#parameters-56)
212
226
  * [open](#open)
213
- * [Parameters](#parameters-53)
227
+ * [Parameters](#parameters-57)
214
228
  * [title](#title)
215
229
  * [body](#body)
216
230
  * [state](#state)
@@ -220,20 +234,19 @@ console.log(await readme.getString());
220
234
  * [ContentEntry](#contententry)
221
235
  * [Properties](#properties-9)
222
236
  * [Ref](#ref)
223
- * [Parameters](#parameters-54)
237
+ * [Parameters](#parameters-58)
224
238
  * [equals](#equals-5)
225
- * [Parameters](#parameters-55)
239
+ * [Parameters](#parameters-59)
226
240
  * [ref](#ref-1)
227
241
  * [refId](#refid)
228
- * [Parameters](#parameters-56)
242
+ * [Parameters](#parameters-60)
229
243
  * [entries](#entries)
230
- * [Parameters](#parameters-57)
244
+ * [Parameters](#parameters-61)
231
245
  * [asyncIterator](#asynciterator)
232
246
  * [maybeEntry](#maybeentry)
233
- * [Parameters](#parameters-58)
247
+ * [Parameters](#parameters-62)
234
248
  * [entry](#entry)
235
- * [Parameters](#parameters-59)
236
- * [provider](#provider-2)
249
+ * [Parameters](#parameters-63)
237
250
  * [owner](#owner)
238
251
  * [fullName](#fullname-1)
239
252
  * [fullCondensedName](#fullcondensedname)
@@ -248,33 +261,28 @@ console.log(await readme.getString());
248
261
  * [attributes](#attributes-1)
249
262
  * [isProtected](#isprotected-1)
250
263
  * [RepositoryGroup](#repositorygroup-1)
251
- * [Parameters](#parameters-60)
264
+ * [Parameters](#parameters-64)
252
265
  * [Properties](#properties-10)
253
- * [repositoryClass](#repositoryclass-1)
254
- * [branchClass](#branchclass-1)
255
- * [contentClass](#contentclass)
256
- * [pullRequestClass](#pullrequestclass-2)
257
- * [hookClass](#hookclass-1)
258
266
  * [attributeMapping](#attributemapping-1)
259
267
  * [type](#type)
260
268
  * [url](#url-3)
261
269
  * [RepositoryOwner](#repositoryowner)
262
- * [Parameters](#parameters-61)
270
+ * [Parameters](#parameters-65)
263
271
  * [Repository](#repository-2)
264
- * [Parameters](#parameters-62)
272
+ * [Parameters](#parameters-66)
265
273
  * [Properties](#properties-11)
266
274
  * [fullName](#fullname-2)
267
275
  * [slug](#slug)
268
276
  * [provider](#provider-3)
269
277
  * [identifier](#identifier-2)
270
278
  * [equals](#equals-6)
271
- * [Parameters](#parameters-63)
279
+ * [Parameters](#parameters-67)
272
280
  * [entry](#entry-1)
273
- * [Parameters](#parameters-64)
281
+ * [Parameters](#parameters-68)
274
282
  * [entries](#entries-1)
275
- * [Parameters](#parameters-65)
283
+ * [Parameters](#parameters-69)
276
284
  * [maybeEntry](#maybeentry-1)
277
- * [Parameters](#parameters-66)
285
+ * [Parameters](#parameters-70)
278
286
  * [urls](#urls)
279
287
  * [url](#url-4)
280
288
  * [cloneURL](#cloneurl)
@@ -285,46 +293,43 @@ console.log(await readme.getString());
285
293
  * [isLocked](#islocked-1)
286
294
  * [isDisabled](#isdisabled-1)
287
295
  * [isTemplate](#istemplate)
288
- * [branch](#branch-1)
289
- * [Parameters](#parameters-67)
290
296
  * [defaultBranch](#defaultbranch)
297
+ * [branch](#branch-2)
298
+ * [Parameters](#parameters-71)
291
299
  * [branches](#branches-1)
292
- * [Parameters](#parameters-68)
300
+ * [Parameters](#parameters-72)
293
301
  * [createBranch](#createbranch-1)
294
- * [Parameters](#parameters-69)
302
+ * [Parameters](#parameters-73)
295
303
  * [addBranch](#addbranch)
296
- * [Parameters](#parameters-70)
304
+ * [Parameters](#parameters-74)
297
305
  * [deleteBranch](#deletebranch)
298
- * [Parameters](#parameters-71)
299
- * [tags](#tags-1)
300
- * [Parameters](#parameters-72)
306
+ * [Parameters](#parameters-75)
301
307
  * [tag](#tag)
302
- * [Parameters](#parameters-73)
308
+ * [Parameters](#parameters-76)
309
+ * [tags](#tags-1)
310
+ * [Parameters](#parameters-77)
311
+ * [addTag](#addtag)
312
+ * [Parameters](#parameters-78)
303
313
  * [delete](#delete-2)
304
314
  * [createPullRequest](#createpullrequest-1)
305
- * [Parameters](#parameters-74)
315
+ * [Parameters](#parameters-79)
306
316
  * [addPullRequest](#addpullrequest)
307
- * [Parameters](#parameters-75)
317
+ * [Parameters](#parameters-80)
308
318
  * [pullRequests](#pullrequests-1)
309
319
  * [pullRequest](#pullrequest-1)
310
- * [Parameters](#parameters-76)
320
+ * [Parameters](#parameters-81)
311
321
  * [deletePullRequest](#deletepullrequest)
312
- * [Parameters](#parameters-77)
322
+ * [Parameters](#parameters-82)
313
323
  * [addHook](#addhook)
314
- * [Parameters](#parameters-78)
324
+ * [Parameters](#parameters-83)
315
325
  * [createHook](#createhook)
316
- * [Parameters](#parameters-79)
326
+ * [Parameters](#parameters-84)
317
327
  * [hooks](#hooks-1)
318
328
  * [hook](#hook-1)
319
- * [Parameters](#parameters-80)
329
+ * [Parameters](#parameters-85)
320
330
  * [type](#type-1)
321
331
  * [refId](#refid-1)
322
- * [Parameters](#parameters-81)
323
- * [repositoryClass](#repositoryclass-2)
324
- * [pullRequestClass](#pullrequestclass-3)
325
- * [branchClass](#branchclass-2)
326
- * [entryClass](#entryclass-2)
327
- * [hookClass](#hookclass-2)
332
+ * [Parameters](#parameters-86)
328
333
  * [toJSON](#tojson-3)
329
334
  * [attributes](#attributes-2)
330
335
  * [defaultBranchName](#defaultbranchname)
@@ -333,23 +338,23 @@ console.log(await readme.getString());
333
338
  * [Review](#review)
334
339
  * [SingleGroupProvider](#singlegroupprovider)
335
340
  * [repository](#repository-3)
336
- * [Parameters](#parameters-82)
341
+ * [Parameters](#parameters-87)
337
342
  * [repositoryGroup](#repositorygroup-2)
338
- * [Parameters](#parameters-83)
343
+ * [Parameters](#parameters-88)
339
344
  * [repositoryGroups](#repositorygroups-1)
340
- * [Parameters](#parameters-84)
345
+ * [Parameters](#parameters-89)
341
346
  * [Tag](#tag-1)
342
- * [Parameters](#parameters-85)
347
+ * [Parameters](#parameters-90)
343
348
  * [refType](#reftype-1)
344
349
  * [isWritable](#iswritable-1)
345
350
  * [asArray](#asarray)
346
- * [Parameters](#parameters-86)
351
+ * [Parameters](#parameters-91)
347
352
  * [stripBaseName](#stripbasename)
348
- * [Parameters](#parameters-87)
353
+ * [Parameters](#parameters-92)
349
354
  * [stripBaseNames](#stripbasenames)
350
- * [Parameters](#parameters-88)
355
+ * [Parameters](#parameters-93)
351
356
  * [generateBranchName](#generatebranchname)
352
- * [Parameters](#parameters-89)
357
+ * [Parameters](#parameters-94)
353
358
 
354
359
  ## Application
355
360
 
@@ -480,8 +485,12 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
480
485
 
481
486
  ### Parameters
482
487
 
483
- * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
484
- * `additionalProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
488
+ * `options` **any**
489
+ * `additionalProperties` **any**
490
+
491
+ ### update
492
+
493
+ Save object attributes in the backing store.
485
494
 
486
495
  ### equals
487
496
 
@@ -493,6 +502,72 @@ Check for equality
493
502
 
494
503
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if other is present
495
504
 
505
+ ### provider
506
+
507
+ The provider we live in.
508
+
509
+ Returns **[BaseProvider](#baseprovider)**
510
+
511
+ ### info
512
+
513
+ Forwarded to the owner.
514
+
515
+ #### Parameters
516
+
517
+ * `args` **...any**
518
+
519
+ ### warn
520
+
521
+ Forwarded to the owner.
522
+
523
+ #### Parameters
524
+
525
+ * `args` **...any**
526
+
527
+ ### error
528
+
529
+ Forwarded to the owner.
530
+
531
+ #### Parameters
532
+
533
+ * `args` **...any**
534
+
535
+ ### repositoryClass
536
+
537
+ By default we use the owners implementation.
538
+
539
+ Returns **Class** as defined in the owner
540
+
541
+ ### pullRequestClass
542
+
543
+ By default we use the owners implementation.
544
+
545
+ Returns **Class** as defined in the owner
546
+
547
+ ### branchClass
548
+
549
+ By default we use the owners implementation.
550
+
551
+ Returns **Class** as defined in the owner
552
+
553
+ ### tagClass
554
+
555
+ By default we use the owners implementation.
556
+
557
+ Returns **Class** as defined in the owner
558
+
559
+ ### entryClass
560
+
561
+ By default we use the owners implementation.
562
+
563
+ Returns **Class** as defined in the owner
564
+
565
+ ### hookClass
566
+
567
+ By default we use the owners implementation.
568
+
569
+ Returns **Class** as defined in the owner
570
+
496
571
  ### attributes
497
572
 
498
573
  Attributes definitions
@@ -766,6 +841,10 @@ Returns **Class** repository class used by the Provider
766
841
 
767
842
  Returns **Class** branch class used by the Provider
768
843
 
844
+ ### tagClass
845
+
846
+ Returns **Class** branch class used by the Provider
847
+
769
848
  ### entryClass
770
849
 
771
850
  Returns **Class** entry class used by the Provider
@@ -889,7 +968,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
889
968
 
890
969
  Are we the default branch.
891
970
 
892
- Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if name is the repository default branch
971
+ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if name matches the repository default branch
893
972
 
894
973
  ### delete
895
974
 
@@ -924,6 +1003,7 @@ Add commits into a pull request.
924
1003
  * `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
925
1004
  * `options.skipWithoutCommits` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** do not create a PR if no commits are given
926
1005
  * `options.bodyFromCommitMessages` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** generate body from commit messages
1006
+ * `options.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** body of the PR
927
1007
 
928
1008
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>**
929
1009
 
@@ -935,12 +1015,6 @@ Remove entries form the branch.
935
1015
 
936
1016
  * `entries` **AsyncIterator<[ContentEntry](#contententry)>**
937
1017
 
938
- ### entryClass
939
-
940
- By default we use the providers implementation.
941
-
942
- Returns **Class** as defined in the repository
943
-
944
1018
  ### createPullRequest
945
1019
 
946
1020
  Create a pull request.
@@ -952,12 +1026,6 @@ Create a pull request.
952
1026
 
953
1027
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>**
954
1028
 
955
- ### pullRequestClass
956
-
957
- By default we use the repository implementation.
958
-
959
- Returns **Class** as defined in the repository
960
-
961
1029
  ### createBranch
962
1030
 
963
1031
  Create a new [Branch](#branch) by cloning a given source branch.
@@ -1043,6 +1111,16 @@ Lookup a repository in the provider and all of its repository groups.
1043
1111
 
1044
1112
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Repository](#repository)>**
1045
1113
 
1114
+ ### branch
1115
+
1116
+ Lookup a branch.
1117
+
1118
+ #### Parameters
1119
+
1120
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the branch
1121
+
1122
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>**
1123
+
1046
1124
  ### repositoryGroup
1047
1125
 
1048
1126
  Lookup a repository group.
@@ -1114,14 +1192,10 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1114
1192
 
1115
1193
  ### displayName
1116
1194
 
1117
- Beatified name use for human displaying only.
1195
+ Beautified name use for human displaying only.
1118
1196
 
1119
1197
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** human readable name
1120
1198
 
1121
- ### update
1122
-
1123
- Save object attributes in the backing store.
1124
-
1125
1199
  ### toJSON
1126
1200
 
1127
1201
  Provide name and all defined attributes.
@@ -1392,12 +1466,6 @@ Get exactly one matching entry by name (throws if entry is not found).
1392
1466
 
1393
1467
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
1394
1468
 
1395
- ### provider
1396
-
1397
- The provider we live in.
1398
-
1399
- Returns **[BaseProvider](#baseprovider)**
1400
-
1401
1469
  ### owner
1402
1470
 
1403
1471
  * **See**: [Repository#owner](Repository#owner)
@@ -1494,36 +1562,6 @@ Abstract repository collection.
1494
1562
  * `provider` **[BaseProvider](#baseprovider)**
1495
1563
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1496
1564
 
1497
- ### repositoryClass
1498
-
1499
- By default we use the providers implementation.
1500
-
1501
- Returns **Class** as defined in the provider
1502
-
1503
- ### branchClass
1504
-
1505
- By default we use the providers implementation.
1506
-
1507
- Returns **Class** as defined in the provider
1508
-
1509
- ### contentClass
1510
-
1511
- By default we use the providers implementation.
1512
-
1513
- Returns **Class** as defined in the provider
1514
-
1515
- ### pullRequestClass
1516
-
1517
- By default we use the providers implementation.
1518
-
1519
- Returns **Class** as defined in the provider
1520
-
1521
- ### hookClass
1522
-
1523
- By default we use the providers implementation.
1524
-
1525
- Returns **Class** as defined in the provider
1526
-
1527
1565
  ### attributeMapping
1528
1566
 
1529
1567
  Map attributes between external and internal representation.
@@ -1697,6 +1735,12 @@ By default we are not a template.
1697
1735
 
1698
1736
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false
1699
1737
 
1738
+ ### defaultBranch
1739
+
1740
+ Lookup the default branch.
1741
+
1742
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** branch named after defaultBranchName
1743
+
1700
1744
  ### branch
1701
1745
 
1702
1746
  Lookup branch by name.
@@ -1707,12 +1751,6 @@ Lookup branch by name.
1707
1751
 
1708
1752
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>**
1709
1753
 
1710
- ### defaultBranch
1711
-
1712
- Lookup the default branch.
1713
-
1714
- Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** branch named after defaultBranchName
1715
-
1716
1754
  ### branches
1717
1755
 
1718
1756
  #### Parameters
@@ -1743,7 +1781,7 @@ Internal branch creation does not call repository.initialize()
1743
1781
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new branch
1744
1782
  * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
1745
1783
 
1746
- Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** newly created branch
1784
+ Returns **[Branch](#branch)** newly created branch
1747
1785
 
1748
1786
  ### deleteBranch
1749
1787
 
@@ -1755,6 +1793,16 @@ Delete a [Branch](#branch).
1755
1793
 
1756
1794
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
1757
1795
 
1796
+ ### tag
1797
+
1798
+ Get a Tag.
1799
+
1800
+ #### Parameters
1801
+
1802
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1803
+
1804
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Tag](#tag)>**
1805
+
1758
1806
  ### tags
1759
1807
 
1760
1808
  #### Parameters
@@ -1763,15 +1811,17 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1763
1811
 
1764
1812
  Returns **AsyncIterator<[Tag](#tag)>** of all tags
1765
1813
 
1766
- ### tag
1814
+ ### addTag
1767
1815
 
1768
- Get a Tag.
1816
+ Add a new [Tag](#tag).
1817
+ Internal tag creation does not call repository.initialize()
1769
1818
 
1770
1819
  #### Parameters
1771
1820
 
1772
- * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1821
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new tag
1822
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
1773
1823
 
1774
- Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Tag](#tag)>**
1824
+ Returns **[Tag](#tag)** newly created tag
1775
1825
 
1776
1826
  ### delete
1777
1827
 
@@ -1878,36 +1928,6 @@ Get sha of a ref.
1878
1928
 
1879
1929
  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
1880
1930
 
1881
- ### repositoryClass
1882
-
1883
- By default we use the owners implementation.
1884
-
1885
- Returns **Class** as defined in the owner
1886
-
1887
- ### pullRequestClass
1888
-
1889
- By default we use the owners implementation.
1890
-
1891
- Returns **Class** as defined in the owner
1892
-
1893
- ### branchClass
1894
-
1895
- By default we use the owners implementation.
1896
-
1897
- Returns **Class** as defined in the owner
1898
-
1899
- ### entryClass
1900
-
1901
- By default we use the owners implementation.
1902
-
1903
- Returns **Class** as defined in the owner
1904
-
1905
- ### hookClass
1906
-
1907
- By default we use the owners implementation.
1908
-
1909
- Returns **Class** as defined in the owner
1910
-
1911
1931
  ### toJSON
1912
1932
 
1913
1933
  Provide name and all defined attributes
@@ -2028,7 +2048,7 @@ Loops over names and executes stripBaseName.
2028
2048
  * `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
2029
2049
  * `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
2030
2050
 
2031
- 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
2051
+ 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)> | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))** names without base
2032
2052
 
2033
2053
  ## generateBranchName
2034
2054
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "26.3.1",
3
+ "version": "26.4.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,15 +30,15 @@
30
30
  "lint:tsc": "tsc --allowJs --checkJs --noEmit -module nodenext -t es2022 ./src/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "matching-iterator": "^2.0.0"
33
+ "matching-iterator": "^2.0.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "ava": "^4.0.1",
37
37
  "c8": "^7.11.0",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.9.8",
39
+ "repository-provider-test-support": "^1.9.9",
40
40
  "semantic-release": "^19.0.2",
41
- "typescript": "^4.6.0-dev.20220124"
41
+ "typescript": "^4.6.0-dev.20220126"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.18.3"
@@ -63,6 +63,11 @@ export class BaseObject {
63
63
  return {};
64
64
  }
65
65
 
66
+ /**
67
+ * Creates an instance of BaseObject.
68
+ * @param {*} options
69
+ * @param {*} additionalProperties
70
+ */
66
71
  constructor(options, additionalProperties) {
67
72
  definePropertiesFromOptions(
68
73
  this,
@@ -116,4 +121,52 @@ export class BaseObject {
116
121
  error(...args) {
117
122
  return this.owner.error(...args);
118
123
  }
124
+
125
+ /**
126
+ * By default we use the owners implementation.
127
+ * @return {Class} as defined in the owner
128
+ */
129
+ get repositoryClass() {
130
+ return this.owner.repositoryClass;
131
+ }
132
+
133
+ /**
134
+ * By default we use the owners implementation.
135
+ * @return {Class} as defined in the owner
136
+ */
137
+ get pullRequestClass() {
138
+ return this.owner.pullRequestClass;
139
+ }
140
+
141
+ /**
142
+ * By default we use the owners implementation.
143
+ * @return {Class} as defined in the owner
144
+ */
145
+ get branchClass() {
146
+ return this.owner.branchClass;
147
+ }
148
+
149
+ /**
150
+ * By default we use the owners implementation.
151
+ * @return {Class} as defined in the owner
152
+ */
153
+ get tagClass() {
154
+ return this.owner.tagClass;
155
+ }
156
+
157
+ /**
158
+ * By default we use the owners implementation.
159
+ * @return {Class} as defined in the owner
160
+ */
161
+ get entryClass() {
162
+ return this.owner.entryClass;
163
+ }
164
+
165
+ /**
166
+ * By default we use the owners implementation.
167
+ * @return {Class} as defined in the owner
168
+ */
169
+ get hookClass() {
170
+ return this.owner.hookClass;
171
+ }
119
172
  }
package/src/branch.mjs CHANGED
@@ -49,7 +49,7 @@ export class Branch extends Ref {
49
49
 
50
50
  /**
51
51
  * Are we the default branch.
52
- * @return {boolean} true if name is the repository default branch
52
+ * @return {boolean} true if name matches the repository default branch
53
53
  */
54
54
  get isDefault() {
55
55
  return this.name === this.repository.defaultBranchName;
@@ -157,14 +157,6 @@ export class Branch extends Ref {
157
157
  */
158
158
  async removeEntries(entries) {}
159
159
 
160
- /**
161
- * By default we use the providers implementation.
162
- * @return {Class} as defined in the repository
163
- */
164
- get entryClass() {
165
- return this.repository.entryClass;
166
- }
167
-
168
160
  /**
169
161
  * Create a pull request.
170
162
  * @param {Branch} toBranch
@@ -183,14 +175,6 @@ export class Branch extends Ref {
183
175
  return this.repository.deletePullRequest(name);
184
176
  }
185
177
 
186
- /**
187
- * By default we use the repository implementation.
188
- * @return {Class} as defined in the repository
189
- */
190
- get pullRequestClass() {
191
- return this.repository.pullRequestClass;
192
- }
193
-
194
178
  /**
195
179
  * Create a new {@link Branch} by cloning a given source branch.
196
180
  * Simply calls Repository.createBranch() with the receiver as source branch
@@ -2,6 +2,7 @@ import { matcher } from "matching-iterator";
2
2
  import { BaseProvider } from "./base-provider.mjs";
3
3
  import { stripBaseNames } from "./util.mjs";
4
4
  import { Repository } from "./repository.mjs";
5
+ import { Branch } from "./branch.mjs";
5
6
  import { RepositoryGroup } from "./repository-group.mjs";
6
7
 
7
8
  /**
@@ -34,6 +35,11 @@ export class MultiGroupProvider extends BaseProvider {
34
35
  }
35
36
  }
36
37
 
38
+ /**
39
+ * Lookup a branch.
40
+ * @param {string} name of the branch
41
+ * @return {Promise<Branch>}
42
+ */
37
43
  async branch(name) {
38
44
  const { base, group, repository, branch } = this.parseName(name);
39
45
 
@@ -78,7 +84,7 @@ export class MultiGroupProvider extends BaseProvider {
78
84
 
79
85
  yield* matcher(
80
86
  this._repositoryGroups.values(),
81
- stripBaseNames(patterns,this.provider.repositoryBases),
87
+ stripBaseNames(patterns, this.provider.repositoryBases),
82
88
  {
83
89
  caseSensitive: this.areGroupNamesCaseSensitive,
84
90
  name: "name"
@@ -27,7 +27,7 @@ export class NamedObject extends BaseObject {
27
27
  }
28
28
 
29
29
  /**
30
- * Beatified name use for human displaying only.
30
+ * Beautified name use for human displaying only.
31
31
  * @return {string} human readable name
32
32
  */
33
33
  get displayName() {
package/src/ref.mjs CHANGED
@@ -1,11 +1,9 @@
1
1
  import { NamedObject } from "./named-object.mjs";
2
-
3
2
  /**
4
3
  * @typedef {Object} ContentEntry
5
4
  * @property {string} name
6
5
  *
7
6
  */
8
-
9
7
  /**
10
8
  * Base for Branch and Tag
11
9
  */
@@ -65,52 +65,4 @@ export class RepositoryGroup extends RepositoryOwner(NamedObject) {
65
65
  get areRepositoryGroupNamesCaseSensitive() {
66
66
  return this.provider.areRepositoryGroupNamesCaseSensitive;
67
67
  }
68
-
69
- /**
70
- * By default we use the providers implementation.
71
- * @return {Class} as defined in the provider
72
- */
73
- get repositoryClass() {
74
- return this.provider.repositoryClass;
75
- }
76
-
77
- /**
78
- * By default we use the providers implementation.
79
- * @return {Class} as defined in the provider
80
- */
81
- get branchClass() {
82
- return this.provider.branchClass;
83
- }
84
-
85
- /**
86
- * By default we use the providers implementation.
87
- * @return {Class} as defined in the provider
88
- */
89
- get tagClass() {
90
- return this.provider.tagClass;
91
- }
92
-
93
- /**
94
- * By default we use the providers implementation.
95
- * @return {Class} as defined in the provider
96
- */
97
- get contentClass() {
98
- return this.provider.contentClass;
99
- }
100
-
101
- /**
102
- * By default we use the providers implementation.
103
- * @return {Class} as defined in the provider
104
- */
105
- get pullRequestClass() {
106
- return this.provider.pullRequestClass;
107
- }
108
-
109
- /**
110
- * By default we use the providers implementation.
111
- * @return {Class} as defined in the provider
112
- */
113
- get hookClass() {
114
- return this.provider.hookClass;
115
- }
116
68
  }
@@ -490,54 +490,6 @@ export class Repository extends NamedObject {
490
490
  return undefined;
491
491
  }
492
492
 
493
- /**
494
- * By default we use the owners implementation.
495
- * @return {Class} as defined in the owner
496
- */
497
- get repositoryClass() {
498
- return this.owner.repositoryClass;
499
- }
500
-
501
- /**
502
- * By default we use the owners implementation.
503
- * @return {Class} as defined in the owner
504
- */
505
- get pullRequestClass() {
506
- return this.owner.pullRequestClass;
507
- }
508
-
509
- /**
510
- * By default we use the owners implementation.
511
- * @return {Class} as defined in the owner
512
- */
513
- get branchClass() {
514
- return this.owner.branchClass;
515
- }
516
-
517
- /**
518
- * By default we use the owners implementation.
519
- * @return {Class} as defined in the owner
520
- */
521
- get tagClass() {
522
- return this.owner.tagClass;
523
- }
524
-
525
- /**
526
- * By default we use the owners implementation.
527
- * @return {Class} as defined in the owner
528
- */
529
- get entryClass() {
530
- return this.owner.entryClass;
531
- }
532
-
533
- /**
534
- * By default we use the owners implementation.
535
- * @return {Class} as defined in the owner
536
- */
537
- get hookClass() {
538
- return this.owner.hookClass;
539
- }
540
-
541
493
  toString() {
542
494
  return this.fullName;
543
495
  }
package/src/util.mjs CHANGED
@@ -42,7 +42,7 @@ export function stripBaseName(name, repositoryBases, whenFound) {
42
42
  * @param {*} repositoryBases
43
43
  * @param {string[]} repositoryBases all possible bases
44
44
  * @param {Function} [whenFound] to be called with the found base name
45
- * @return {string[]} names without base
45
+ * @return {string[]|undefined} names without base
46
46
  */
47
47
  export function stripBaseNames(names, repositoryBases, whenFound) {
48
48
  return names === undefined