repository-provider 35.2.2 → 35.2.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 +89 -85
- package/package.json +1 -1
- package/src/base-object.mjs +3 -1
- package/src/base-provider.mjs +18 -5
- package/src/branch.mjs +11 -2
- package/src/multi-group-provider.mjs +1 -0
- package/src/named-object.mjs +7 -0
- package/src/owned-object.mjs +12 -1
- package/src/pull-request.mjs +5 -0
- package/src/ref.mjs +6 -0
- package/src/repository-owner.mjs +2 -0
- package/src/repository.mjs +11 -2
- package/src/single-group-provider.mjs +2 -0
- package/types/base-provider.d.mts +9 -4
- package/types/branch.d.mts +3 -3
- package/types/named-object.d.mts +6 -0
- package/types/owned-object.d.mts +21 -7
- package/types/ref.d.mts +9 -1
- package/types/repository-group.d.mts +1 -1
- package/types/repository-owner.d.mts +1 -1
- package/types/single-group-provider.d.mts +1 -1
package/README.md
CHANGED
|
@@ -152,40 +152,41 @@ console.log(await readme.string);
|
|
|
152
152
|
* [createBranch](#createbranch)
|
|
153
153
|
* [Parameters](#parameters-30)
|
|
154
154
|
* [CommitResult](#commitresult)
|
|
155
|
+
* [Parameters](#parameters-31)
|
|
155
156
|
* [Properties](#properties-4)
|
|
156
157
|
* [Commit](#commit-1)
|
|
157
|
-
* [Parameters](#parameters-
|
|
158
|
+
* [Parameters](#parameters-32)
|
|
158
159
|
* [Properties](#properties-5)
|
|
159
160
|
* [Hook](#hook)
|
|
160
161
|
* [Issue](#issue)
|
|
161
162
|
* [Milestone](#milestone)
|
|
162
163
|
* [MultiGroupProvider](#multigroupprovider)
|
|
163
164
|
* [repository](#repository)
|
|
164
|
-
* [Parameters](#parameters-32)
|
|
165
|
-
* [branch](#branch-1)
|
|
166
165
|
* [Parameters](#parameters-33)
|
|
167
|
-
* [
|
|
166
|
+
* [branch](#branch-1)
|
|
168
167
|
* [Parameters](#parameters-34)
|
|
169
|
-
* [
|
|
168
|
+
* [repositoryGroup](#repositorygroup)
|
|
170
169
|
* [Parameters](#parameters-35)
|
|
171
|
-
* [
|
|
170
|
+
* [repositoryGroups](#repositorygroups)
|
|
172
171
|
* [Parameters](#parameters-36)
|
|
173
|
-
* [
|
|
172
|
+
* [createRepositoryGroup](#createrepositorygroup)
|
|
174
173
|
* [Parameters](#parameters-37)
|
|
174
|
+
* [addRepositoryGroup](#addrepositorygroup)
|
|
175
|
+
* [Parameters](#parameters-38)
|
|
175
176
|
* [NamedObject](#namedobject)
|
|
176
|
-
* [Parameters](#parameters-
|
|
177
|
+
* [Parameters](#parameters-39)
|
|
177
178
|
* [Properties](#properties-6)
|
|
178
179
|
* [displayName](#displayname)
|
|
179
180
|
* [condensedName](#condensedname)
|
|
180
181
|
* [fullCondensedName](#fullcondensedname)
|
|
181
182
|
* [equals](#equals-2)
|
|
182
|
-
* [Parameters](#parameters-
|
|
183
|
+
* [Parameters](#parameters-40)
|
|
183
184
|
* [toJSON](#tojson-1)
|
|
184
185
|
* [OwnedObject](#ownedobject)
|
|
185
|
-
* [Parameters](#parameters-
|
|
186
|
+
* [Parameters](#parameters-41)
|
|
186
187
|
* [delete](#delete-1)
|
|
187
188
|
* [equals](#equals-3)
|
|
188
|
-
* [Parameters](#parameters-
|
|
189
|
+
* [Parameters](#parameters-42)
|
|
189
190
|
* [homePageURL](#homepageurl)
|
|
190
191
|
* [issuesURL](#issuesurl)
|
|
191
192
|
* [isLocked](#islocked)
|
|
@@ -198,15 +199,15 @@ console.log(await readme.string);
|
|
|
198
199
|
* [identifier](#identifier)
|
|
199
200
|
* [fullName](#fullname-1)
|
|
200
201
|
* [trace](#trace)
|
|
201
|
-
* [Parameters](#parameters-42)
|
|
202
|
-
* [info](#info)
|
|
203
202
|
* [Parameters](#parameters-43)
|
|
204
|
-
* [
|
|
203
|
+
* [info](#info)
|
|
205
204
|
* [Parameters](#parameters-44)
|
|
206
|
-
* [
|
|
205
|
+
* [warn](#warn)
|
|
207
206
|
* [Parameters](#parameters-45)
|
|
208
|
-
* [
|
|
207
|
+
* [error](#error)
|
|
209
208
|
* [Parameters](#parameters-46)
|
|
209
|
+
* [debug](#debug)
|
|
210
|
+
* [Parameters](#parameters-47)
|
|
210
211
|
* [repositoryClass](#repositoryclass-1)
|
|
211
212
|
* [pullRequestClass](#pullrequestclass-1)
|
|
212
213
|
* [branchClass](#branchclass-1)
|
|
@@ -217,14 +218,14 @@ console.log(await readme.string);
|
|
|
217
218
|
* [deleteMethodName](#deletemethodname)
|
|
218
219
|
* [Project](#project)
|
|
219
220
|
* [PullRequest](#pullrequest)
|
|
220
|
-
* [Parameters](#parameters-
|
|
221
|
+
* [Parameters](#parameters-48)
|
|
221
222
|
* [Properties](#properties-7)
|
|
222
223
|
* [fullName](#fullname-2)
|
|
223
224
|
* [url](#url-2)
|
|
224
225
|
* [repository](#repository-1)
|
|
225
226
|
* [delete](#delete-2)
|
|
226
227
|
* [merge](#merge)
|
|
227
|
-
* [Parameters](#parameters-
|
|
228
|
+
* [Parameters](#parameters-49)
|
|
228
229
|
* [decline](#decline)
|
|
229
230
|
* [reviews](#reviews)
|
|
230
231
|
* [identifier](#identifier-1)
|
|
@@ -232,25 +233,23 @@ console.log(await readme.string);
|
|
|
232
233
|
* [states](#states)
|
|
233
234
|
* [validMergeMethods](#validmergemethods)
|
|
234
235
|
* [list](#list-1)
|
|
235
|
-
* [Parameters](#parameters-49)
|
|
236
|
-
* [open](#open)
|
|
237
236
|
* [Parameters](#parameters-50)
|
|
237
|
+
* [open](#open)
|
|
238
|
+
* [Parameters](#parameters-51)
|
|
238
239
|
* [state](#state)
|
|
239
240
|
* [locked](#locked)
|
|
240
241
|
* [merged](#merged)
|
|
241
242
|
* [draft](#draft)
|
|
242
|
-
* [ContentEntry](#contententry)
|
|
243
|
-
* [Properties](#properties-8)
|
|
244
243
|
* [Ref](#ref)
|
|
245
244
|
* [ref](#ref-1)
|
|
246
245
|
* [refId](#refid)
|
|
247
246
|
* [entries](#entries)
|
|
248
|
-
* [Parameters](#parameters-
|
|
247
|
+
* [Parameters](#parameters-52)
|
|
249
248
|
* [asyncIterator](#asynciterator)
|
|
250
249
|
* [maybeEntry](#maybeentry)
|
|
251
|
-
* [Parameters](#parameters-52)
|
|
252
|
-
* [entry](#entry)
|
|
253
250
|
* [Parameters](#parameters-53)
|
|
251
|
+
* [entry](#entry)
|
|
252
|
+
* [Parameters](#parameters-54)
|
|
254
253
|
* [repository](#repository-2)
|
|
255
254
|
* [fullName](#fullname-3)
|
|
256
255
|
* [fullCondensedName](#fullcondensedname-1)
|
|
@@ -259,25 +258,25 @@ console.log(await readme.string);
|
|
|
259
258
|
* [attributes](#attributes-1)
|
|
260
259
|
* [isProtected](#isprotected-1)
|
|
261
260
|
* [RepositoryGroup](#repositorygroup-1)
|
|
262
|
-
* [Parameters](#parameters-
|
|
263
|
-
* [Properties](#properties-
|
|
261
|
+
* [Parameters](#parameters-55)
|
|
262
|
+
* [Properties](#properties-8)
|
|
264
263
|
* [attributeMapping](#attributemapping-1)
|
|
265
264
|
* [type](#type-1)
|
|
266
265
|
* [homePageURL](#homepageurl-1)
|
|
267
266
|
* [RepositoryOwner](#repositoryowner)
|
|
268
|
-
* [Parameters](#parameters-55)
|
|
269
|
-
* [Repository](#repository-3)
|
|
270
267
|
* [Parameters](#parameters-56)
|
|
271
|
-
|
|
268
|
+
* [Repository](#repository-3)
|
|
269
|
+
* [Parameters](#parameters-57)
|
|
270
|
+
* [Properties](#properties-9)
|
|
272
271
|
* [slug](#slug-1)
|
|
273
272
|
* [entry](#entry-1)
|
|
274
|
-
* [Parameters](#parameters-57)
|
|
275
|
-
* [entries](#entries-1)
|
|
276
273
|
* [Parameters](#parameters-58)
|
|
277
|
-
* [
|
|
274
|
+
* [entries](#entries-1)
|
|
278
275
|
* [Parameters](#parameters-59)
|
|
279
|
-
* [
|
|
276
|
+
* [maybeEntry](#maybeentry-1)
|
|
280
277
|
* [Parameters](#parameters-60)
|
|
278
|
+
* [commits](#commits)
|
|
279
|
+
* [Parameters](#parameters-61)
|
|
281
280
|
* [cloneURL](#cloneurl)
|
|
282
281
|
* [issuesURL](#issuesurl-1)
|
|
283
282
|
* [homePageURL](#homepageurl-2)
|
|
@@ -288,70 +287,73 @@ console.log(await readme.string);
|
|
|
288
287
|
* [delete](#delete-3)
|
|
289
288
|
* [defaultBranch](#defaultbranch)
|
|
290
289
|
* [branch](#branch-2)
|
|
291
|
-
* [Parameters](#parameters-
|
|
290
|
+
* [Parameters](#parameters-62)
|
|
292
291
|
* [hasBranches](#hasbranches)
|
|
293
292
|
* [branches](#branches-1)
|
|
294
|
-
* [Parameters](#parameters-62)
|
|
295
|
-
* [createBranch](#createbranch-1)
|
|
296
293
|
* [Parameters](#parameters-63)
|
|
297
|
-
* [
|
|
294
|
+
* [createBranch](#createbranch-1)
|
|
298
295
|
* [Parameters](#parameters-64)
|
|
299
|
-
* [
|
|
296
|
+
* [addBranch](#addbranch)
|
|
300
297
|
* [Parameters](#parameters-65)
|
|
301
|
-
* [
|
|
298
|
+
* [deleteBranch](#deletebranch)
|
|
302
299
|
* [Parameters](#parameters-66)
|
|
303
|
-
* [
|
|
300
|
+
* [tag](#tag)
|
|
304
301
|
* [Parameters](#parameters-67)
|
|
305
|
-
* [
|
|
302
|
+
* [tags](#tags-1)
|
|
306
303
|
* [Parameters](#parameters-68)
|
|
307
|
-
* [
|
|
304
|
+
* [addTag](#addtag)
|
|
308
305
|
* [Parameters](#parameters-69)
|
|
309
|
-
* [
|
|
306
|
+
* [createPullRequest](#createpullrequest-1)
|
|
310
307
|
* [Parameters](#parameters-70)
|
|
308
|
+
* [addPullRequest](#addpullrequest)
|
|
309
|
+
* [Parameters](#parameters-71)
|
|
311
310
|
* [pullRequests](#pullrequests-1)
|
|
312
311
|
* [pullRequest](#pullrequest-1)
|
|
313
|
-
* [Parameters](#parameters-71)
|
|
314
|
-
* [deletePullRequest](#deletepullrequest)
|
|
315
312
|
* [Parameters](#parameters-72)
|
|
316
|
-
* [
|
|
313
|
+
* [deletePullRequest](#deletepullrequest)
|
|
317
314
|
* [Parameters](#parameters-73)
|
|
318
|
-
* [
|
|
315
|
+
* [addHook](#addhook)
|
|
319
316
|
* [Parameters](#parameters-74)
|
|
317
|
+
* [createHook](#createhook)
|
|
318
|
+
* [Parameters](#parameters-75)
|
|
320
319
|
* [hooks](#hooks-1)
|
|
321
320
|
* [hook](#hook-1)
|
|
322
|
-
* [Parameters](#parameters-75)
|
|
323
|
-
* [milestone](#milestone-1)
|
|
324
321
|
* [Parameters](#parameters-76)
|
|
325
|
-
* [
|
|
322
|
+
* [milestone](#milestone-1)
|
|
326
323
|
* [Parameters](#parameters-77)
|
|
327
|
-
* [
|
|
324
|
+
* [project](#project-1)
|
|
328
325
|
* [Parameters](#parameters-78)
|
|
326
|
+
* [application](#application-1)
|
|
327
|
+
* [Parameters](#parameters-79)
|
|
329
328
|
* [type](#type-2)
|
|
330
329
|
* [refId](#refid-1)
|
|
331
|
-
* [Parameters](#parameters-
|
|
330
|
+
* [Parameters](#parameters-80)
|
|
332
331
|
* [attributes](#attributes-2)
|
|
333
332
|
* [defaultBranchName](#defaultbranchname)
|
|
334
333
|
* [branches](#branches-2)
|
|
335
334
|
* [tags](#tags-2)
|
|
335
|
+
* [projects](#projects-1)
|
|
336
|
+
* [applications](#applications)
|
|
337
|
+
* [milestones](#milestones-1)
|
|
336
338
|
* [pullRequests](#pullrequests-2)
|
|
337
339
|
* [Review](#review)
|
|
338
340
|
* [SingleGroupProvider](#singlegroupprovider)
|
|
339
341
|
* [repository](#repository-4)
|
|
340
|
-
* [Parameters](#parameters-80)
|
|
341
|
-
* [repositoryGroup](#repositorygroup-2)
|
|
342
342
|
* [Parameters](#parameters-81)
|
|
343
|
-
* [
|
|
343
|
+
* [repositoryGroup](#repositorygroup-2)
|
|
344
344
|
* [Parameters](#parameters-82)
|
|
345
|
+
* [repositoryGroups](#repositorygroups-1)
|
|
346
|
+
* [Parameters](#parameters-83)
|
|
345
347
|
* [Tag](#tag-1)
|
|
346
348
|
* [refType](#reftype-1)
|
|
347
349
|
* [asArray](#asarray)
|
|
348
|
-
* [Parameters](#parameters-83)
|
|
349
|
-
* [stripBaseName](#stripbasename)
|
|
350
350
|
* [Parameters](#parameters-84)
|
|
351
|
-
* [
|
|
351
|
+
* [stripBaseName](#stripbasename)
|
|
352
352
|
* [Parameters](#parameters-85)
|
|
353
|
-
* [
|
|
353
|
+
* [stripBaseNames](#stripbasenames)
|
|
354
354
|
* [Parameters](#parameters-86)
|
|
355
|
+
* [generateBranchName](#generatebranchname)
|
|
356
|
+
* [Parameters](#parameters-87)
|
|
355
357
|
|
|
356
358
|
## Application
|
|
357
359
|
|
|
@@ -823,7 +825,7 @@ To forward info/warn and error messages to
|
|
|
823
825
|
|
|
824
826
|
* **See**: [Repository#\_addBranch](Repository#_addBranch)
|
|
825
827
|
|
|
826
|
-
|
|
828
|
+
Abstract branch.
|
|
827
829
|
|
|
828
830
|
### Parameters
|
|
829
831
|
|
|
@@ -833,8 +835,6 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
833
835
|
|
|
834
836
|
### Properties
|
|
835
837
|
|
|
836
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** /\*\*
|
|
837
|
-
Abstract branch.
|
|
838
838
|
* `repository` **[Repository](#repository)** 
|
|
839
839
|
* `provider` **Provider** 
|
|
840
840
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
@@ -874,7 +874,7 @@ Commit entries.
|
|
|
874
874
|
#### Parameters
|
|
875
875
|
|
|
876
876
|
* `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** commit message
|
|
877
|
-
* `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>** content to be commited
|
|
878
878
|
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
879
879
|
|
|
880
880
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[CommitResult](#commitresult)>** 
|
|
@@ -902,7 +902,7 @@ Remove entries form the branch.
|
|
|
902
902
|
|
|
903
903
|
#### Parameters
|
|
904
904
|
|
|
905
|
-
* `entries` **AsyncIterable
|
|
905
|
+
* `entries` **AsyncIterable\<ContentEntry>** 
|
|
906
906
|
|
|
907
907
|
### createPullRequest
|
|
908
908
|
|
|
@@ -929,7 +929,9 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
|
|
|
929
929
|
|
|
930
930
|
## CommitResult
|
|
931
931
|
|
|
932
|
-
|
|
932
|
+
### Parameters
|
|
933
|
+
|
|
934
|
+
* `ref`  
|
|
933
935
|
|
|
934
936
|
### Properties
|
|
935
937
|
|
|
@@ -1243,7 +1245,7 @@ Returns **[Tag](#tag)** as defined in the owner
|
|
|
1243
1245
|
|
|
1244
1246
|
By default we use the owners implementation.
|
|
1245
1247
|
|
|
1246
|
-
Returns **
|
|
1248
|
+
Returns **ContentEntry** as defined in the owner
|
|
1247
1249
|
|
|
1248
1250
|
### hookClass
|
|
1249
1251
|
|
|
@@ -1419,14 +1421,6 @@ Draft state of the pull request.
|
|
|
1419
1421
|
|
|
1420
1422
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
1421
1423
|
|
|
1422
|
-
## ContentEntry
|
|
1423
|
-
|
|
1424
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1425
|
-
|
|
1426
|
-
### Properties
|
|
1427
|
-
|
|
1428
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1429
|
-
|
|
1430
1424
|
## Ref
|
|
1431
1425
|
|
|
1432
1426
|
**Extends OwnedObject**
|
|
@@ -1453,13 +1447,13 @@ List entries of the branch.
|
|
|
1453
1447
|
|
|
1454
1448
|
* `matchingPatterns` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** 
|
|
1455
1449
|
|
|
1456
|
-
Returns **AsyncGenerator
|
|
1450
|
+
Returns **AsyncGenerator\<ContentEntry>** all matching entries in the branch
|
|
1457
1451
|
|
|
1458
1452
|
### asyncIterator
|
|
1459
1453
|
|
|
1460
1454
|
List all entries of the branch.
|
|
1461
1455
|
|
|
1462
|
-
Returns **AsyncGenerator
|
|
1456
|
+
Returns **AsyncGenerator\<ContentEntry>** all entries in the branch
|
|
1463
1457
|
|
|
1464
1458
|
### maybeEntry
|
|
1465
1459
|
|
|
@@ -1469,7 +1463,7 @@ Get exactly one matching entry by name or undefine if no such entry is found.
|
|
|
1469
1463
|
|
|
1470
1464
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1471
1465
|
|
|
1472
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<(
|
|
1466
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<(ContentEntry | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))>** 
|
|
1473
1467
|
|
|
1474
1468
|
### entry
|
|
1475
1469
|
|
|
@@ -1479,7 +1473,7 @@ Get exactly one matching entry by name (throws if entry is not found).
|
|
|
1479
1473
|
|
|
1480
1474
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1481
1475
|
|
|
1482
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1476
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ContentEntry>** 
|
|
1483
1477
|
|
|
1484
1478
|
### repository
|
|
1485
1479
|
|
|
@@ -1568,7 +1562,7 @@ Mixin to define a class able to handle a collection of repositories.
|
|
|
1568
1562
|
|
|
1569
1563
|
## Repository
|
|
1570
1564
|
|
|
1571
|
-
|
|
1565
|
+
Abstract repository
|
|
1572
1566
|
|
|
1573
1567
|
### Parameters
|
|
1574
1568
|
|
|
@@ -1581,8 +1575,6 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
1581
1575
|
|
|
1582
1576
|
### Properties
|
|
1583
1577
|
|
|
1584
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** /\*\*
|
|
1585
|
-
Abstract repository
|
|
1586
1578
|
* `owner` **[RepositoryOwner](#repositoryowner)** 
|
|
1587
1579
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** without (#branch)
|
|
1588
1580
|
* `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.description
|
|
@@ -1607,7 +1599,7 @@ Lookup entries form the head of the default branch.
|
|
|
1607
1599
|
|
|
1608
1600
|
* `name`  
|
|
1609
1601
|
|
|
1610
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)
|
|
1602
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<ContentEntry>** 
|
|
1611
1603
|
|
|
1612
1604
|
### entries
|
|
1613
1605
|
|
|
@@ -1617,7 +1609,7 @@ List entries of the default branch.
|
|
|
1617
1609
|
|
|
1618
1610
|
* `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))?** 
|
|
1619
1611
|
|
|
1620
|
-
Returns **AsyncIterable
|
|
1612
|
+
Returns **AsyncIterable\<ContentEntry>** all matching entries in the branch
|
|
1621
1613
|
|
|
1622
1614
|
### maybeEntry
|
|
1623
1615
|
|
|
@@ -1627,7 +1619,7 @@ Get exactly one matching entry by name or undefined if no such entry is found.
|
|
|
1627
1619
|
|
|
1628
1620
|
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1629
1621
|
|
|
1630
|
-
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<(
|
|
1622
|
+
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<(ContentEntry | [undefined](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined))>** 
|
|
1631
1623
|
|
|
1632
1624
|
### commits
|
|
1633
1625
|
|
|
@@ -1929,6 +1921,18 @@ Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_O
|
|
|
1929
1921
|
|
|
1930
1922
|
Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Tag](#tag)>
|
|
1931
1923
|
|
|
1924
|
+
## projects
|
|
1925
|
+
|
|
1926
|
+
Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Project](#project)>
|
|
1927
|
+
|
|
1928
|
+
## applications
|
|
1929
|
+
|
|
1930
|
+
Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Application](#application)>
|
|
1931
|
+
|
|
1932
|
+
## milestones
|
|
1933
|
+
|
|
1934
|
+
Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Milestone](#milestone)>
|
|
1935
|
+
|
|
1932
1936
|
## pullRequests
|
|
1933
1937
|
|
|
1934
1938
|
Type: [Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [PullRequest](#pullrequest)>
|
package/package.json
CHANGED
package/src/base-object.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
|
8
8
|
* Creates an instance of BaseObject.
|
|
9
9
|
* @param {Object} options
|
|
10
10
|
* @param {Object} [additionalProperties]
|
|
11
|
-
*
|
|
11
|
+
*
|
|
12
12
|
* @property {string?} id
|
|
13
13
|
* @property {string?} description
|
|
14
14
|
*/
|
|
@@ -72,6 +72,7 @@ export class BaseObject {
|
|
|
72
72
|
updateAttributes(options, additionalProperties) {
|
|
73
73
|
definePropertiesFromOptions(
|
|
74
74
|
this,
|
|
75
|
+
// @ts-ignore
|
|
75
76
|
mapAttributes(options, this.constructor.attributeMapping),
|
|
76
77
|
additionalProperties
|
|
77
78
|
);
|
|
@@ -94,6 +95,7 @@ export class BaseObject {
|
|
|
94
95
|
* @return {string}
|
|
95
96
|
*/
|
|
96
97
|
get fullName() {
|
|
98
|
+
// @ts-ignore
|
|
97
99
|
return this.name;
|
|
98
100
|
}
|
|
99
101
|
|
package/src/base-provider.mjs
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import { ContentEntry } from "content-entry";
|
|
1
2
|
import { asArray, stripBaseName } from "./util.mjs";
|
|
2
3
|
import { PullRequest } from "./pull-request.mjs";
|
|
3
4
|
import { RepositoryGroup } from "./repository-group.mjs";
|
|
5
|
+
import { BaseObject } from "./base-object.mjs";
|
|
4
6
|
import { Repository } from "./repository.mjs";
|
|
5
|
-
import { Branch } from "./branch.mjs";
|
|
6
7
|
import { Tag } from "./tag.mjs";
|
|
8
|
+
import { Branch } from "./branch.mjs";
|
|
7
9
|
import { Hook } from "./hook.mjs";
|
|
8
|
-
import { Project } from "./project.mjs";
|
|
9
|
-
import { Milestone } from "./milestone.mjs";
|
|
10
|
-
import { BaseObject } from "./base-object.mjs";
|
|
11
10
|
import {
|
|
12
11
|
url_attribute,
|
|
13
12
|
name_attribute,
|
|
@@ -16,6 +15,11 @@ import {
|
|
|
16
15
|
default_attribute
|
|
17
16
|
} from "./attributes.mjs";
|
|
18
17
|
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {import('./project.mjs').Project} Project
|
|
20
|
+
* @typedef {import('./milestone.mjs').Milestone} Milestone
|
|
21
|
+
*/
|
|
22
|
+
|
|
19
23
|
/**
|
|
20
24
|
* @typedef {Object} MessageDestination
|
|
21
25
|
* Endpoint to deliver log messages to.
|
|
@@ -154,7 +158,7 @@ export class BaseProvider extends BaseObject {
|
|
|
154
158
|
}
|
|
155
159
|
|
|
156
160
|
/**
|
|
157
|
-
* @param {
|
|
161
|
+
* @param {any} other
|
|
158
162
|
* @return {boolean} true if other provider is the same as the receiver
|
|
159
163
|
*/
|
|
160
164
|
equals(other) {
|
|
@@ -297,6 +301,7 @@ export class BaseProvider extends BaseObject {
|
|
|
297
301
|
*/
|
|
298
302
|
async createRepository(name, options) {
|
|
299
303
|
const { group, repository } = this.parseName(name);
|
|
304
|
+
// @ts-ignore
|
|
300
305
|
const rg = await this.repositoryGroup(group);
|
|
301
306
|
return rg.createRepository(repository, options);
|
|
302
307
|
}
|
|
@@ -309,6 +314,7 @@ export class BaseProvider extends BaseObject {
|
|
|
309
314
|
*/
|
|
310
315
|
async *list(type, patterns) {
|
|
311
316
|
if (patterns === undefined) {
|
|
317
|
+
// @ts-ignore
|
|
312
318
|
for await (const group of this.repositoryGroups()) {
|
|
313
319
|
yield* group[type]();
|
|
314
320
|
}
|
|
@@ -319,6 +325,7 @@ export class BaseProvider extends BaseObject {
|
|
|
319
325
|
this.repositoryBases
|
|
320
326
|
).split(/\//);
|
|
321
327
|
|
|
328
|
+
// @ts-ignore
|
|
322
329
|
for await (const group of this.repositoryGroups(groupPattern)) {
|
|
323
330
|
yield* group[type](repoPattern);
|
|
324
331
|
}
|
|
@@ -412,6 +419,7 @@ export class BaseProvider extends BaseObject {
|
|
|
412
419
|
toJSON() {
|
|
413
420
|
const json = { name: this.name };
|
|
414
421
|
|
|
422
|
+
// @ts-ignore
|
|
415
423
|
Object.entries(this.constructor.attributes).forEach(([k, v]) => {
|
|
416
424
|
if (
|
|
417
425
|
!v.private &&
|
|
@@ -428,22 +436,27 @@ export class BaseProvider extends BaseObject {
|
|
|
428
436
|
initializeRepositories() {}
|
|
429
437
|
|
|
430
438
|
trace(...args) {
|
|
439
|
+
// @ts-ignore
|
|
431
440
|
return this.messageDestination.trace(...args);
|
|
432
441
|
}
|
|
433
442
|
|
|
434
443
|
debug(...args) {
|
|
444
|
+
// @ts-ignore
|
|
435
445
|
return this.messageDestination.debug(...args);
|
|
436
446
|
}
|
|
437
447
|
|
|
438
448
|
info(...args) {
|
|
449
|
+
// @ts-ignore
|
|
439
450
|
return this.messageDestination.info(...args);
|
|
440
451
|
}
|
|
441
452
|
|
|
442
453
|
warn(...args) {
|
|
454
|
+
// @ts-ignore
|
|
443
455
|
return this.messageDestination.warn(...args);
|
|
444
456
|
}
|
|
445
457
|
|
|
446
458
|
error(...args) {
|
|
459
|
+
// @ts-ignore
|
|
447
460
|
return this.messageDestination.error(...args);
|
|
448
461
|
}
|
|
449
462
|
|
package/src/branch.mjs
CHANGED
|
@@ -84,9 +84,11 @@ export class Branch extends Ref {
|
|
|
84
84
|
* @param {string} message commit message
|
|
85
85
|
* @param {ContentEntry[]} updates content to be commited
|
|
86
86
|
* @param {Object} options
|
|
87
|
-
* @return {Promise<CommitResult>}
|
|
87
|
+
* @return {Promise<CommitResult|undefined>}
|
|
88
88
|
*/
|
|
89
|
-
async commit(message, updates, options) {
|
|
89
|
+
async commit(message, updates, options) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
90
92
|
|
|
91
93
|
/**
|
|
92
94
|
* Add commits into a pull request.
|
|
@@ -129,13 +131,16 @@ export class Branch extends Ref {
|
|
|
129
131
|
if (prBranch === undefined) {
|
|
130
132
|
prBranch = isBranch
|
|
131
133
|
? options.pullRequestBranch
|
|
134
|
+
// @ts-ignore
|
|
132
135
|
: await this.createBranch(options.pullRequestBranch);
|
|
133
136
|
}
|
|
134
137
|
await prBranch.commit(commit.message, commit.entries);
|
|
135
138
|
c2m(commit);
|
|
136
139
|
};
|
|
137
140
|
|
|
141
|
+
// @ts-ignore
|
|
138
142
|
if (commits.next) {
|
|
143
|
+
// @ts-ignore
|
|
139
144
|
for await (const commit of commits) {
|
|
140
145
|
await exec(commit);
|
|
141
146
|
}
|
|
@@ -148,7 +153,9 @@ export class Branch extends Ref {
|
|
|
148
153
|
options.body = options.body ? options.body + '\n' + body : body;
|
|
149
154
|
}
|
|
150
155
|
|
|
156
|
+
// @ts-ignore
|
|
151
157
|
if (options.body?.length > 0 && !options.skipWithoutCommits) {
|
|
158
|
+
// @ts-ignore
|
|
152
159
|
return prBranch.createPullRequest(this, options);
|
|
153
160
|
} else {
|
|
154
161
|
return new PullRequest(
|
|
@@ -160,6 +167,7 @@ export class Branch extends Ref {
|
|
|
160
167
|
}
|
|
161
168
|
} catch (e) {
|
|
162
169
|
if (!isBranch && prBranch) {
|
|
170
|
+
// @ts-ignore
|
|
163
171
|
await prBranch.delete();
|
|
164
172
|
}
|
|
165
173
|
throw e;
|
|
@@ -179,6 +187,7 @@ export class Branch extends Ref {
|
|
|
179
187
|
* @return {Promise<PullRequest>}
|
|
180
188
|
*/
|
|
181
189
|
async createPullRequest(toBranch, options) {
|
|
190
|
+
// @ts-ignore
|
|
182
191
|
return this.pullRequestClass.open(this, toBranch, options);
|
|
183
192
|
}
|
|
184
193
|
|
|
@@ -104,6 +104,7 @@ export class MultiGroupProvider extends BaseProvider {
|
|
|
104
104
|
* @return {RepositoryGroup}
|
|
105
105
|
*/
|
|
106
106
|
addRepositoryGroup(name, options) {
|
|
107
|
+
// @ts-ignore
|
|
107
108
|
return this.#repositoryGroups.get(this.normalizeGroupName(name, true)) || new this.repositoryGroupClass(this, name, options);
|
|
108
109
|
}
|
|
109
110
|
|
package/src/named-object.mjs
CHANGED
|
@@ -6,6 +6,12 @@ import {
|
|
|
6
6
|
id_attribute
|
|
7
7
|
} from "./attributes.mjs";
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {import('./hook.mjs').Hook} Hook
|
|
11
|
+
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
|
|
9
15
|
/**
|
|
10
16
|
* Object with a name.
|
|
11
17
|
* @param {string} name
|
|
@@ -73,6 +79,7 @@ export class NamedObject extends BaseObject {
|
|
|
73
79
|
return (
|
|
74
80
|
super.equals(other) &&
|
|
75
81
|
this.fullName === other.fullName &&
|
|
82
|
+
// @ts-ignore
|
|
76
83
|
this.provider.equals(other.provider)
|
|
77
84
|
);
|
|
78
85
|
}
|
package/src/owned-object.mjs
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ContentEntry } from "content-entry";
|
|
2
2
|
import { NamedObject } from "./named-object.mjs";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
6
|
+
* @typedef {import('./repository.mjs').Repository} Repository
|
|
7
|
+
* @typedef {import('./hook.mjs').Hook} Hook
|
|
8
|
+
* @typedef {import('./tag.mjs').Tag} Tag
|
|
9
|
+
* @typedef {import('./branch.mjs').Branch} Branch
|
|
10
|
+
* @typedef {import('./pull-request.mjs').PullRequest} PullRequest
|
|
11
|
+
*/
|
|
12
|
+
|
|
4
13
|
/**
|
|
5
14
|
* Named Object registering itself in the owner.
|
|
6
15
|
*/
|
|
@@ -28,6 +37,7 @@ export class OwnedObject extends NamedObject {
|
|
|
28
37
|
constructor(owner, name, options, additionalProperties) {
|
|
29
38
|
super(name, options, additionalProperties);
|
|
30
39
|
this.owner = owner;
|
|
40
|
+
// @ts-ignore
|
|
31
41
|
owner[this.constructor.addMethodName](this);
|
|
32
42
|
}
|
|
33
43
|
|
|
@@ -35,6 +45,7 @@ export class OwnedObject extends NamedObject {
|
|
|
35
45
|
* Removes the receiver from the owner.
|
|
36
46
|
*/
|
|
37
47
|
delete() {
|
|
48
|
+
// @ts-ignore
|
|
38
49
|
this.owner[this.constructor.deleteMethodName](this);
|
|
39
50
|
}
|
|
40
51
|
|
|
@@ -59,7 +70,7 @@ export class OwnedObject extends NamedObject {
|
|
|
59
70
|
/**
|
|
60
71
|
* Url of issue tracking system.
|
|
61
72
|
* @see {@link Repository#issuesURL}
|
|
62
|
-
* @return {string} as provided from the repository
|
|
73
|
+
* @return {string|undefined} as provided from the repository
|
|
63
74
|
*/
|
|
64
75
|
get issuesURL() {
|
|
65
76
|
return this.owner.issuesURL;
|
package/src/pull-request.mjs
CHANGED
|
@@ -141,6 +141,7 @@ export class PullRequest extends OwnedObject {
|
|
|
141
141
|
state: {
|
|
142
142
|
set(value) {
|
|
143
143
|
value = value.toUpperCase();
|
|
144
|
+
// @ts-ignore
|
|
144
145
|
if (this.constructor.attributes.state.values.has(value)) {
|
|
145
146
|
state = value;
|
|
146
147
|
} else throw new Error(`Invalid Pull Request state ${value}`);
|
|
@@ -214,7 +215,9 @@ export class PullRequest extends OwnedObject {
|
|
|
214
215
|
*/
|
|
215
216
|
async merge(method = "MERGE") {
|
|
216
217
|
method = method.toUpperCase();
|
|
218
|
+
// @ts-ignore
|
|
217
219
|
if (this.constructor.validMergeMethods.has(method)) {
|
|
220
|
+
// @ts-ignore
|
|
218
221
|
await this._merge(method);
|
|
219
222
|
this.merged = true;
|
|
220
223
|
} else {
|
|
@@ -234,9 +237,11 @@ export class PullRequest extends OwnedObject {
|
|
|
234
237
|
|
|
235
238
|
toString() {
|
|
236
239
|
return [
|
|
240
|
+
// @ts-ignore
|
|
237
241
|
[this.name, this.title],
|
|
238
242
|
["source", this.source?.identifier],
|
|
239
243
|
["destination", this.owner.identifier],
|
|
244
|
+
// @ts-ignore
|
|
240
245
|
...Object.entries(this.constructor.attributes)
|
|
241
246
|
.filter(
|
|
242
247
|
([k, v]) =>
|
package/src/ref.mjs
CHANGED
|
@@ -2,6 +2,12 @@ import { ContentEntry } from "content-entry";
|
|
|
2
2
|
import { OwnedObject } from "./owned-object.mjs";
|
|
3
3
|
import { name_attribute, boolean_attribute } from "./attributes.mjs";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* @typedef {import('./repository.mjs').Repository} Repository
|
|
7
|
+
* @typedef {import('./tag.mjs').Tag} Tag
|
|
8
|
+
* @typedef {import('./branch.mjs').Branch} Branch
|
|
9
|
+
*/
|
|
10
|
+
|
|
5
11
|
/**
|
|
6
12
|
* Base for Branch and Tag
|
|
7
13
|
*/
|
package/src/repository-owner.mjs
CHANGED
|
@@ -195,6 +195,7 @@ export function RepositoryOwner(base) {
|
|
|
195
195
|
* @return {Promise<Branch|undefined>}
|
|
196
196
|
*/
|
|
197
197
|
async branch(name) {
|
|
198
|
+
// @ts-ignore
|
|
198
199
|
return this.lookup(
|
|
199
200
|
"branch",
|
|
200
201
|
name,
|
|
@@ -209,6 +210,7 @@ export function RepositoryOwner(base) {
|
|
|
209
210
|
* @return {AsyncIterable<Branch>} all matching branches of the owner
|
|
210
211
|
*/
|
|
211
212
|
async *branches(patterns) {
|
|
213
|
+
// @ts-ignore
|
|
212
214
|
yield* this.list(
|
|
213
215
|
"branches",
|
|
214
216
|
patterns,
|
package/src/repository.mjs
CHANGED
|
@@ -98,6 +98,7 @@ export class Repository extends OwnedObject {
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
get url() {
|
|
101
|
+
// @ts-ignore
|
|
101
102
|
return `${this.provider.url}${this.slug}`;
|
|
102
103
|
}
|
|
103
104
|
|
|
@@ -270,6 +271,7 @@ export class Repository extends OwnedObject {
|
|
|
270
271
|
return branch;
|
|
271
272
|
}
|
|
272
273
|
|
|
274
|
+
// @ts-ignore
|
|
273
275
|
return new this.branchClass(this, name, options);
|
|
274
276
|
}
|
|
275
277
|
|
|
@@ -316,6 +318,7 @@ export class Repository extends OwnedObject {
|
|
|
316
318
|
* @return {Tag} newly created tag
|
|
317
319
|
*/
|
|
318
320
|
addTag(name, options) {
|
|
321
|
+
// @ts-ignore
|
|
319
322
|
return this.#tags.get(name) || new this.tagClass(this, name, options);
|
|
320
323
|
}
|
|
321
324
|
|
|
@@ -345,6 +348,7 @@ export class Repository extends OwnedObject {
|
|
|
345
348
|
addPullRequest(name, source, options) {
|
|
346
349
|
let pr = this.#pullRequests.get(name);
|
|
347
350
|
if (pr === undefined) {
|
|
351
|
+
// @ts-ignore
|
|
348
352
|
pr = new this.pullRequestClass(name, source, this, options);
|
|
349
353
|
this.#pullRequests.set(pr.name, pr);
|
|
350
354
|
}
|
|
@@ -395,6 +399,7 @@ export class Repository extends OwnedObject {
|
|
|
395
399
|
addHook(name, options) {
|
|
396
400
|
return (
|
|
397
401
|
this.#hooks.find(hook => hook.name == name) ||
|
|
402
|
+
// @ts-ignore
|
|
398
403
|
new this.hookClass(this, name, options)
|
|
399
404
|
);
|
|
400
405
|
}
|
|
@@ -429,6 +434,7 @@ export class Repository extends OwnedObject {
|
|
|
429
434
|
*/
|
|
430
435
|
async hook(id) {
|
|
431
436
|
for await (const hook of this.hooks()) {
|
|
437
|
+
// @ts-ignore
|
|
432
438
|
if (hook.id == id) {
|
|
433
439
|
// string of number
|
|
434
440
|
return hook;
|
|
@@ -488,7 +494,9 @@ export class Repository extends OwnedObject {
|
|
|
488
494
|
* @param {string} ref
|
|
489
495
|
* @return {Promise<string|undefined>} sha of the ref
|
|
490
496
|
*/
|
|
491
|
-
async refId(ref) {
|
|
497
|
+
async refId(ref) {
|
|
498
|
+
return undefined;
|
|
499
|
+
}
|
|
492
500
|
|
|
493
501
|
initialize() {}
|
|
494
502
|
|
|
@@ -505,7 +513,8 @@ export class Repository extends OwnedObject {
|
|
|
505
513
|
}
|
|
506
514
|
|
|
507
515
|
async initializePullRequests() {
|
|
508
|
-
|
|
516
|
+
// @ts-ignore
|
|
517
|
+
for await (const pr of this.pullRequestClass.list(this)) {
|
|
509
518
|
this.#pullRequests.set(pr.name, pr);
|
|
510
519
|
}
|
|
511
520
|
}
|
|
@@ -29,6 +29,7 @@ export class SingleGroupProvider extends RepositoryOwner(BaseProvider) {
|
|
|
29
29
|
const { base } = this.parseName(name);
|
|
30
30
|
|
|
31
31
|
if (name && this.supportsBase(base)) {
|
|
32
|
+
// @ts-ignore
|
|
32
33
|
return this;
|
|
33
34
|
}
|
|
34
35
|
}
|
|
@@ -46,6 +47,7 @@ export class SingleGroupProvider extends RepositoryOwner(BaseProvider) {
|
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
if (found) {
|
|
50
|
+
// @ts-ignore
|
|
49
51
|
yield this;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./project.mjs').Project} Project
|
|
3
|
+
* @typedef {import('./milestone.mjs').Milestone} Milestone
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* @typedef {Object} MessageDestination
|
|
3
7
|
* Endpoint to deliver log messages to.
|
|
@@ -101,7 +105,7 @@ export class BaseProvider extends BaseObject {
|
|
|
101
105
|
}, env: any): BaseProvider | undefined;
|
|
102
106
|
get priority(): number;
|
|
103
107
|
/**
|
|
104
|
-
* @param {
|
|
108
|
+
* @param {any} other
|
|
105
109
|
* @return {boolean} true if other provider is the same as the receiver
|
|
106
110
|
*/
|
|
107
111
|
equals(other: any): boolean;
|
|
@@ -261,12 +265,14 @@ export class BaseProvider extends BaseObject {
|
|
|
261
265
|
/**
|
|
262
266
|
* @return {typeof ContentEntry} entry class used by the Provider
|
|
263
267
|
*/
|
|
264
|
-
get entryClass():
|
|
268
|
+
get entryClass(): typeof ContentEntry;
|
|
265
269
|
/**
|
|
266
270
|
* @return {typeof PullRequest} pull request class used by the Provider
|
|
267
271
|
*/
|
|
268
272
|
get pullRequestClass(): typeof PullRequest;
|
|
269
273
|
}
|
|
274
|
+
export type Project = import('./project.mjs').Project;
|
|
275
|
+
export type Milestone = import('./milestone.mjs').Milestone;
|
|
270
276
|
/**
|
|
271
277
|
* Endpoint to deliver log messages to.
|
|
272
278
|
*/
|
|
@@ -279,10 +285,9 @@ export type MessageDestination = {
|
|
|
279
285
|
};
|
|
280
286
|
import { BaseObject } from "./base-object.mjs";
|
|
281
287
|
import { Repository } from "./repository.mjs";
|
|
282
|
-
import { Project } from "./project.mjs";
|
|
283
|
-
import { Milestone } from "./milestone.mjs";
|
|
284
288
|
import { Branch } from "./branch.mjs";
|
|
285
289
|
import { Tag } from "./tag.mjs";
|
|
286
290
|
import { Hook } from "./hook.mjs";
|
|
287
291
|
import { PullRequest } from "./pull-request.mjs";
|
|
288
292
|
import { RepositoryGroup } from "./repository-group.mjs";
|
|
293
|
+
import { ContentEntry } from "content-entry";
|
package/types/branch.d.mts
CHANGED
|
@@ -23,9 +23,9 @@ export class Branch extends Ref {
|
|
|
23
23
|
* @param {string} message commit message
|
|
24
24
|
* @param {ContentEntry[]} updates content to be commited
|
|
25
25
|
* @param {Object} options
|
|
26
|
-
* @return {Promise<CommitResult>}
|
|
26
|
+
* @return {Promise<CommitResult|undefined>}
|
|
27
27
|
*/
|
|
28
|
-
commit(message: string, updates: ContentEntry[], options: any): Promise<CommitResult>;
|
|
28
|
+
commit(message: string, updates: ContentEntry[], options: any): Promise<CommitResult | undefined>;
|
|
29
29
|
/**
|
|
30
30
|
* Add commits into a pull request.
|
|
31
31
|
*
|
|
@@ -57,7 +57,7 @@ export class Branch extends Ref {
|
|
|
57
57
|
* @return {Promise<PullRequest>}
|
|
58
58
|
*/
|
|
59
59
|
createPullRequest(toBranch: Branch, options?: any): Promise<PullRequest>;
|
|
60
|
-
_addPullRequest(pullRequest: any): Promise<
|
|
60
|
+
_addPullRequest(pullRequest: any): Promise<void>;
|
|
61
61
|
deletePullRequest(name: any): Promise<any>;
|
|
62
62
|
/**
|
|
63
63
|
* Create a new {@link Branch} by cloning a given source branch.
|
package/types/named-object.d.mts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./hook.mjs').Hook} Hook
|
|
3
|
+
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
4
|
+
*/
|
|
1
5
|
/**
|
|
2
6
|
* Object with a name.
|
|
3
7
|
* @param {string} name
|
|
@@ -68,4 +72,6 @@ export class NamedObject extends BaseObject {
|
|
|
68
72
|
toJSON(): any;
|
|
69
73
|
#private;
|
|
70
74
|
}
|
|
75
|
+
export type Hook = import('./hook.mjs').Hook;
|
|
76
|
+
export type BaseProvider = import('./base-provider.mjs').BaseProvider;
|
|
71
77
|
import { BaseObject } from "./base-object.mjs";
|
package/types/owned-object.d.mts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
3
|
+
* @typedef {import('./repository.mjs').Repository} Repository
|
|
4
|
+
* @typedef {import('./hook.mjs').Hook} Hook
|
|
5
|
+
* @typedef {import('./tag.mjs').Tag} Tag
|
|
6
|
+
* @typedef {import('./branch.mjs').Branch} Branch
|
|
7
|
+
* @typedef {import('./pull-request.mjs').PullRequest} PullRequest
|
|
8
|
+
*/
|
|
1
9
|
/**
|
|
2
10
|
* Named Object registering itself in the owner.
|
|
3
11
|
*/
|
|
@@ -35,7 +43,7 @@ export class OwnedObject extends NamedObject {
|
|
|
35
43
|
/**
|
|
36
44
|
* Url of issue tracking system.
|
|
37
45
|
* @see {@link Repository#issuesURL}
|
|
38
|
-
* @return {string} as provided from the repository
|
|
46
|
+
* @return {string|undefined} as provided from the repository
|
|
39
47
|
*/
|
|
40
48
|
get issuesURL(): string;
|
|
41
49
|
/**
|
|
@@ -72,7 +80,7 @@ export class OwnedObject extends NamedObject {
|
|
|
72
80
|
* The provider we live in.
|
|
73
81
|
* @return {BaseProvider}
|
|
74
82
|
*/
|
|
75
|
-
get provider(): BaseProvider;
|
|
83
|
+
get provider(): import("./base-provider.mjs").BaseProvider;
|
|
76
84
|
/**
|
|
77
85
|
* Forwarded to the owner.
|
|
78
86
|
* @param {...any} args
|
|
@@ -102,22 +110,22 @@ export class OwnedObject extends NamedObject {
|
|
|
102
110
|
* By default we use the owners implementation.
|
|
103
111
|
* @return {Repository} as defined in the owner
|
|
104
112
|
*/
|
|
105
|
-
get repositoryClass(): Repository;
|
|
113
|
+
get repositoryClass(): import("./repository.mjs").Repository;
|
|
106
114
|
/**
|
|
107
115
|
* By default we use the owners implementation.
|
|
108
116
|
* @return {PullRequest} as defined in the owner
|
|
109
117
|
*/
|
|
110
|
-
get pullRequestClass(): PullRequest;
|
|
118
|
+
get pullRequestClass(): import("./pull-request.mjs").PullRequest;
|
|
111
119
|
/**
|
|
112
120
|
* By default we use the owners implementation.
|
|
113
121
|
* @return {Branch} as defined in the owner
|
|
114
122
|
*/
|
|
115
|
-
get branchClass(): Branch;
|
|
123
|
+
get branchClass(): import("./branch.mjs").Branch;
|
|
116
124
|
/**
|
|
117
125
|
* By default we use the owners implementation.
|
|
118
126
|
* @return {Tag} as defined in the owner
|
|
119
127
|
*/
|
|
120
|
-
get tagClass(): Tag;
|
|
128
|
+
get tagClass(): import("./tag.mjs").Tag;
|
|
121
129
|
/**
|
|
122
130
|
* By default we use the owners implementation.
|
|
123
131
|
* @return {ContentEntry} as defined in the owner
|
|
@@ -127,7 +135,13 @@ export class OwnedObject extends NamedObject {
|
|
|
127
135
|
* By default we use the owners implementation.
|
|
128
136
|
* @return {Hook} as defined in the owner
|
|
129
137
|
*/
|
|
130
|
-
get hookClass(): Hook;
|
|
138
|
+
get hookClass(): import("./hook.mjs").Hook;
|
|
131
139
|
}
|
|
140
|
+
export type BaseProvider = import('./base-provider.mjs').BaseProvider;
|
|
141
|
+
export type Repository = import('./repository.mjs').Repository;
|
|
142
|
+
export type Hook = import('./hook.mjs').Hook;
|
|
143
|
+
export type Tag = import('./tag.mjs').Tag;
|
|
144
|
+
export type Branch = import('./branch.mjs').Branch;
|
|
145
|
+
export type PullRequest = import('./pull-request.mjs').PullRequest;
|
|
132
146
|
import { NamedObject } from "./named-object.mjs";
|
|
133
147
|
import { ContentEntry } from "content-entry";
|
package/types/ref.d.mts
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {import('./repository.mjs').Repository} Repository
|
|
3
|
+
* @typedef {import('./tag.mjs').Tag} Tag
|
|
4
|
+
* @typedef {import('./branch.mjs').Branch} Branch
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* Base for Branch and Tag
|
|
3
8
|
*/
|
|
@@ -68,7 +73,7 @@ export class Ref extends OwnedObject {
|
|
|
68
73
|
* @see {@link Repository#owner}
|
|
69
74
|
* @return {Repository}
|
|
70
75
|
*/
|
|
71
|
-
get repository(): Repository;
|
|
76
|
+
get repository(): import("./repository.mjs").Repository;
|
|
72
77
|
get identifier(): any;
|
|
73
78
|
/**
|
|
74
79
|
*
|
|
@@ -86,5 +91,8 @@ export class Ref extends OwnedObject {
|
|
|
86
91
|
*/
|
|
87
92
|
[Symbol.asyncIterator](): AsyncGenerator<ContentEntry>;
|
|
88
93
|
}
|
|
94
|
+
export type Repository = import('./repository.mjs').Repository;
|
|
95
|
+
export type Tag = import('./tag.mjs').Tag;
|
|
96
|
+
export type Branch = import('./branch.mjs').Branch;
|
|
89
97
|
import { OwnedObject } from "./owned-object.mjs";
|
|
90
98
|
import { ContentEntry } from "content-entry";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const RepositoryGroup_base: {
|
|
2
2
|
new (): {
|
|
3
3
|
[x: string]: any;
|
|
4
|
-
"__#
|
|
4
|
+
"__#1@#repositories": Map<any, any>;
|
|
5
5
|
normalizeRepositoryName(name: string, forLookup: boolean): string;
|
|
6
6
|
repository(name?: string): Promise<import("./repository.mjs").Repository>;
|
|
7
7
|
repositories(patterns?: string | string[]): AsyncIterable<import("./repository.mjs").Repository>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const SingleGroupProvider_base: {
|
|
2
2
|
new (): {
|
|
3
3
|
[x: string]: any;
|
|
4
|
-
"__#
|
|
4
|
+
"__#1@#repositories": Map<any, any>;
|
|
5
5
|
normalizeRepositoryName(name: string, forLookup: boolean): string;
|
|
6
6
|
repository(name?: string): Promise<Repository>;
|
|
7
7
|
repositories(patterns?: string | string[]): AsyncIterable<Repository>;
|