repository-provider 32.6.11 → 32.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -272
- package/package.json +5 -5
- package/src/attribute-extras.mjs +0 -15
- package/src/attribute.mjs +14 -0
- package/src/attributes.mjs +52 -25
- package/src/base-object.mjs +3 -3
- package/src/branch.mjs +9 -0
- package/src/hook.mjs +3 -2
- package/src/ref.mjs +6 -0
- package/src/repository.mjs +12 -2
package/README.md
CHANGED
|
@@ -46,8 +46,6 @@ console.log(await readme.getString());
|
|
|
46
46
|
### Table of Contents
|
|
47
47
|
|
|
48
48
|
* [Application](#application)
|
|
49
|
-
* [Attribute](#attribute)
|
|
50
|
-
* [Properties](#properties)
|
|
51
49
|
* [definePropertiesFromOptions](#definepropertiesfromoptions)
|
|
52
50
|
* [Parameters](#parameters)
|
|
53
51
|
* [defaultValues](#defaultvalues)
|
|
@@ -58,12 +56,15 @@ console.log(await readme.getString());
|
|
|
58
56
|
* [Parameters](#parameters-3)
|
|
59
57
|
* [mapAttributesInverse](#mapattributesinverse)
|
|
60
58
|
* [Parameters](#parameters-4)
|
|
59
|
+
* [AttributeDefinition](#attributedefinition)
|
|
60
|
+
* [Properties](#properties)
|
|
61
61
|
* [tokens](#tokens)
|
|
62
62
|
* [Parameters](#parameters-5)
|
|
63
63
|
* [setAttribute](#setattribute)
|
|
64
64
|
* [Parameters](#parameters-6)
|
|
65
65
|
* [getAttribute](#getattribute)
|
|
66
66
|
* [Parameters](#parameters-7)
|
|
67
|
+
* [default\_attribute](#default_attribute)
|
|
67
68
|
* [description\_attribute](#description_attribute)
|
|
68
69
|
* [id\_attribute](#id_attribute)
|
|
69
70
|
* [body\_attribute](#body_attribute)
|
|
@@ -71,7 +72,6 @@ console.log(await readme.getString());
|
|
|
71
72
|
* [priority\_attribute](#priority_attribute)
|
|
72
73
|
* [BaseObject](#baseobject)
|
|
73
74
|
* [Parameters](#parameters-8)
|
|
74
|
-
* [Properties](#properties-1)
|
|
75
75
|
* [updateAttributes](#updateattributes)
|
|
76
76
|
* [Parameters](#parameters-9)
|
|
77
77
|
* [update](#update)
|
|
@@ -87,58 +87,41 @@ console.log(await readme.getString());
|
|
|
87
87
|
* [attributes](#attributes)
|
|
88
88
|
* [writableAttributes](#writableattributes)
|
|
89
89
|
* [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
90
|
* [MessageDestination](#messagedestination)
|
|
108
|
-
* [Properties](#properties-
|
|
91
|
+
* [Properties](#properties-1)
|
|
109
92
|
* [BaseProvider](#baseprovider)
|
|
110
|
-
* [Properties](#properties-
|
|
111
|
-
* [equals](#equals-
|
|
112
|
-
* [Parameters](#parameters-
|
|
93
|
+
* [Properties](#properties-2)
|
|
94
|
+
* [equals](#equals-1)
|
|
95
|
+
* [Parameters](#parameters-11)
|
|
113
96
|
* [repositoryBases](#repositorybases)
|
|
114
97
|
* [supportsBase](#supportsbase)
|
|
115
|
-
* [Parameters](#parameters-
|
|
98
|
+
* [Parameters](#parameters-12)
|
|
116
99
|
* [normalizeRepositoryName](#normalizerepositoryname)
|
|
117
|
-
* [Parameters](#parameters-
|
|
100
|
+
* [Parameters](#parameters-13)
|
|
118
101
|
* [normalizeGroupName](#normalizegroupname)
|
|
119
|
-
* [Parameters](#parameters-
|
|
102
|
+
* [Parameters](#parameters-14)
|
|
120
103
|
* [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
|
|
121
104
|
* [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
|
|
122
105
|
* [parseName](#parsename)
|
|
123
|
-
* [Parameters](#parameters-
|
|
106
|
+
* [Parameters](#parameters-15)
|
|
124
107
|
* [createRepository](#createrepository)
|
|
125
|
-
* [Parameters](#parameters-
|
|
108
|
+
* [Parameters](#parameters-16)
|
|
126
109
|
* [list](#list)
|
|
127
|
-
* [Parameters](#parameters-
|
|
110
|
+
* [Parameters](#parameters-17)
|
|
128
111
|
* [projects](#projects)
|
|
129
|
-
* [Parameters](#parameters-
|
|
112
|
+
* [Parameters](#parameters-18)
|
|
130
113
|
* [milestones](#milestones)
|
|
131
|
-
* [Parameters](#parameters-
|
|
114
|
+
* [Parameters](#parameters-19)
|
|
132
115
|
* [repositories](#repositories)
|
|
133
|
-
* [Parameters](#parameters-
|
|
116
|
+
* [Parameters](#parameters-20)
|
|
134
117
|
* [branches](#branches)
|
|
135
|
-
* [Parameters](#parameters-
|
|
118
|
+
* [Parameters](#parameters-21)
|
|
136
119
|
* [tags](#tags)
|
|
137
|
-
* [Parameters](#parameters-
|
|
120
|
+
* [Parameters](#parameters-22)
|
|
138
121
|
* [hooks](#hooks)
|
|
139
|
-
* [Parameters](#parameters-
|
|
122
|
+
* [Parameters](#parameters-23)
|
|
140
123
|
* [pullRequests](#pullrequests)
|
|
141
|
-
* [Parameters](#parameters-
|
|
124
|
+
* [Parameters](#parameters-24)
|
|
142
125
|
* [name](#name)
|
|
143
126
|
* [provider](#provider)
|
|
144
127
|
* [toJSON](#tojson)
|
|
@@ -151,78 +134,85 @@ console.log(await readme.getString());
|
|
|
151
134
|
* [pullRequestClass](#pullrequestclass)
|
|
152
135
|
* [instanceIdentifier](#instanceidentifier)
|
|
153
136
|
* [optionsFromEnvironment](#optionsfromenvironment)
|
|
154
|
-
* [Parameters](#parameters-
|
|
137
|
+
* [Parameters](#parameters-25)
|
|
155
138
|
* [areOptionsSufficcient](#areoptionssufficcient)
|
|
156
|
-
* [Parameters](#parameters-
|
|
139
|
+
* [Parameters](#parameters-26)
|
|
157
140
|
* [initialize](#initialize)
|
|
158
|
-
* [Parameters](#parameters-
|
|
141
|
+
* [Parameters](#parameters-27)
|
|
159
142
|
* [name](#name-1)
|
|
160
143
|
* [messageDestination](#messagedestination-1)
|
|
161
144
|
* [Branch](#branch)
|
|
162
|
-
* [Parameters](#parameters-
|
|
163
|
-
* [Properties](#properties-4)
|
|
145
|
+
* [Parameters](#parameters-28)
|
|
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-
|
|
179
|
-
* [
|
|
160
|
+
* [Parameters](#parameters-33)
|
|
161
|
+
* [ContentEntry](#contententry)
|
|
162
|
+
* [Parameters](#parameters-34)
|
|
163
|
+
* [Properties](#properties-3)
|
|
164
|
+
* [ContentEntry](#contententry-1)
|
|
165
|
+
* [Properties](#properties-4)
|
|
166
|
+
* [ContentEntry](#contententry-2)
|
|
167
|
+
* [Parameters](#parameters-35)
|
|
180
168
|
* [Properties](#properties-5)
|
|
181
|
-
* [
|
|
182
|
-
* [Parameters](#parameters-37)
|
|
169
|
+
* [CommitResult](#commitresult)
|
|
183
170
|
* [Properties](#properties-6)
|
|
171
|
+
* [Commit](#commit-1)
|
|
172
|
+
* [Parameters](#parameters-36)
|
|
173
|
+
* [Properties](#properties-7)
|
|
184
174
|
* [Hook](#hook)
|
|
185
175
|
* [Issue](#issue)
|
|
186
176
|
* [Milestone](#milestone)
|
|
187
177
|
* [MultiGroupProvider](#multigroupprovider)
|
|
188
178
|
* [repository](#repository)
|
|
189
|
-
* [Parameters](#parameters-
|
|
179
|
+
* [Parameters](#parameters-37)
|
|
190
180
|
* [branch](#branch-1)
|
|
191
|
-
* [Parameters](#parameters-
|
|
181
|
+
* [Parameters](#parameters-38)
|
|
192
182
|
* [repositoryGroup](#repositorygroup)
|
|
193
|
-
* [Parameters](#parameters-
|
|
183
|
+
* [Parameters](#parameters-39)
|
|
194
184
|
* [repositoryGroups](#repositorygroups)
|
|
195
|
-
* [Parameters](#parameters-
|
|
185
|
+
* [Parameters](#parameters-40)
|
|
196
186
|
* [createRepositoryGroup](#createrepositorygroup)
|
|
197
|
-
* [Parameters](#parameters-
|
|
187
|
+
* [Parameters](#parameters-41)
|
|
198
188
|
* [addRepositoryGroup](#addrepositorygroup)
|
|
199
|
-
* [Parameters](#parameters-
|
|
189
|
+
* [Parameters](#parameters-42)
|
|
200
190
|
* [NamedObject](#namedobject)
|
|
201
|
-
* [Parameters](#parameters-
|
|
202
|
-
* [Properties](#properties-
|
|
203
|
-
* [equals](#equals-
|
|
204
|
-
* [Parameters](#parameters-
|
|
191
|
+
* [Parameters](#parameters-43)
|
|
192
|
+
* [Properties](#properties-8)
|
|
193
|
+
* [equals](#equals-2)
|
|
194
|
+
* [Parameters](#parameters-44)
|
|
205
195
|
* [toJSON](#tojson-1)
|
|
206
196
|
* [OwnedObject](#ownedobject)
|
|
207
|
-
* [Parameters](#parameters-
|
|
197
|
+
* [Parameters](#parameters-45)
|
|
208
198
|
* [delete](#delete-1)
|
|
209
|
-
* [equals](#equals-
|
|
210
|
-
* [Parameters](#parameters-
|
|
199
|
+
* [equals](#equals-3)
|
|
200
|
+
* [Parameters](#parameters-46)
|
|
211
201
|
* [api](#api)
|
|
212
202
|
* [url](#url-1)
|
|
213
203
|
* [provider](#provider-1)
|
|
214
204
|
* [identifier](#identifier)
|
|
215
|
-
* [fullName](#fullname-
|
|
205
|
+
* [fullName](#fullname-1)
|
|
216
206
|
* [trace](#trace)
|
|
217
|
-
* [Parameters](#parameters-
|
|
207
|
+
* [Parameters](#parameters-47)
|
|
218
208
|
* [info](#info)
|
|
219
|
-
* [Parameters](#parameters-
|
|
209
|
+
* [Parameters](#parameters-48)
|
|
220
210
|
* [warn](#warn)
|
|
221
|
-
* [Parameters](#parameters-
|
|
211
|
+
* [Parameters](#parameters-49)
|
|
222
212
|
* [error](#error)
|
|
223
|
-
* [Parameters](#parameters-
|
|
213
|
+
* [Parameters](#parameters-50)
|
|
224
214
|
* [debug](#debug)
|
|
225
|
-
* [Parameters](#parameters-
|
|
215
|
+
* [Parameters](#parameters-51)
|
|
226
216
|
* [repositoryClass](#repositoryclass-1)
|
|
227
217
|
* [pullRequestClass](#pullrequestclass-1)
|
|
228
218
|
* [branchClass](#branchclass-1)
|
|
@@ -233,72 +223,69 @@ console.log(await readme.getString());
|
|
|
233
223
|
* [deleteMethodName](#deletemethodname)
|
|
234
224
|
* [Project](#project)
|
|
235
225
|
* [PullRequest](#pullrequest)
|
|
236
|
-
* [Parameters](#parameters-
|
|
237
|
-
* [Properties](#properties-
|
|
238
|
-
* [fullName](#fullname-
|
|
226
|
+
* [Parameters](#parameters-52)
|
|
227
|
+
* [Properties](#properties-9)
|
|
228
|
+
* [fullName](#fullname-2)
|
|
239
229
|
* [url](#url-2)
|
|
240
230
|
* [repository](#repository-1)
|
|
241
231
|
* [delete](#delete-2)
|
|
242
232
|
* [merge](#merge)
|
|
243
|
-
* [Parameters](#parameters-
|
|
233
|
+
* [Parameters](#parameters-53)
|
|
244
234
|
* [decline](#decline)
|
|
245
235
|
* [reviews](#reviews)
|
|
246
236
|
* [identifier](#identifier-1)
|
|
247
237
|
* [defaultListStates](#defaultliststates)
|
|
248
238
|
* [validMergeMethods](#validmergemethods)
|
|
249
239
|
* [list](#list-1)
|
|
250
|
-
* [Parameters](#parameters-
|
|
240
|
+
* [Parameters](#parameters-54)
|
|
251
241
|
* [open](#open)
|
|
252
|
-
* [Parameters](#parameters-
|
|
242
|
+
* [Parameters](#parameters-55)
|
|
253
243
|
* [state](#state)
|
|
254
244
|
* [locked](#locked)
|
|
255
245
|
* [merged](#merged)
|
|
256
246
|
* [draft](#draft)
|
|
257
|
-
* [ContentEntry](#contententry)
|
|
258
|
-
* [Properties](#properties-9)
|
|
259
247
|
* [Ref](#ref)
|
|
260
248
|
* [ref](#ref-1)
|
|
261
249
|
* [refId](#refid)
|
|
262
250
|
* [entries](#entries)
|
|
263
|
-
* [Parameters](#parameters-
|
|
251
|
+
* [Parameters](#parameters-56)
|
|
264
252
|
* [asyncIterator](#asynciterator)
|
|
265
253
|
* [maybeEntry](#maybeentry)
|
|
266
|
-
* [Parameters](#parameters-
|
|
254
|
+
* [Parameters](#parameters-57)
|
|
267
255
|
* [entry](#entry)
|
|
268
|
-
* [Parameters](#parameters-
|
|
256
|
+
* [Parameters](#parameters-58)
|
|
269
257
|
* [repository](#repository-2)
|
|
270
|
-
* [fullName](#fullname-
|
|
271
|
-
* [fullCondensedName](#fullcondensedname-
|
|
272
|
-
* [toString](#tostring-
|
|
258
|
+
* [fullName](#fullname-3)
|
|
259
|
+
* [fullCondensedName](#fullcondensedname-1)
|
|
260
|
+
* [toString](#tostring-1)
|
|
273
261
|
* [issuesURL](#issuesurl)
|
|
274
262
|
* [homePageURL](#homepageurl)
|
|
275
263
|
* [isLocked](#islocked)
|
|
276
264
|
* [isArchived](#isarchived)
|
|
277
265
|
* [isDisabled](#isdisabled)
|
|
278
266
|
* [isProtected](#isprotected)
|
|
279
|
-
* [attributes](#attributes-
|
|
267
|
+
* [attributes](#attributes-1)
|
|
280
268
|
* [isProtected](#isprotected-1)
|
|
281
269
|
* [RepositoryGroup](#repositorygroup-1)
|
|
282
|
-
* [Parameters](#parameters-
|
|
270
|
+
* [Parameters](#parameters-59)
|
|
283
271
|
* [Properties](#properties-10)
|
|
284
|
-
* [attributeMapping](#attributemapping-
|
|
285
|
-
* [type](#type-
|
|
272
|
+
* [attributeMapping](#attributemapping-1)
|
|
273
|
+
* [type](#type-1)
|
|
286
274
|
* [homePageURL](#homepageurl-1)
|
|
287
275
|
* [RepositoryOwner](#repositoryowner)
|
|
288
|
-
* [Parameters](#parameters-
|
|
276
|
+
* [Parameters](#parameters-60)
|
|
289
277
|
* [Repository](#repository-3)
|
|
290
|
-
* [Parameters](#parameters-
|
|
291
|
-
* [
|
|
292
|
-
* [fullName](#fullname-5)
|
|
278
|
+
* [Parameters](#parameters-61)
|
|
279
|
+
* [fullName](#fullname-4)
|
|
293
280
|
* [slug](#slug)
|
|
294
281
|
* [entry](#entry-1)
|
|
295
|
-
* [Parameters](#parameters-
|
|
282
|
+
* [Parameters](#parameters-62)
|
|
296
283
|
* [entries](#entries-1)
|
|
297
|
-
* [Parameters](#parameters-
|
|
284
|
+
* [Parameters](#parameters-63)
|
|
298
285
|
* [maybeEntry](#maybeentry-1)
|
|
299
|
-
* [Parameters](#parameters-
|
|
286
|
+
* [Parameters](#parameters-64)
|
|
300
287
|
* [commits](#commits)
|
|
301
|
-
* [Parameters](#parameters-
|
|
288
|
+
* [Parameters](#parameters-65)
|
|
302
289
|
* [cloneURL](#cloneurl)
|
|
303
290
|
* [issuesURL](#issuesurl-1)
|
|
304
291
|
* [homePageURL](#homepageurl-2)
|
|
@@ -309,82 +296,66 @@ console.log(await readme.getString());
|
|
|
309
296
|
* [delete](#delete-3)
|
|
310
297
|
* [defaultBranch](#defaultbranch)
|
|
311
298
|
* [branch](#branch-2)
|
|
312
|
-
* [Parameters](#parameters-
|
|
299
|
+
* [Parameters](#parameters-66)
|
|
313
300
|
* [hasBranches](#hasbranches)
|
|
314
301
|
* [branches](#branches-1)
|
|
315
|
-
* [Parameters](#parameters-
|
|
302
|
+
* [Parameters](#parameters-67)
|
|
316
303
|
* [createBranch](#createbranch-1)
|
|
317
|
-
* [Parameters](#parameters-
|
|
304
|
+
* [Parameters](#parameters-68)
|
|
318
305
|
* [addBranch](#addbranch)
|
|
319
|
-
* [Parameters](#parameters-
|
|
306
|
+
* [Parameters](#parameters-69)
|
|
320
307
|
* [deleteBranch](#deletebranch)
|
|
321
|
-
* [Parameters](#parameters-
|
|
308
|
+
* [Parameters](#parameters-70)
|
|
322
309
|
* [tag](#tag)
|
|
323
|
-
* [Parameters](#parameters-
|
|
310
|
+
* [Parameters](#parameters-71)
|
|
324
311
|
* [tags](#tags-1)
|
|
325
|
-
* [Parameters](#parameters-
|
|
312
|
+
* [Parameters](#parameters-72)
|
|
326
313
|
* [addTag](#addtag)
|
|
327
|
-
* [Parameters](#parameters-
|
|
314
|
+
* [Parameters](#parameters-73)
|
|
328
315
|
* [createPullRequest](#createpullrequest-1)
|
|
329
|
-
* [Parameters](#parameters-
|
|
316
|
+
* [Parameters](#parameters-74)
|
|
330
317
|
* [addPullRequest](#addpullrequest)
|
|
331
|
-
* [Parameters](#parameters-
|
|
318
|
+
* [Parameters](#parameters-75)
|
|
332
319
|
* [pullRequests](#pullrequests-1)
|
|
333
320
|
* [pullRequest](#pullrequest-1)
|
|
334
|
-
* [Parameters](#parameters-
|
|
321
|
+
* [Parameters](#parameters-76)
|
|
335
322
|
* [deletePullRequest](#deletepullrequest)
|
|
336
|
-
* [Parameters](#parameters-
|
|
323
|
+
* [Parameters](#parameters-77)
|
|
337
324
|
* [addHook](#addhook)
|
|
338
|
-
* [Parameters](#parameters-
|
|
325
|
+
* [Parameters](#parameters-78)
|
|
339
326
|
* [createHook](#createhook)
|
|
340
|
-
* [Parameters](#parameters-
|
|
327
|
+
* [Parameters](#parameters-79)
|
|
341
328
|
* [hooks](#hooks-1)
|
|
342
329
|
* [hook](#hook-1)
|
|
343
|
-
* [Parameters](#parameters-
|
|
344
|
-
* [type](#type-
|
|
330
|
+
* [Parameters](#parameters-80)
|
|
331
|
+
* [type](#type-2)
|
|
345
332
|
* [refId](#refid-1)
|
|
346
|
-
* [Parameters](#parameters-
|
|
347
|
-
* [attributes](#attributes-
|
|
333
|
+
* [Parameters](#parameters-81)
|
|
334
|
+
* [attributes](#attributes-2)
|
|
348
335
|
* [defaultBranchName](#defaultbranchname)
|
|
349
336
|
* [Review](#review)
|
|
350
337
|
* [SingleGroupProvider](#singlegroupprovider)
|
|
351
338
|
* [repository](#repository-4)
|
|
352
|
-
* [Parameters](#parameters-
|
|
339
|
+
* [Parameters](#parameters-82)
|
|
353
340
|
* [repositoryGroup](#repositorygroup-2)
|
|
354
|
-
* [Parameters](#parameters-
|
|
341
|
+
* [Parameters](#parameters-83)
|
|
355
342
|
* [repositoryGroups](#repositorygroups-1)
|
|
356
|
-
* [Parameters](#parameters-
|
|
343
|
+
* [Parameters](#parameters-84)
|
|
357
344
|
* [Tag](#tag-1)
|
|
358
345
|
* [refType](#reftype-1)
|
|
359
346
|
* [asArray](#asarray)
|
|
360
|
-
* [Parameters](#parameters-
|
|
347
|
+
* [Parameters](#parameters-85)
|
|
361
348
|
* [stripBaseName](#stripbasename)
|
|
362
|
-
* [Parameters](#parameters-
|
|
349
|
+
* [Parameters](#parameters-86)
|
|
363
350
|
* [stripBaseNames](#stripbasenames)
|
|
364
|
-
* [Parameters](#parameters-
|
|
351
|
+
* [Parameters](#parameters-87)
|
|
365
352
|
* [generateBranchName](#generatebranchname)
|
|
366
|
-
* [Parameters](#parameters-
|
|
353
|
+
* [Parameters](#parameters-88)
|
|
367
354
|
|
|
368
355
|
## Application
|
|
369
356
|
|
|
370
357
|
**Extends OwnedObject**
|
|
371
358
|
|
|
372
|
-
## Attribute
|
|
373
|
-
|
|
374
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
375
|
-
|
|
376
|
-
### Properties
|
|
377
|
-
|
|
378
|
-
* `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
379
|
-
* `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
380
|
-
* `private` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** should the value be shown
|
|
381
|
-
* `depends` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of an attribute we depend on
|
|
382
|
-
* `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
383
|
-
* `default` **any?** the default value
|
|
384
|
-
* `set` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** set the value
|
|
385
|
-
* `get` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** get the value can be used to calculate default values
|
|
386
|
-
* `env` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)?** environment variable use to provide the value
|
|
387
|
-
|
|
388
359
|
## definePropertiesFromOptions
|
|
389
360
|
|
|
390
361
|
* **See**: Object.definedProperties()
|
|
@@ -466,6 +437,23 @@ Filters out null, undefined and empty strings
|
|
|
466
437
|
|
|
467
438
|
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** keys renamed after mapping
|
|
468
439
|
|
|
440
|
+
## AttributeDefinition
|
|
441
|
+
|
|
442
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
443
|
+
|
|
444
|
+
### Properties
|
|
445
|
+
|
|
446
|
+
* `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
447
|
+
* `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
448
|
+
* `private` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** should the value be shown
|
|
449
|
+
* `depends` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of an attribute we depend on
|
|
450
|
+
* `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 case our attribute is set
|
|
451
|
+
* `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
452
|
+
* `default` **any?** the default value
|
|
453
|
+
* `set` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** set the value
|
|
454
|
+
* `get` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** get the value can be used to calculate default values
|
|
455
|
+
* `env` **([string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) | [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>)?** environment variable use to provide the value
|
|
456
|
+
|
|
469
457
|
## tokens
|
|
470
458
|
|
|
471
459
|
Split property path into tokens
|
|
@@ -499,6 +487,10 @@ The name may be a property path like 'a.b.c'.
|
|
|
499
487
|
|
|
500
488
|
Returns **any** value associated with the given property name
|
|
501
489
|
|
|
490
|
+
## default\_attribute
|
|
491
|
+
|
|
492
|
+
common attributes
|
|
493
|
+
|
|
502
494
|
## description\_attribute
|
|
503
495
|
|
|
504
496
|
The description of the object content.
|
|
@@ -524,100 +516,8 @@ this defines the order
|
|
|
524
516
|
|
|
525
517
|
### Parameters
|
|
526
518
|
|
|
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
|
-
* `options` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
620
|
-
* `additionalProperties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
519
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
520
|
+
* `additionalProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
621
521
|
|
|
622
522
|
### updateAttributes
|
|
623
523
|
|
|
@@ -625,7 +525,7 @@ Takes values from options.
|
|
|
625
525
|
|
|
626
526
|
#### Parameters
|
|
627
527
|
|
|
628
|
-
* `options` **[
|
|
528
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
629
529
|
* `additionalProperties`  
|
|
630
530
|
|
|
631
531
|
### update
|
|
@@ -987,21 +887,11 @@ To forward info/warn and error messages to
|
|
|
987
887
|
|
|
988
888
|
**Extends Ref**
|
|
989
889
|
|
|
990
|
-
* **See**: [Repository#\_addBranch](Repository#_addBranch)
|
|
991
|
-
|
|
992
|
-
Abstract branch.
|
|
993
|
-
|
|
994
890
|
### Parameters
|
|
995
891
|
|
|
996
|
-
* `owner`
|
|
997
|
-
* `name`
|
|
998
|
-
* `options`
|
|
999
|
-
|
|
1000
|
-
### Properties
|
|
1001
|
-
|
|
1002
|
-
* `repository` **[Repository](#repository)** 
|
|
1003
|
-
* `provider` **Provider** 
|
|
1004
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
892
|
+
* `owner`  
|
|
893
|
+
* `name` (optional, default `owner.defaultBranchName`)
|
|
894
|
+
* `options`  
|
|
1005
895
|
|
|
1006
896
|
### url
|
|
1007
897
|
|
|
@@ -1091,6 +981,60 @@ Simply calls Repository.createBranch() with the receiver as source branch
|
|
|
1091
981
|
|
|
1092
982
|
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Branch](#branch)>** newly created branch (or already present old one with the same name)
|
|
1093
983
|
|
|
984
|
+
## ContentEntry
|
|
985
|
+
|
|
986
|
+
* **See**: [Repository#\_addBranch](Repository#_addBranch)
|
|
987
|
+
|
|
988
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
989
|
+
|
|
990
|
+
### Parameters
|
|
991
|
+
|
|
992
|
+
* `owner` **[RepositoryOwner](#repositoryowner)** 
|
|
993
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
994
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
995
|
+
|
|
996
|
+
### Properties
|
|
997
|
+
|
|
998
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** /\*\*
|
|
999
|
+
Abstract branch.
|
|
1000
|
+
* `repository` **[Repository](#repository)** 
|
|
1001
|
+
* `provider` **Provider** 
|
|
1002
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1003
|
+
|
|
1004
|
+
## ContentEntry
|
|
1005
|
+
|
|
1006
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1007
|
+
|
|
1008
|
+
### Properties
|
|
1009
|
+
|
|
1010
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1011
|
+
|
|
1012
|
+
## ContentEntry
|
|
1013
|
+
|
|
1014
|
+
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1015
|
+
|
|
1016
|
+
### Parameters
|
|
1017
|
+
|
|
1018
|
+
* `owner` **[RepositoryOwner](#repositoryowner)** 
|
|
1019
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (#branch) will be removed
|
|
1020
|
+
* `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
|
|
1021
|
+
|
|
1022
|
+
* `options.description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** human readable description
|
|
1023
|
+
* `options.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** internal id
|
|
1024
|
+
|
|
1025
|
+
### Properties
|
|
1026
|
+
|
|
1027
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** /\*\*
|
|
1028
|
+
Abstract repository
|
|
1029
|
+
* `owner` **[RepositoryOwner](#repositoryowner)** 
|
|
1030
|
+
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** without (#branch)
|
|
1031
|
+
* `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.description
|
|
1032
|
+
* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.id
|
|
1033
|
+
* `branches` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Branch](#branch)>** 
|
|
1034
|
+
* `tags` **[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)>** 
|
|
1035
|
+
* `pullRequests` **[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)>** 
|
|
1036
|
+
* `milestones` **[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)>** 
|
|
1037
|
+
|
|
1094
1038
|
## CommitResult
|
|
1095
1039
|
|
|
1096
1040
|
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
@@ -1517,14 +1461,6 @@ Draft state of the pull request.
|
|
|
1517
1461
|
|
|
1518
1462
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
|
|
1519
1463
|
|
|
1520
|
-
## ContentEntry
|
|
1521
|
-
|
|
1522
|
-
Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
|
1523
|
-
|
|
1524
|
-
### Properties
|
|
1525
|
-
|
|
1526
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1527
|
-
|
|
1528
1464
|
## Ref
|
|
1529
1465
|
|
|
1530
1466
|
**Extends OwnedObject**
|
|
@@ -1697,27 +1633,11 @@ Mixin to define a class able to handle a collection of repositories.
|
|
|
1697
1633
|
|
|
1698
1634
|
**Extends OwnedObject**
|
|
1699
1635
|
|
|
1700
|
-
Abstract repository
|
|
1701
|
-
|
|
1702
1636
|
### Parameters
|
|
1703
1637
|
|
|
1704
|
-
* `owner`
|
|
1705
|
-
* `name`
|
|
1706
|
-
* `options`
|
|
1707
|
-
|
|
1708
|
-
* `options.description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** human readable description
|
|
1709
|
-
* `options.id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** internal id
|
|
1710
|
-
|
|
1711
|
-
### Properties
|
|
1712
|
-
|
|
1713
|
-
* `owner` **[RepositoryOwner](#repositoryowner)** 
|
|
1714
|
-
* `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** without (#branch)
|
|
1715
|
-
* `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.description
|
|
1716
|
-
* `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.id
|
|
1717
|
-
* `branches` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), [Branch](#branch)>** 
|
|
1718
|
-
* `tags` **[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)>** 
|
|
1719
|
-
* `pullRequests` **[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)>** 
|
|
1720
|
-
* `milestones` **[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)>** 
|
|
1638
|
+
* `owner`  
|
|
1639
|
+
* `name`  
|
|
1640
|
+
* `options`  
|
|
1721
1641
|
|
|
1722
1642
|
### fullName
|
|
1723
1643
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.7.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"ava": "^5.2.0",
|
|
37
|
-
"browser-ava": "^1.3.
|
|
37
|
+
"browser-ava": "^1.3.33",
|
|
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.1",
|
|
42
|
+
"typescript": "^5.0.4"
|
|
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,20 +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[]} additionalAttributes extra attributes that are present in cas our attribute is set
|
|
11
|
-
* @property {string} description
|
|
12
|
-
* @property {any} [default] the default value
|
|
13
|
-
* @property {Function} [set] set the value
|
|
14
|
-
* @property {Function} [get] get the value can be used to calculate default values
|
|
15
|
-
* @property {string|string[]} [env] environment variable use to provide the value
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
3
|
/**
|
|
19
4
|
* Create properties from options and default options.
|
|
20
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 case 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
|
+
* common attributes
|
|
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/base-object.mjs
CHANGED
|
@@ -55,8 +55,8 @@ export class BaseObject {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
* Creates an instance of BaseObject.
|
|
58
|
-
* @param {
|
|
59
|
-
* @param {
|
|
58
|
+
* @param {Object} options
|
|
59
|
+
* @param {Object} additionalProperties
|
|
60
60
|
*/
|
|
61
61
|
constructor(options, additionalProperties) {
|
|
62
62
|
this.updateAttributes(options, additionalProperties);
|
|
@@ -64,7 +64,7 @@ export class BaseObject {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Takes values from options.
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {Object} options
|
|
68
68
|
*/
|
|
69
69
|
updateAttributes(options, additionalProperties) {
|
|
70
70
|
definePropertiesFromOptions(
|
package/src/branch.mjs
CHANGED
|
@@ -3,6 +3,15 @@ import { PullRequest } from "./pull-request.mjs";
|
|
|
3
3
|
import { Repository } from "./repository.mjs";
|
|
4
4
|
import { Commit } from "./commit.mjs";
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {import('./repository-owner.mjs').RepositoryOwner} RepositoryOwner
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {Object} ContentEntry
|
|
12
|
+
* @property {string} name
|
|
13
|
+
*
|
|
14
|
+
|
|
6
15
|
/**
|
|
7
16
|
* Abstract branch.
|
|
8
17
|
* @see {@link Repository#_addBranch}
|
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/ref.mjs
CHANGED
|
@@ -122,6 +122,12 @@ export class Ref extends OwnedObject {
|
|
|
122
122
|
: `${this.owner.fullName}#${this.name}`;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
get identifier() {
|
|
126
|
+
return this.isDefault
|
|
127
|
+
? this.owner.identifier
|
|
128
|
+
: `${this.owner.identifier}#${this.name}`;
|
|
129
|
+
}
|
|
130
|
+
|
|
125
131
|
/**
|
|
126
132
|
* Same as identifier.
|
|
127
133
|
* @return {string}
|
package/src/repository.mjs
CHANGED
|
@@ -7,9 +7,19 @@ 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
|
|
|
14
|
+
/**
|
|
15
|
+
* @typedef {import('./repository-owner.mjs').RepositoryOwner} RepositoryOwner
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @typedef {Object} ContentEntry
|
|
20
|
+
* @property {string} name
|
|
21
|
+
*
|
|
22
|
+
|
|
13
23
|
/**
|
|
14
24
|
* Abstract repository
|
|
15
25
|
* @param {RepositoryOwner} owner
|
|
@@ -52,7 +62,7 @@ export class Repository extends OwnedObject {
|
|
|
52
62
|
* The name of the default branch
|
|
53
63
|
* @return {string}
|
|
54
64
|
*/
|
|
55
|
-
defaultBranchName: {
|
|
65
|
+
defaultBranchName: { ...default_attribute, default: "master" },
|
|
56
66
|
|
|
57
67
|
cloneURL: url_attribute,
|
|
58
68
|
|