repository-provider 32.6.10 → 32.6.12
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 +104 -213
- package/package.json +6 -6
- package/src/attribute-extras.mjs +0 -14
- package/src/attribute.mjs +14 -0
- package/src/attributes.mjs +52 -25
- package/src/hook.mjs +3 -2
- package/src/repository.mjs +4 -3
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ console.log(await readme.getString());
|
|
|
46
46
|
### Table of Contents
|
|
47
47
|
|
|
48
48
|
* [Application](#application)
|
|
49
|
-
* [
|
|
49
|
+
* [AttributeDefinition](#attributedefinition)
|
|
50
50
|
* [Properties](#properties)
|
|
51
51
|
* [definePropertiesFromOptions](#definepropertiesfromoptions)
|
|
52
52
|
* [Parameters](#parameters)
|
|
@@ -71,7 +71,6 @@ console.log(await readme.getString());
|
|
|
71
71
|
* [priority\_attribute](#priority_attribute)
|
|
72
72
|
* [BaseObject](#baseobject)
|
|
73
73
|
* [Parameters](#parameters-8)
|
|
74
|
-
* [Properties](#properties-1)
|
|
75
74
|
* [updateAttributes](#updateattributes)
|
|
76
75
|
* [Parameters](#parameters-9)
|
|
77
76
|
* [update](#update)
|
|
@@ -87,58 +86,41 @@ console.log(await readme.getString());
|
|
|
87
86
|
* [attributes](#attributes)
|
|
88
87
|
* [writableAttributes](#writableattributes)
|
|
89
88
|
* [attributeMapping](#attributemapping)
|
|
90
|
-
* [BaseObject](#baseobject-1)
|
|
91
|
-
* [Parameters](#parameters-11)
|
|
92
|
-
* [updateAttributes](#updateattributes-1)
|
|
93
|
-
* [Parameters](#parameters-12)
|
|
94
|
-
* [update](#update-1)
|
|
95
|
-
* [toString](#tostring-1)
|
|
96
|
-
* [displayName](#displayname-1)
|
|
97
|
-
* [fullName](#fullname-1)
|
|
98
|
-
* [fullCondensedName](#fullcondensedname-1)
|
|
99
|
-
* [isWritable](#iswritable-1)
|
|
100
|
-
* [equals](#equals-1)
|
|
101
|
-
* [Parameters](#parameters-13)
|
|
102
|
-
* [type](#type-1)
|
|
103
|
-
* [collectionName](#collectionname-1)
|
|
104
|
-
* [attributes](#attributes-1)
|
|
105
|
-
* [writableAttributes](#writableattributes-1)
|
|
106
|
-
* [attributeMapping](#attributemapping-1)
|
|
107
89
|
* [MessageDestination](#messagedestination)
|
|
108
|
-
* [Properties](#properties-
|
|
90
|
+
* [Properties](#properties-1)
|
|
109
91
|
* [BaseProvider](#baseprovider)
|
|
110
|
-
* [Properties](#properties-
|
|
111
|
-
* [equals](#equals-
|
|
112
|
-
* [Parameters](#parameters-
|
|
92
|
+
* [Properties](#properties-2)
|
|
93
|
+
* [equals](#equals-1)
|
|
94
|
+
* [Parameters](#parameters-11)
|
|
113
95
|
* [repositoryBases](#repositorybases)
|
|
114
96
|
* [supportsBase](#supportsbase)
|
|
115
|
-
* [Parameters](#parameters-
|
|
97
|
+
* [Parameters](#parameters-12)
|
|
116
98
|
* [normalizeRepositoryName](#normalizerepositoryname)
|
|
117
|
-
* [Parameters](#parameters-
|
|
99
|
+
* [Parameters](#parameters-13)
|
|
118
100
|
* [normalizeGroupName](#normalizegroupname)
|
|
119
|
-
* [Parameters](#parameters-
|
|
101
|
+
* [Parameters](#parameters-14)
|
|
120
102
|
* [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
|
|
121
103
|
* [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
|
|
122
104
|
* [parseName](#parsename)
|
|
123
|
-
* [Parameters](#parameters-
|
|
105
|
+
* [Parameters](#parameters-15)
|
|
124
106
|
* [createRepository](#createrepository)
|
|
125
|
-
* [Parameters](#parameters-
|
|
107
|
+
* [Parameters](#parameters-16)
|
|
126
108
|
* [list](#list)
|
|
127
|
-
* [Parameters](#parameters-
|
|
109
|
+
* [Parameters](#parameters-17)
|
|
128
110
|
* [projects](#projects)
|
|
129
|
-
* [Parameters](#parameters-
|
|
111
|
+
* [Parameters](#parameters-18)
|
|
130
112
|
* [milestones](#milestones)
|
|
131
|
-
* [Parameters](#parameters-
|
|
113
|
+
* [Parameters](#parameters-19)
|
|
132
114
|
* [repositories](#repositories)
|
|
133
|
-
* [Parameters](#parameters-
|
|
115
|
+
* [Parameters](#parameters-20)
|
|
134
116
|
* [branches](#branches)
|
|
135
|
-
* [Parameters](#parameters-
|
|
117
|
+
* [Parameters](#parameters-21)
|
|
136
118
|
* [tags](#tags)
|
|
137
|
-
* [Parameters](#parameters-
|
|
119
|
+
* [Parameters](#parameters-22)
|
|
138
120
|
* [hooks](#hooks)
|
|
139
|
-
* [Parameters](#parameters-
|
|
121
|
+
* [Parameters](#parameters-23)
|
|
140
122
|
* [pullRequests](#pullrequests)
|
|
141
|
-
* [Parameters](#parameters-
|
|
123
|
+
* [Parameters](#parameters-24)
|
|
142
124
|
* [name](#name)
|
|
143
125
|
* [provider](#provider)
|
|
144
126
|
* [toJSON](#tojson)
|
|
@@ -151,78 +133,78 @@ console.log(await readme.getString());
|
|
|
151
133
|
* [pullRequestClass](#pullrequestclass)
|
|
152
134
|
* [instanceIdentifier](#instanceidentifier)
|
|
153
135
|
* [optionsFromEnvironment](#optionsfromenvironment)
|
|
154
|
-
* [Parameters](#parameters-
|
|
136
|
+
* [Parameters](#parameters-25)
|
|
155
137
|
* [areOptionsSufficcient](#areoptionssufficcient)
|
|
156
|
-
* [Parameters](#parameters-
|
|
138
|
+
* [Parameters](#parameters-26)
|
|
157
139
|
* [initialize](#initialize)
|
|
158
|
-
* [Parameters](#parameters-
|
|
140
|
+
* [Parameters](#parameters-27)
|
|
159
141
|
* [name](#name-1)
|
|
160
142
|
* [messageDestination](#messagedestination-1)
|
|
161
143
|
* [Branch](#branch)
|
|
162
|
-
* [Parameters](#parameters-
|
|
163
|
-
* [Properties](#properties-
|
|
144
|
+
* [Parameters](#parameters-28)
|
|
145
|
+
* [Properties](#properties-3)
|
|
164
146
|
* [url](#url)
|
|
165
147
|
* [refType](#reftype)
|
|
166
|
-
* [isWritable](#iswritable-
|
|
148
|
+
* [isWritable](#iswritable-1)
|
|
167
149
|
* [isDefault](#isdefault)
|
|
168
150
|
* [delete](#delete)
|
|
169
151
|
* [commit](#commit)
|
|
170
|
-
* [Parameters](#parameters-
|
|
152
|
+
* [Parameters](#parameters-29)
|
|
171
153
|
* [commitIntoPullRequest](#commitintopullrequest)
|
|
172
|
-
* [Parameters](#parameters-
|
|
154
|
+
* [Parameters](#parameters-30)
|
|
173
155
|
* [removeEntries](#removeentries)
|
|
174
|
-
* [Parameters](#parameters-
|
|
156
|
+
* [Parameters](#parameters-31)
|
|
175
157
|
* [createPullRequest](#createpullrequest)
|
|
176
|
-
* [Parameters](#parameters-
|
|
158
|
+
* [Parameters](#parameters-32)
|
|
177
159
|
* [createBranch](#createbranch)
|
|
178
|
-
* [Parameters](#parameters-
|
|
160
|
+
* [Parameters](#parameters-33)
|
|
179
161
|
* [CommitResult](#commitresult)
|
|
180
|
-
* [Properties](#properties-
|
|
162
|
+
* [Properties](#properties-4)
|
|
181
163
|
* [Commit](#commit-1)
|
|
182
|
-
* [Parameters](#parameters-
|
|
183
|
-
* [Properties](#properties-
|
|
164
|
+
* [Parameters](#parameters-34)
|
|
165
|
+
* [Properties](#properties-5)
|
|
184
166
|
* [Hook](#hook)
|
|
185
167
|
* [Issue](#issue)
|
|
186
168
|
* [Milestone](#milestone)
|
|
187
169
|
* [MultiGroupProvider](#multigroupprovider)
|
|
188
170
|
* [repository](#repository)
|
|
189
|
-
* [Parameters](#parameters-
|
|
171
|
+
* [Parameters](#parameters-35)
|
|
190
172
|
* [branch](#branch-1)
|
|
191
|
-
* [Parameters](#parameters-
|
|
173
|
+
* [Parameters](#parameters-36)
|
|
192
174
|
* [repositoryGroup](#repositorygroup)
|
|
193
|
-
* [Parameters](#parameters-
|
|
175
|
+
* [Parameters](#parameters-37)
|
|
194
176
|
* [repositoryGroups](#repositorygroups)
|
|
195
|
-
* [Parameters](#parameters-
|
|
177
|
+
* [Parameters](#parameters-38)
|
|
196
178
|
* [createRepositoryGroup](#createrepositorygroup)
|
|
197
|
-
* [Parameters](#parameters-
|
|
179
|
+
* [Parameters](#parameters-39)
|
|
198
180
|
* [addRepositoryGroup](#addrepositorygroup)
|
|
199
|
-
* [Parameters](#parameters-
|
|
181
|
+
* [Parameters](#parameters-40)
|
|
200
182
|
* [NamedObject](#namedobject)
|
|
201
|
-
* [Parameters](#parameters-
|
|
202
|
-
* [Properties](#properties-
|
|
203
|
-
* [equals](#equals-
|
|
204
|
-
* [Parameters](#parameters-
|
|
183
|
+
* [Parameters](#parameters-41)
|
|
184
|
+
* [Properties](#properties-6)
|
|
185
|
+
* [equals](#equals-2)
|
|
186
|
+
* [Parameters](#parameters-42)
|
|
205
187
|
* [toJSON](#tojson-1)
|
|
206
188
|
* [OwnedObject](#ownedobject)
|
|
207
|
-
* [Parameters](#parameters-
|
|
189
|
+
* [Parameters](#parameters-43)
|
|
208
190
|
* [delete](#delete-1)
|
|
209
|
-
* [equals](#equals-
|
|
210
|
-
* [Parameters](#parameters-
|
|
191
|
+
* [equals](#equals-3)
|
|
192
|
+
* [Parameters](#parameters-44)
|
|
211
193
|
* [api](#api)
|
|
212
194
|
* [url](#url-1)
|
|
213
195
|
* [provider](#provider-1)
|
|
214
196
|
* [identifier](#identifier)
|
|
215
|
-
* [fullName](#fullname-
|
|
197
|
+
* [fullName](#fullname-1)
|
|
216
198
|
* [trace](#trace)
|
|
217
|
-
* [Parameters](#parameters-
|
|
199
|
+
* [Parameters](#parameters-45)
|
|
218
200
|
* [info](#info)
|
|
219
|
-
* [Parameters](#parameters-
|
|
201
|
+
* [Parameters](#parameters-46)
|
|
220
202
|
* [warn](#warn)
|
|
221
|
-
* [Parameters](#parameters-
|
|
203
|
+
* [Parameters](#parameters-47)
|
|
222
204
|
* [error](#error)
|
|
223
|
-
* [Parameters](#parameters-
|
|
205
|
+
* [Parameters](#parameters-48)
|
|
224
206
|
* [debug](#debug)
|
|
225
|
-
* [Parameters](#parameters-
|
|
207
|
+
* [Parameters](#parameters-49)
|
|
226
208
|
* [repositoryClass](#repositoryclass-1)
|
|
227
209
|
* [pullRequestClass](#pullrequestclass-1)
|
|
228
210
|
* [branchClass](#branchclass-1)
|
|
@@ -233,72 +215,72 @@ console.log(await readme.getString());
|
|
|
233
215
|
* [deleteMethodName](#deletemethodname)
|
|
234
216
|
* [Project](#project)
|
|
235
217
|
* [PullRequest](#pullrequest)
|
|
236
|
-
* [Parameters](#parameters-
|
|
237
|
-
* [Properties](#properties-
|
|
238
|
-
* [fullName](#fullname-
|
|
218
|
+
* [Parameters](#parameters-50)
|
|
219
|
+
* [Properties](#properties-7)
|
|
220
|
+
* [fullName](#fullname-2)
|
|
239
221
|
* [url](#url-2)
|
|
240
222
|
* [repository](#repository-1)
|
|
241
223
|
* [delete](#delete-2)
|
|
242
224
|
* [merge](#merge)
|
|
243
|
-
* [Parameters](#parameters-
|
|
225
|
+
* [Parameters](#parameters-51)
|
|
244
226
|
* [decline](#decline)
|
|
245
227
|
* [reviews](#reviews)
|
|
246
228
|
* [identifier](#identifier-1)
|
|
247
229
|
* [defaultListStates](#defaultliststates)
|
|
248
230
|
* [validMergeMethods](#validmergemethods)
|
|
249
231
|
* [list](#list-1)
|
|
250
|
-
* [Parameters](#parameters-
|
|
232
|
+
* [Parameters](#parameters-52)
|
|
251
233
|
* [open](#open)
|
|
252
|
-
* [Parameters](#parameters-
|
|
234
|
+
* [Parameters](#parameters-53)
|
|
253
235
|
* [state](#state)
|
|
254
236
|
* [locked](#locked)
|
|
255
237
|
* [merged](#merged)
|
|
256
238
|
* [draft](#draft)
|
|
257
239
|
* [ContentEntry](#contententry)
|
|
258
|
-
* [Properties](#properties-
|
|
240
|
+
* [Properties](#properties-8)
|
|
259
241
|
* [Ref](#ref)
|
|
260
242
|
* [ref](#ref-1)
|
|
261
243
|
* [refId](#refid)
|
|
262
244
|
* [entries](#entries)
|
|
263
|
-
* [Parameters](#parameters-
|
|
245
|
+
* [Parameters](#parameters-54)
|
|
264
246
|
* [asyncIterator](#asynciterator)
|
|
265
247
|
* [maybeEntry](#maybeentry)
|
|
266
|
-
* [Parameters](#parameters-
|
|
248
|
+
* [Parameters](#parameters-55)
|
|
267
249
|
* [entry](#entry)
|
|
268
|
-
* [Parameters](#parameters-
|
|
250
|
+
* [Parameters](#parameters-56)
|
|
269
251
|
* [repository](#repository-2)
|
|
270
|
-
* [fullName](#fullname-
|
|
271
|
-
* [fullCondensedName](#fullcondensedname-
|
|
272
|
-
* [toString](#tostring-
|
|
252
|
+
* [fullName](#fullname-3)
|
|
253
|
+
* [fullCondensedName](#fullcondensedname-1)
|
|
254
|
+
* [toString](#tostring-1)
|
|
273
255
|
* [issuesURL](#issuesurl)
|
|
274
256
|
* [homePageURL](#homepageurl)
|
|
275
257
|
* [isLocked](#islocked)
|
|
276
258
|
* [isArchived](#isarchived)
|
|
277
259
|
* [isDisabled](#isdisabled)
|
|
278
260
|
* [isProtected](#isprotected)
|
|
279
|
-
* [attributes](#attributes-
|
|
261
|
+
* [attributes](#attributes-1)
|
|
280
262
|
* [isProtected](#isprotected-1)
|
|
281
263
|
* [RepositoryGroup](#repositorygroup-1)
|
|
282
|
-
* [Parameters](#parameters-
|
|
283
|
-
* [Properties](#properties-
|
|
284
|
-
* [attributeMapping](#attributemapping-
|
|
285
|
-
* [type](#type-
|
|
264
|
+
* [Parameters](#parameters-57)
|
|
265
|
+
* [Properties](#properties-9)
|
|
266
|
+
* [attributeMapping](#attributemapping-1)
|
|
267
|
+
* [type](#type-1)
|
|
286
268
|
* [homePageURL](#homepageurl-1)
|
|
287
269
|
* [RepositoryOwner](#repositoryowner)
|
|
288
|
-
* [Parameters](#parameters-
|
|
270
|
+
* [Parameters](#parameters-58)
|
|
289
271
|
* [Repository](#repository-3)
|
|
290
|
-
* [Parameters](#parameters-
|
|
291
|
-
* [Properties](#properties-
|
|
292
|
-
* [fullName](#fullname-
|
|
272
|
+
* [Parameters](#parameters-59)
|
|
273
|
+
* [Properties](#properties-10)
|
|
274
|
+
* [fullName](#fullname-4)
|
|
293
275
|
* [slug](#slug)
|
|
294
276
|
* [entry](#entry-1)
|
|
295
|
-
* [Parameters](#parameters-
|
|
277
|
+
* [Parameters](#parameters-60)
|
|
296
278
|
* [entries](#entries-1)
|
|
297
|
-
* [Parameters](#parameters-
|
|
279
|
+
* [Parameters](#parameters-61)
|
|
298
280
|
* [maybeEntry](#maybeentry-1)
|
|
299
|
-
* [Parameters](#parameters-
|
|
281
|
+
* [Parameters](#parameters-62)
|
|
300
282
|
* [commits](#commits)
|
|
301
|
-
* [Parameters](#parameters-
|
|
283
|
+
* [Parameters](#parameters-63)
|
|
302
284
|
* [cloneURL](#cloneurl)
|
|
303
285
|
* [issuesURL](#issuesurl-1)
|
|
304
286
|
* [homePageURL](#homepageurl-2)
|
|
@@ -309,67 +291,67 @@ console.log(await readme.getString());
|
|
|
309
291
|
* [delete](#delete-3)
|
|
310
292
|
* [defaultBranch](#defaultbranch)
|
|
311
293
|
* [branch](#branch-2)
|
|
312
|
-
* [Parameters](#parameters-
|
|
294
|
+
* [Parameters](#parameters-64)
|
|
313
295
|
* [hasBranches](#hasbranches)
|
|
314
296
|
* [branches](#branches-1)
|
|
315
|
-
* [Parameters](#parameters-
|
|
297
|
+
* [Parameters](#parameters-65)
|
|
316
298
|
* [createBranch](#createbranch-1)
|
|
317
|
-
* [Parameters](#parameters-
|
|
299
|
+
* [Parameters](#parameters-66)
|
|
318
300
|
* [addBranch](#addbranch)
|
|
319
|
-
* [Parameters](#parameters-
|
|
301
|
+
* [Parameters](#parameters-67)
|
|
320
302
|
* [deleteBranch](#deletebranch)
|
|
321
|
-
* [Parameters](#parameters-
|
|
303
|
+
* [Parameters](#parameters-68)
|
|
322
304
|
* [tag](#tag)
|
|
323
|
-
* [Parameters](#parameters-
|
|
305
|
+
* [Parameters](#parameters-69)
|
|
324
306
|
* [tags](#tags-1)
|
|
325
|
-
* [Parameters](#parameters-
|
|
307
|
+
* [Parameters](#parameters-70)
|
|
326
308
|
* [addTag](#addtag)
|
|
327
|
-
* [Parameters](#parameters-
|
|
309
|
+
* [Parameters](#parameters-71)
|
|
328
310
|
* [createPullRequest](#createpullrequest-1)
|
|
329
|
-
* [Parameters](#parameters-
|
|
311
|
+
* [Parameters](#parameters-72)
|
|
330
312
|
* [addPullRequest](#addpullrequest)
|
|
331
|
-
* [Parameters](#parameters-
|
|
313
|
+
* [Parameters](#parameters-73)
|
|
332
314
|
* [pullRequests](#pullrequests-1)
|
|
333
315
|
* [pullRequest](#pullrequest-1)
|
|
334
|
-
* [Parameters](#parameters-
|
|
316
|
+
* [Parameters](#parameters-74)
|
|
335
317
|
* [deletePullRequest](#deletepullrequest)
|
|
336
|
-
* [Parameters](#parameters-
|
|
318
|
+
* [Parameters](#parameters-75)
|
|
337
319
|
* [addHook](#addhook)
|
|
338
|
-
* [Parameters](#parameters-
|
|
320
|
+
* [Parameters](#parameters-76)
|
|
339
321
|
* [createHook](#createhook)
|
|
340
|
-
* [Parameters](#parameters-
|
|
322
|
+
* [Parameters](#parameters-77)
|
|
341
323
|
* [hooks](#hooks-1)
|
|
342
324
|
* [hook](#hook-1)
|
|
343
|
-
* [Parameters](#parameters-
|
|
344
|
-
* [type](#type-
|
|
325
|
+
* [Parameters](#parameters-78)
|
|
326
|
+
* [type](#type-2)
|
|
345
327
|
* [refId](#refid-1)
|
|
346
|
-
* [Parameters](#parameters-
|
|
347
|
-
* [attributes](#attributes-
|
|
328
|
+
* [Parameters](#parameters-79)
|
|
329
|
+
* [attributes](#attributes-2)
|
|
348
330
|
* [defaultBranchName](#defaultbranchname)
|
|
349
331
|
* [Review](#review)
|
|
350
332
|
* [SingleGroupProvider](#singlegroupprovider)
|
|
351
333
|
* [repository](#repository-4)
|
|
352
|
-
* [Parameters](#parameters-
|
|
334
|
+
* [Parameters](#parameters-80)
|
|
353
335
|
* [repositoryGroup](#repositorygroup-2)
|
|
354
|
-
* [Parameters](#parameters-
|
|
336
|
+
* [Parameters](#parameters-81)
|
|
355
337
|
* [repositoryGroups](#repositorygroups-1)
|
|
356
|
-
* [Parameters](#parameters-
|
|
338
|
+
* [Parameters](#parameters-82)
|
|
357
339
|
* [Tag](#tag-1)
|
|
358
340
|
* [refType](#reftype-1)
|
|
359
341
|
* [asArray](#asarray)
|
|
360
|
-
* [Parameters](#parameters-
|
|
342
|
+
* [Parameters](#parameters-83)
|
|
361
343
|
* [stripBaseName](#stripbasename)
|
|
362
|
-
* [Parameters](#parameters-
|
|
344
|
+
* [Parameters](#parameters-84)
|
|
363
345
|
* [stripBaseNames](#stripbasenames)
|
|
364
|
-
* [Parameters](#parameters-
|
|
346
|
+
* [Parameters](#parameters-85)
|
|
365
347
|
* [generateBranchName](#generatebranchname)
|
|
366
|
-
* [Parameters](#parameters-
|
|
348
|
+
* [Parameters](#parameters-86)
|
|
367
349
|
|
|
368
350
|
## Application
|
|
369
351
|
|
|
370
352
|
**Extends OwnedObject**
|
|
371
353
|
|
|
372
|
-
##
|
|
354
|
+
## AttributeDefinition
|
|
373
355
|
|
|
374
356
|
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
375
357
|
|
|
@@ -379,6 +361,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
|
|
|
379
361
|
* `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
380
362
|
* `private` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** should the value be shown
|
|
381
363
|
* `depends` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of an attribute we depend on
|
|
364
|
+
* `additionalAttributes` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** extra attributes that are present in cas our attribute is set
|
|
382
365
|
* `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
383
366
|
* `default` **any?** the default value
|
|
384
367
|
* `set` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** set the value
|
|
@@ -524,98 +507,6 @@ this defines the order
|
|
|
524
507
|
|
|
525
508
|
### Parameters
|
|
526
509
|
|
|
527
|
-
* `options`  
|
|
528
|
-
* `additionalProperties`  
|
|
529
|
-
|
|
530
|
-
### Properties
|
|
531
|
-
|
|
532
|
-
* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
533
|
-
* `env` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
534
|
-
|
|
535
|
-
### updateAttributes
|
|
536
|
-
|
|
537
|
-
Takes values from options.
|
|
538
|
-
|
|
539
|
-
#### Parameters
|
|
540
|
-
|
|
541
|
-
* `options` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
542
|
-
* `additionalProperties`  
|
|
543
|
-
|
|
544
|
-
### update
|
|
545
|
-
|
|
546
|
-
Save object attributes in the backing store.
|
|
547
|
-
|
|
548
|
-
### toString
|
|
549
|
-
|
|
550
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** fullName
|
|
551
|
-
|
|
552
|
-
### displayName
|
|
553
|
-
|
|
554
|
-
Beautified name use for human displaying only.
|
|
555
|
-
|
|
556
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** human readable name
|
|
557
|
-
|
|
558
|
-
### fullName
|
|
559
|
-
|
|
560
|
-
Complete name in the hierachy.
|
|
561
|
-
|
|
562
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
563
|
-
|
|
564
|
-
### fullCondensedName
|
|
565
|
-
|
|
566
|
-
Complete name in the hierachy.
|
|
567
|
-
|
|
568
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
569
|
-
|
|
570
|
-
### isWritable
|
|
571
|
-
|
|
572
|
-
By default cannot be written to.
|
|
573
|
-
|
|
574
|
-
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false
|
|
575
|
-
|
|
576
|
-
### equals
|
|
577
|
-
|
|
578
|
-
Check for equality
|
|
579
|
-
|
|
580
|
-
#### Parameters
|
|
581
|
-
|
|
582
|
-
* `other` **[BaseObject](#baseobject)** 
|
|
583
|
-
|
|
584
|
-
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if other is present
|
|
585
|
-
|
|
586
|
-
### type
|
|
587
|
-
|
|
588
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** type we represent
|
|
589
|
-
|
|
590
|
-
### collectionName
|
|
591
|
-
|
|
592
|
-
Tag -> tags
|
|
593
|
-
Repository -> repositories
|
|
594
|
-
|
|
595
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name of the collection holding us in the owner
|
|
596
|
-
|
|
597
|
-
### attributes
|
|
598
|
-
|
|
599
|
-
Attributes definitions
|
|
600
|
-
|
|
601
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
602
|
-
|
|
603
|
-
### writableAttributes
|
|
604
|
-
|
|
605
|
-
User modifyable attributes.
|
|
606
|
-
|
|
607
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** writable attributes
|
|
608
|
-
|
|
609
|
-
### attributeMapping
|
|
610
|
-
|
|
611
|
-
Map attributes between external and internal representation.
|
|
612
|
-
|
|
613
|
-
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
614
|
-
|
|
615
|
-
## BaseObject
|
|
616
|
-
|
|
617
|
-
### Parameters
|
|
618
|
-
|
|
619
510
|
* `options` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
620
511
|
* `additionalProperties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
621
512
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.6.
|
|
3
|
+
"version": "32.6.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -27,22 +27,22 @@
|
|
|
27
27
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
28
28
|
"lint": "npm run lint:docs && npm run lint:tsc",
|
|
29
29
|
"lint:docs": "documentation lint ./src/**/*.mjs",
|
|
30
|
-
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext ./src/*.mjs"
|
|
30
|
+
"lint:tsc": "tsc --allowJs --checkJs --noEmit -t esnext -m esnext --moduleResolution nodenext ./src/*.mjs"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"matching-iterator": "^2.0.11"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ava": "^5.2.0",
|
|
37
|
-
"browser-ava": "^1.3.
|
|
37
|
+
"browser-ava": "^1.3.32",
|
|
38
38
|
"c8": "^7.13.0",
|
|
39
39
|
"documentation": "^14.0.1",
|
|
40
40
|
"repository-provider-test-support": "^2.3.1",
|
|
41
|
-
"semantic-release": "^
|
|
42
|
-
"typescript": "^5.0.
|
|
41
|
+
"semantic-release": "^21.0.0",
|
|
42
|
+
"typescript": "^5.0.3"
|
|
43
43
|
},
|
|
44
44
|
"engines": {
|
|
45
|
-
"node": ">=16.
|
|
45
|
+
"node": ">=16.20.0"
|
|
46
46
|
},
|
|
47
47
|
"repository": {
|
|
48
48
|
"type": "git",
|
package/src/attribute-extras.mjs
CHANGED
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import { setAttribute, getAttribute } from "./attribute.mjs";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @typedef {Object} AttributeDefinition
|
|
5
|
-
*
|
|
6
|
-
* @property {string} type
|
|
7
|
-
* @property {boolean} writable
|
|
8
|
-
* @property {boolean} [private] should the value be shown
|
|
9
|
-
* @property {string} [depends] name of an attribute we depend on
|
|
10
|
-
* @property {string} description
|
|
11
|
-
* @property {any} [default] the default value
|
|
12
|
-
* @property {Function} [set] set the value
|
|
13
|
-
* @property {Function} [get] get the value can be used to calculate default values
|
|
14
|
-
* @property {string|string[]} [env] environment variable use to provide the value
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
3
|
/**
|
|
18
4
|
* Create properties from options and default options.
|
|
19
5
|
* Already present properties (direct) are skipped.
|
package/src/attribute.mjs
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} AttributeDefinition
|
|
3
|
+
*
|
|
4
|
+
* @property {string} type
|
|
5
|
+
* @property {boolean} writable
|
|
6
|
+
* @property {boolean} [private] should the value be shown
|
|
7
|
+
* @property {string} [depends] name of an attribute we depend on
|
|
8
|
+
* @property {string[]} additionalAttributes extra attributes that are present in cas our attribute is set
|
|
9
|
+
* @property {string} description
|
|
10
|
+
* @property {any} [default] the default value
|
|
11
|
+
* @property {Function} [set] set the value
|
|
12
|
+
* @property {Function} [get] get the value can be used to calculate default values
|
|
13
|
+
* @property {string|string[]} [env] environment variable use to provide the value
|
|
14
|
+
*/
|
|
1
15
|
|
|
2
16
|
/**
|
|
3
17
|
* Split property path into tokens
|
package/src/attributes.mjs
CHANGED
|
@@ -1,62 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @type AttributeDefinition
|
|
3
|
+
*/
|
|
4
|
+
export const default_attribute = {
|
|
5
|
+
type: "string",
|
|
6
|
+
writeable: false,
|
|
7
|
+
mandatory: false,
|
|
8
|
+
private: false,
|
|
9
|
+
isKey: false,
|
|
10
|
+
additionalAttributes: []
|
|
11
|
+
};
|
|
12
|
+
|
|
1
13
|
export const boolean_attribute = {
|
|
2
|
-
|
|
14
|
+
...default_attribute,
|
|
15
|
+
writeable: true,
|
|
3
16
|
default: false,
|
|
4
|
-
|
|
5
|
-
writable: true
|
|
17
|
+
type: "boolean"
|
|
6
18
|
};
|
|
7
19
|
|
|
8
20
|
export const boolean_read_only_attribute = {
|
|
21
|
+
...default_attribute,
|
|
9
22
|
type: "boolean",
|
|
10
|
-
default: false
|
|
11
|
-
mandatory: false
|
|
23
|
+
default: false
|
|
12
24
|
};
|
|
13
25
|
|
|
14
|
-
export const uuid_attiribute = {
|
|
15
|
-
|
|
26
|
+
export const uuid_attiribute = {
|
|
27
|
+
...default_attribute,
|
|
28
|
+
isKey: true
|
|
29
|
+
};
|
|
30
|
+
export const empty_attiribute = { ...default_attribute, type: "boolean" };
|
|
16
31
|
export const secret_attribute = {
|
|
17
|
-
|
|
32
|
+
...default_attribute,
|
|
18
33
|
private: true,
|
|
19
34
|
writable: true
|
|
20
35
|
};
|
|
21
|
-
export const count_attribute = { type: "integer" };
|
|
22
|
-
export const size_attribute = { type: "integer"
|
|
36
|
+
export const count_attribute = { ...default_attribute, type: "integer" };
|
|
37
|
+
export const size_attribute = { ...default_attribute, type: "integer" };
|
|
23
38
|
export const name_attribute = {
|
|
24
|
-
|
|
39
|
+
...default_attribute,
|
|
25
40
|
isKey: true
|
|
26
41
|
};
|
|
27
42
|
|
|
28
|
-
export const url_attribute = {
|
|
43
|
+
export const url_attribute = {
|
|
44
|
+
...default_attribute,
|
|
45
|
+
description: "home of the object",
|
|
46
|
+
type: "url"
|
|
47
|
+
};
|
|
29
48
|
|
|
30
49
|
/**
|
|
31
50
|
* The description of the object content.
|
|
32
51
|
*/
|
|
33
52
|
export const description_attribute = {
|
|
34
|
-
|
|
53
|
+
...default_attribute,
|
|
35
54
|
description: "human readable description",
|
|
36
|
-
mandatory: false,
|
|
37
55
|
writable: true
|
|
38
56
|
};
|
|
39
57
|
|
|
40
58
|
/**
|
|
41
59
|
* Unique id within the provider.
|
|
42
60
|
*/
|
|
43
|
-
export const id_attribute = {
|
|
61
|
+
export const id_attribute = {
|
|
62
|
+
...default_attribute,
|
|
63
|
+
isKey: true,
|
|
64
|
+
description: "internal identifier"
|
|
65
|
+
};
|
|
44
66
|
|
|
45
|
-
export const state_attribute = {
|
|
67
|
+
export const state_attribute = {
|
|
68
|
+
...default_attribute,
|
|
69
|
+
writeable: true
|
|
70
|
+
};
|
|
46
71
|
|
|
47
72
|
/**
|
|
48
73
|
* The description of the pull request.
|
|
49
74
|
*/
|
|
50
|
-
export const body_attribute = {
|
|
75
|
+
export const body_attribute = {
|
|
76
|
+
...default_attribute,
|
|
77
|
+
writable: true
|
|
78
|
+
};
|
|
51
79
|
|
|
52
80
|
/**
|
|
53
81
|
* The one line description of the pull request.
|
|
54
82
|
*/
|
|
55
83
|
export const title_attribute = {
|
|
56
|
-
|
|
84
|
+
...default_attribute,
|
|
57
85
|
description: "human readable title",
|
|
58
|
-
writable: true
|
|
59
|
-
mandatory: false
|
|
86
|
+
writable: true
|
|
60
87
|
};
|
|
61
88
|
|
|
62
89
|
/**
|
|
@@ -64,17 +91,17 @@ export const title_attribute = {
|
|
|
64
91
|
* this defines the order
|
|
65
92
|
*/
|
|
66
93
|
export const priority_attribute = {
|
|
94
|
+
...default_attribute,
|
|
67
95
|
type: "number",
|
|
68
96
|
default: 0,
|
|
69
|
-
writable: true
|
|
70
|
-
mandatory: false
|
|
97
|
+
writable: true
|
|
71
98
|
};
|
|
72
99
|
|
|
73
100
|
export const active_attribute = {
|
|
101
|
+
...default_attribute,
|
|
74
102
|
type: "boolean",
|
|
75
103
|
default: true,
|
|
76
|
-
mandatory: false,
|
|
77
104
|
writable: true
|
|
78
105
|
};
|
|
79
|
-
export const language_attribute =
|
|
80
|
-
export const type_attribute =
|
|
106
|
+
export const language_attribute = default_attribute;
|
|
107
|
+
export const type_attribute = default_attribute;
|
package/src/hook.mjs
CHANGED
|
@@ -3,7 +3,8 @@ import {
|
|
|
3
3
|
secret_attribute,
|
|
4
4
|
boolean_attribute,
|
|
5
5
|
active_attribute,
|
|
6
|
-
url_attribute
|
|
6
|
+
url_attribute,
|
|
7
|
+
default_attribute
|
|
7
8
|
} from "./attributes.mjs";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -16,7 +17,7 @@ export class Hook extends OwnedObject {
|
|
|
16
17
|
active: active_attribute,
|
|
17
18
|
secret: secret_attribute,
|
|
18
19
|
url: { ...url_attribute, description: "target url", writable: true },
|
|
19
|
-
content_type: {
|
|
20
|
+
content_type: { ...default_attribute, default: "json", writable: true },
|
|
20
21
|
insecure_ssl: boolean_attribute,
|
|
21
22
|
events: { type: "set", default: new Set(["*"]) }
|
|
22
23
|
};
|
package/src/repository.mjs
CHANGED
|
@@ -7,7 +7,8 @@ import { PullRequest } from "./pull-request.mjs";
|
|
|
7
7
|
import {
|
|
8
8
|
url_attribute,
|
|
9
9
|
boolean_attribute,
|
|
10
|
-
boolean_read_only_attribute
|
|
10
|
+
boolean_read_only_attribute,
|
|
11
|
+
default_attribute
|
|
11
12
|
} from "./attributes.mjs";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -52,7 +53,7 @@ export class Repository extends OwnedObject {
|
|
|
52
53
|
* The name of the default branch
|
|
53
54
|
* @return {string}
|
|
54
55
|
*/
|
|
55
|
-
defaultBranchName: {
|
|
56
|
+
defaultBranchName: { ...default_attribute, default: "master" },
|
|
56
57
|
|
|
57
58
|
cloneURL: url_attribute,
|
|
58
59
|
|
|
@@ -403,7 +404,7 @@ export class Repository extends OwnedObject {
|
|
|
403
404
|
* @param {Hook} hook
|
|
404
405
|
*/
|
|
405
406
|
async createHook(hook) {
|
|
406
|
-
this.
|
|
407
|
+
this._addHook(hook);
|
|
407
408
|
}
|
|
408
409
|
|
|
409
410
|
/**
|