repository-provider 26.3.0 → 26.4.2

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,129 @@ 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)
174
187
  * [repositoryGroup](#repositorygroup)
175
- * [Parameters](#parameters-42)
188
+ * [Parameters](#parameters-45)
176
189
  * [repositoryGroups](#repositorygroups)
177
- * [Parameters](#parameters-43)
190
+ * [Parameters](#parameters-46)
178
191
  * [createRepositoryGroup](#createrepositorygroup)
179
- * [Parameters](#parameters-44)
192
+ * [Parameters](#parameters-47)
180
193
  * [addRepositoryGroup](#addrepositorygroup)
181
- * [Parameters](#parameters-45)
194
+ * [Parameters](#parameters-48)
182
195
  * [NamedObject](#namedobject)
183
- * [Parameters](#parameters-46)
196
+ * [Parameters](#parameters-49)
184
197
  * [Properties](#properties-7)
185
198
  * [equals](#equals-3)
186
- * [Parameters](#parameters-47)
199
+ * [Parameters](#parameters-50)
187
200
  * [displayName](#displayname)
188
- * [update](#update)
189
201
  * [toJSON](#tojson-2)
190
202
  * [Project](#project)
191
- * [Parameters](#parameters-48)
203
+ * [Parameters](#parameters-51)
192
204
  * [PullRequest](#pullrequest)
193
- * [Parameters](#parameters-49)
205
+ * [Parameters](#parameters-52)
194
206
  * [Properties](#properties-8)
195
207
  * [fullName](#fullname)
196
208
  * [url](#url-2)
197
209
  * [repository](#repository-1)
198
- * [provider](#provider-1)
210
+ * [provider](#provider-2)
199
211
  * [equals](#equals-4)
200
- * [Parameters](#parameters-50)
212
+ * [Parameters](#parameters-53)
201
213
  * [delete](#delete-1)
202
214
  * [merge](#merge)
203
- * [Parameters](#parameters-51)
215
+ * [Parameters](#parameters-54)
204
216
  * [decline](#decline)
205
217
  * [reviews](#reviews)
206
218
  * [identifier](#identifier)
@@ -208,9 +220,9 @@ console.log(await readme.getString());
208
220
  * [defaultListStates](#defaultliststates)
209
221
  * [validMergeMethods](#validmergemethods)
210
222
  * [list](#list-1)
211
- * [Parameters](#parameters-52)
223
+ * [Parameters](#parameters-55)
212
224
  * [open](#open)
213
- * [Parameters](#parameters-53)
225
+ * [Parameters](#parameters-56)
214
226
  * [title](#title)
215
227
  * [body](#body)
216
228
  * [state](#state)
@@ -220,20 +232,19 @@ console.log(await readme.getString());
220
232
  * [ContentEntry](#contententry)
221
233
  * [Properties](#properties-9)
222
234
  * [Ref](#ref)
223
- * [Parameters](#parameters-54)
235
+ * [Parameters](#parameters-57)
224
236
  * [equals](#equals-5)
225
- * [Parameters](#parameters-55)
237
+ * [Parameters](#parameters-58)
226
238
  * [ref](#ref-1)
227
239
  * [refId](#refid)
228
- * [Parameters](#parameters-56)
240
+ * [Parameters](#parameters-59)
229
241
  * [entries](#entries)
230
- * [Parameters](#parameters-57)
242
+ * [Parameters](#parameters-60)
231
243
  * [asyncIterator](#asynciterator)
232
244
  * [maybeEntry](#maybeentry)
233
- * [Parameters](#parameters-58)
245
+ * [Parameters](#parameters-61)
234
246
  * [entry](#entry)
235
- * [Parameters](#parameters-59)
236
- * [provider](#provider-2)
247
+ * [Parameters](#parameters-62)
237
248
  * [owner](#owner)
238
249
  * [fullName](#fullname-1)
239
250
  * [fullCondensedName](#fullcondensedname)
@@ -248,33 +259,28 @@ console.log(await readme.getString());
248
259
  * [attributes](#attributes-1)
249
260
  * [isProtected](#isprotected-1)
250
261
  * [RepositoryGroup](#repositorygroup-1)
251
- * [Parameters](#parameters-60)
262
+ * [Parameters](#parameters-63)
252
263
  * [Properties](#properties-10)
253
- * [repositoryClass](#repositoryclass-1)
254
- * [branchClass](#branchclass-1)
255
- * [contentClass](#contentclass)
256
- * [pullRequestClass](#pullrequestclass-2)
257
- * [hookClass](#hookclass-1)
258
264
  * [attributeMapping](#attributemapping-1)
259
265
  * [type](#type)
260
266
  * [url](#url-3)
261
267
  * [RepositoryOwner](#repositoryowner)
262
- * [Parameters](#parameters-61)
268
+ * [Parameters](#parameters-64)
263
269
  * [Repository](#repository-2)
264
- * [Parameters](#parameters-62)
270
+ * [Parameters](#parameters-65)
265
271
  * [Properties](#properties-11)
266
272
  * [fullName](#fullname-2)
267
273
  * [slug](#slug)
268
274
  * [provider](#provider-3)
269
275
  * [identifier](#identifier-2)
270
276
  * [equals](#equals-6)
271
- * [Parameters](#parameters-63)
277
+ * [Parameters](#parameters-66)
272
278
  * [entry](#entry-1)
273
- * [Parameters](#parameters-64)
279
+ * [Parameters](#parameters-67)
274
280
  * [entries](#entries-1)
275
- * [Parameters](#parameters-65)
281
+ * [Parameters](#parameters-68)
276
282
  * [maybeEntry](#maybeentry-1)
277
- * [Parameters](#parameters-66)
283
+ * [Parameters](#parameters-69)
278
284
  * [urls](#urls)
279
285
  * [url](#url-4)
280
286
  * [cloneURL](#cloneurl)
@@ -285,46 +291,43 @@ console.log(await readme.getString());
285
291
  * [isLocked](#islocked-1)
286
292
  * [isDisabled](#isdisabled-1)
287
293
  * [isTemplate](#istemplate)
288
- * [branch](#branch-1)
289
- * [Parameters](#parameters-67)
290
294
  * [defaultBranch](#defaultbranch)
295
+ * [branch](#branch-1)
296
+ * [Parameters](#parameters-70)
291
297
  * [branches](#branches-1)
292
- * [Parameters](#parameters-68)
298
+ * [Parameters](#parameters-71)
293
299
  * [createBranch](#createbranch-1)
294
- * [Parameters](#parameters-69)
300
+ * [Parameters](#parameters-72)
295
301
  * [addBranch](#addbranch)
296
- * [Parameters](#parameters-70)
302
+ * [Parameters](#parameters-73)
297
303
  * [deleteBranch](#deletebranch)
298
- * [Parameters](#parameters-71)
299
- * [tags](#tags-1)
300
- * [Parameters](#parameters-72)
304
+ * [Parameters](#parameters-74)
301
305
  * [tag](#tag)
302
- * [Parameters](#parameters-73)
306
+ * [Parameters](#parameters-75)
307
+ * [tags](#tags-1)
308
+ * [Parameters](#parameters-76)
309
+ * [addTag](#addtag)
310
+ * [Parameters](#parameters-77)
303
311
  * [delete](#delete-2)
304
312
  * [createPullRequest](#createpullrequest-1)
305
- * [Parameters](#parameters-74)
313
+ * [Parameters](#parameters-78)
306
314
  * [addPullRequest](#addpullrequest)
307
- * [Parameters](#parameters-75)
315
+ * [Parameters](#parameters-79)
308
316
  * [pullRequests](#pullrequests-1)
309
317
  * [pullRequest](#pullrequest-1)
310
- * [Parameters](#parameters-76)
318
+ * [Parameters](#parameters-80)
311
319
  * [deletePullRequest](#deletepullrequest)
312
- * [Parameters](#parameters-77)
320
+ * [Parameters](#parameters-81)
313
321
  * [addHook](#addhook)
314
- * [Parameters](#parameters-78)
322
+ * [Parameters](#parameters-82)
315
323
  * [createHook](#createhook)
316
- * [Parameters](#parameters-79)
324
+ * [Parameters](#parameters-83)
317
325
  * [hooks](#hooks-1)
318
326
  * [hook](#hook-1)
319
- * [Parameters](#parameters-80)
327
+ * [Parameters](#parameters-84)
320
328
  * [type](#type-1)
321
329
  * [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)
330
+ * [Parameters](#parameters-85)
328
331
  * [toJSON](#tojson-3)
329
332
  * [attributes](#attributes-2)
330
333
  * [defaultBranchName](#defaultbranchname)
@@ -333,23 +336,23 @@ console.log(await readme.getString());
333
336
  * [Review](#review)
334
337
  * [SingleGroupProvider](#singlegroupprovider)
335
338
  * [repository](#repository-3)
336
- * [Parameters](#parameters-82)
339
+ * [Parameters](#parameters-86)
337
340
  * [repositoryGroup](#repositorygroup-2)
338
- * [Parameters](#parameters-83)
341
+ * [Parameters](#parameters-87)
339
342
  * [repositoryGroups](#repositorygroups-1)
340
- * [Parameters](#parameters-84)
343
+ * [Parameters](#parameters-88)
341
344
  * [Tag](#tag-1)
342
- * [Parameters](#parameters-85)
345
+ * [Parameters](#parameters-89)
343
346
  * [refType](#reftype-1)
344
347
  * [isWritable](#iswritable-1)
345
348
  * [asArray](#asarray)
346
- * [Parameters](#parameters-86)
349
+ * [Parameters](#parameters-90)
347
350
  * [stripBaseName](#stripbasename)
348
- * [Parameters](#parameters-87)
351
+ * [Parameters](#parameters-91)
349
352
  * [stripBaseNames](#stripbasenames)
350
- * [Parameters](#parameters-88)
353
+ * [Parameters](#parameters-92)
351
354
  * [generateBranchName](#generatebranchname)
352
- * [Parameters](#parameters-89)
355
+ * [Parameters](#parameters-93)
353
356
 
354
357
  ## Application
355
358
 
@@ -480,8 +483,12 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
480
483
 
481
484
  ### Parameters
482
485
 
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)**
486
+ * `options` **any**
487
+ * `additionalProperties` **any**
488
+
489
+ ### update
490
+
491
+ Save object attributes in the backing store.
485
492
 
486
493
  ### equals
487
494
 
@@ -493,6 +500,72 @@ Check for equality
493
500
 
494
501
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if other is present
495
502
 
503
+ ### provider
504
+
505
+ The provider we live in.
506
+
507
+ Returns **[BaseProvider](#baseprovider)**
508
+
509
+ ### info
510
+
511
+ Forwarded to the owner.
512
+
513
+ #### Parameters
514
+
515
+ * `args` **...any**
516
+
517
+ ### warn
518
+
519
+ Forwarded to the owner.
520
+
521
+ #### Parameters
522
+
523
+ * `args` **...any**
524
+
525
+ ### error
526
+
527
+ Forwarded to the owner.
528
+
529
+ #### Parameters
530
+
531
+ * `args` **...any**
532
+
533
+ ### repositoryClass
534
+
535
+ By default we use the owners implementation.
536
+
537
+ Returns **Class** as defined in the owner
538
+
539
+ ### pullRequestClass
540
+
541
+ By default we use the owners implementation.
542
+
543
+ Returns **Class** as defined in the owner
544
+
545
+ ### branchClass
546
+
547
+ By default we use the owners implementation.
548
+
549
+ Returns **Class** as defined in the owner
550
+
551
+ ### tagClass
552
+
553
+ By default we use the owners implementation.
554
+
555
+ Returns **Class** as defined in the owner
556
+
557
+ ### entryClass
558
+
559
+ By default we use the owners implementation.
560
+
561
+ Returns **Class** as defined in the owner
562
+
563
+ ### hookClass
564
+
565
+ By default we use the owners implementation.
566
+
567
+ Returns **Class** as defined in the owner
568
+
496
569
  ### attributes
497
570
 
498
571
  Attributes definitions
@@ -766,6 +839,10 @@ Returns **Class** repository class used by the Provider
766
839
 
767
840
  Returns **Class** branch class used by the Provider
768
841
 
842
+ ### tagClass
843
+
844
+ Returns **Class** branch class used by the Provider
845
+
769
846
  ### entryClass
770
847
 
771
848
  Returns **Class** entry class used by the Provider
@@ -924,6 +1001,7 @@ Add commits into a pull request.
924
1001
  * `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
1002
  * `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
1003
  * `options.bodyFromCommitMessages` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** generate body from commit messages
1004
+ * `options.body` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** body of the PR
927
1005
 
928
1006
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>**
929
1007
 
@@ -935,12 +1013,6 @@ Remove entries form the branch.
935
1013
 
936
1014
  * `entries` **AsyncIterator<[ContentEntry](#contententry)>**
937
1015
 
938
- ### entryClass
939
-
940
- By default we use the providers implementation.
941
-
942
- Returns **Class** as defined in the repository
943
-
944
1016
  ### createPullRequest
945
1017
 
946
1018
  Create a pull request.
@@ -952,12 +1024,6 @@ Create a pull request.
952
1024
 
953
1025
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[PullRequest](#pullrequest)>**
954
1026
 
955
- ### pullRequestClass
956
-
957
- By default we use the repository implementation.
958
-
959
- Returns **Class** as defined in the repository
960
-
961
1027
  ### createBranch
962
1028
 
963
1029
  Create a new [Branch](#branch) by cloning a given source branch.
@@ -1114,14 +1180,10 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1114
1180
 
1115
1181
  ### displayName
1116
1182
 
1117
- Beatified name use for human displaying only.
1183
+ Beautified name use for human displaying only.
1118
1184
 
1119
1185
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** human readable name
1120
1186
 
1121
- ### update
1122
-
1123
- Save object attributes in the backing store.
1124
-
1125
1187
  ### toJSON
1126
1188
 
1127
1189
  Provide name and all defined attributes.
@@ -1392,12 +1454,6 @@ Get exactly one matching entry by name (throws if entry is not found).
1392
1454
 
1393
1455
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
1394
1456
 
1395
- ### provider
1396
-
1397
- The provider we live in.
1398
-
1399
- Returns **[BaseProvider](#baseprovider)**
1400
-
1401
1457
  ### owner
1402
1458
 
1403
1459
  * **See**: [Repository#owner](Repository#owner)
@@ -1494,36 +1550,6 @@ Abstract repository collection.
1494
1550
  * `provider` **[BaseProvider](#baseprovider)**
1495
1551
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1496
1552
 
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
1553
  ### attributeMapping
1528
1554
 
1529
1555
  Map attributes between external and internal representation.
@@ -1697,6 +1723,12 @@ By default we are not a template.
1697
1723
 
1698
1724
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false
1699
1725
 
1726
+ ### defaultBranch
1727
+
1728
+ Lookup the default branch.
1729
+
1730
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** branch named after defaultBranchName
1731
+
1700
1732
  ### branch
1701
1733
 
1702
1734
  Lookup branch by name.
@@ -1707,12 +1739,6 @@ Lookup branch by name.
1707
1739
 
1708
1740
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>**
1709
1741
 
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
1742
  ### branches
1717
1743
 
1718
1744
  #### Parameters
@@ -1743,7 +1769,7 @@ Internal branch creation does not call repository.initialize()
1743
1769
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new branch
1744
1770
  * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
1745
1771
 
1746
- Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** newly created branch
1772
+ Returns **[Branch](#branch)** newly created branch
1747
1773
 
1748
1774
  ### deleteBranch
1749
1775
 
@@ -1755,6 +1781,16 @@ Delete a [Branch](#branch).
1755
1781
 
1756
1782
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
1757
1783
 
1784
+ ### tag
1785
+
1786
+ Get a Tag.
1787
+
1788
+ #### Parameters
1789
+
1790
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1791
+
1792
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Tag](#tag)>**
1793
+
1758
1794
  ### tags
1759
1795
 
1760
1796
  #### Parameters
@@ -1763,15 +1799,17 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1763
1799
 
1764
1800
  Returns **AsyncIterator<[Tag](#tag)>** of all tags
1765
1801
 
1766
- ### tag
1802
+ ### addTag
1767
1803
 
1768
- Get a Tag.
1804
+ Add a new [Tag](#tag).
1805
+ Internal tag creation does not call repository.initialize()
1769
1806
 
1770
1807
  #### Parameters
1771
1808
 
1772
- * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1809
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new tag
1810
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
1773
1811
 
1774
- Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Tag](#tag)>**
1812
+ Returns **[Tag](#tag)** newly created tag
1775
1813
 
1776
1814
  ### delete
1777
1815
 
@@ -1878,36 +1916,6 @@ Get sha of a ref.
1878
1916
 
1879
1917
  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
1918
 
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
1919
  ### toJSON
1912
1920
 
1913
1921
  Provide name and all defined attributes
@@ -2028,7 +2036,7 @@ Loops over names and executes stripBaseName.
2028
2036
  * `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
2037
  * `whenFound` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** to be called with the found base name
2030
2038
 
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
2039
+ 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
2040
 
2033
2041
  ## generateBranchName
2034
2042
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "26.3.0",
3
+ "version": "26.4.2",
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,
@@ -85,6 +90,14 @@ export class BaseObject {
85
90
  return other !== undefined;
86
91
  }
87
92
 
93
+ /**
94
+ * The provider we live in.
95
+ * @return {BaseProvider}
96
+ */
97
+ get provider() {
98
+ return this.owner.provider;
99
+ }
100
+
88
101
  /**
89
102
  * Forwarded to the owner.
90
103
  * @param {...any} args
@@ -108,4 +121,52 @@ export class BaseObject {
108
121
  error(...args) {
109
122
  return this.owner.error(...args);
110
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
+ }
111
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
  */
@@ -96,14 +94,6 @@ export class Ref extends NamedObject {
96
94
  return e;
97
95
  }
98
96
 
99
- /**
100
- * The provider we live in.
101
- * @return {BaseProvider}
102
- */
103
- get provider() {
104
- return this.repository.provider;
105
- }
106
-
107
97
  /**
108
98
  * Branch owner.
109
99
  * By default we provide the repository owner
@@ -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