repository-provider 28.3.0 → 28.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -46,37 +46,36 @@ console.log(await readme.getString());
46
46
  ### Table of Contents
47
47
 
48
48
  * [Application](#application)
49
- * [Parameters](#parameters)
50
49
  * [Attribute](#attribute)
51
50
  * [Properties](#properties)
52
51
  * [definePropertiesFromOptions](#definepropertiesfromoptions)
53
- * [Parameters](#parameters-1)
52
+ * [Parameters](#parameters)
54
53
  * [defaultValues](#defaultvalues)
55
- * [Parameters](#parameters-2)
54
+ * [Parameters](#parameters-1)
56
55
  * [setAttribute](#setattribute)
57
- * [Parameters](#parameters-3)
56
+ * [Parameters](#parameters-2)
58
57
  * [getAttribute](#getattribute)
59
- * [Parameters](#parameters-4)
58
+ * [Parameters](#parameters-3)
60
59
  * [optionJSON](#optionjson)
61
- * [Parameters](#parameters-5)
60
+ * [Parameters](#parameters-4)
62
61
  * [mapAttributes](#mapattributes)
63
- * [Parameters](#parameters-6)
62
+ * [Parameters](#parameters-5)
64
63
  * [mapAttributesInverse](#mapattributesinverse)
65
- * [Parameters](#parameters-7)
64
+ * [Parameters](#parameters-6)
66
65
  * [BaseObject](#baseobject)
67
- * [Parameters](#parameters-8)
66
+ * [Parameters](#parameters-7)
68
67
  * [update](#update)
69
68
  * [equals](#equals)
70
- * [Parameters](#parameters-9)
69
+ * [Parameters](#parameters-8)
71
70
  * [provider](#provider)
72
71
  * [trace](#trace)
73
- * [Parameters](#parameters-10)
72
+ * [Parameters](#parameters-9)
74
73
  * [info](#info)
75
- * [Parameters](#parameters-11)
74
+ * [Parameters](#parameters-10)
76
75
  * [warn](#warn)
77
- * [Parameters](#parameters-12)
76
+ * [Parameters](#parameters-11)
78
77
  * [error](#error)
79
- * [Parameters](#parameters-13)
78
+ * [Parameters](#parameters-12)
80
79
  * [repositoryClass](#repositoryclass)
81
80
  * [pullRequestClass](#pullrequestclass)
82
81
  * [branchClass](#branchclass)
@@ -96,36 +95,36 @@ console.log(await readme.getString());
96
95
  * [BaseProvider](#baseprovider)
97
96
  * [Properties](#properties-2)
98
97
  * [equals](#equals-1)
99
- * [Parameters](#parameters-14)
98
+ * [Parameters](#parameters-13)
100
99
  * [repositoryBases](#repositorybases)
101
100
  * [normalizeRepositoryName](#normalizerepositoryname)
102
- * [Parameters](#parameters-15)
101
+ * [Parameters](#parameters-14)
103
102
  * [normalizeGroupName](#normalizegroupname)
104
- * [Parameters](#parameters-16)
103
+ * [Parameters](#parameters-15)
105
104
  * [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
106
105
  * [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
107
106
  * [supportsBase](#supportsbase)
108
- * [Parameters](#parameters-17)
107
+ * [Parameters](#parameters-16)
109
108
  * [parseName](#parsename)
110
- * [Parameters](#parameters-18)
109
+ * [Parameters](#parameters-17)
111
110
  * [createRepository](#createrepository)
112
- * [Parameters](#parameters-19)
111
+ * [Parameters](#parameters-18)
113
112
  * [list](#list)
114
- * [Parameters](#parameters-20)
113
+ * [Parameters](#parameters-19)
115
114
  * [projects](#projects)
116
- * [Parameters](#parameters-21)
115
+ * [Parameters](#parameters-20)
117
116
  * [milestones](#milestones)
118
- * [Parameters](#parameters-22)
117
+ * [Parameters](#parameters-21)
119
118
  * [repositories](#repositories)
120
- * [Parameters](#parameters-23)
119
+ * [Parameters](#parameters-22)
121
120
  * [branches](#branches)
122
- * [Parameters](#parameters-24)
121
+ * [Parameters](#parameters-23)
123
122
  * [tags](#tags)
124
- * [Parameters](#parameters-25)
123
+ * [Parameters](#parameters-24)
125
124
  * [hooks](#hooks)
126
- * [Parameters](#parameters-26)
125
+ * [Parameters](#parameters-25)
127
126
  * [pullRequests](#pullrequests)
128
- * [Parameters](#parameters-27)
127
+ * [Parameters](#parameters-26)
129
128
  * [name](#name)
130
129
  * [fullName](#fullname)
131
130
  * [provider](#provider-1)
@@ -140,82 +139,82 @@ console.log(await readme.getString());
140
139
  * [pullRequestClass](#pullrequestclass-1)
141
140
  * [instanceIdentifier](#instanceidentifier)
142
141
  * [optionsFromEnvironment](#optionsfromenvironment)
143
- * [Parameters](#parameters-28)
142
+ * [Parameters](#parameters-27)
144
143
  * [areOptionsSufficcient](#areoptionssufficcient)
145
- * [Parameters](#parameters-29)
144
+ * [Parameters](#parameters-28)
146
145
  * [initialize](#initialize)
147
- * [Parameters](#parameters-30)
146
+ * [Parameters](#parameters-29)
148
147
  * [priority](#priority)
149
148
  * [name](#name-1)
150
149
  * [messageDestination](#messagedestination-1)
151
150
  * [Branch](#branch)
152
- * [Parameters](#parameters-31)
151
+ * [Parameters](#parameters-30)
153
152
  * [Properties](#properties-3)
154
153
  * [url](#url-1)
155
154
  * [refType](#reftype)
156
155
  * [isDefault](#isdefault)
157
156
  * [delete](#delete)
158
157
  * [commit](#commit)
159
- * [Parameters](#parameters-32)
158
+ * [Parameters](#parameters-31)
160
159
  * [commitIntoPullRequest](#commitintopullrequest)
161
- * [Parameters](#parameters-33)
160
+ * [Parameters](#parameters-32)
162
161
  * [removeEntries](#removeentries)
163
- * [Parameters](#parameters-34)
162
+ * [Parameters](#parameters-33)
164
163
  * [createPullRequest](#createpullrequest)
165
- * [Parameters](#parameters-35)
164
+ * [Parameters](#parameters-34)
166
165
  * [createBranch](#createbranch)
167
- * [Parameters](#parameters-36)
166
+ * [Parameters](#parameters-35)
168
167
  * [CommitResult](#commitresult)
169
168
  * [Properties](#properties-4)
170
169
  * [Commit](#commit-1)
171
- * [Parameters](#parameters-37)
170
+ * [Parameters](#parameters-36)
172
171
  * [Properties](#properties-5)
173
172
  * [Hook](#hook)
174
- * [Parameters](#parameters-38)
173
+ * [Parameters](#parameters-37)
175
174
  * [Properties](#properties-6)
176
175
  * [equals](#equals-2)
177
- * [Parameters](#parameters-39)
176
+ * [Parameters](#parameters-38)
178
177
  * [toJSON](#tojson-1)
179
178
  * [Issue](#issue)
180
- * [Parameters](#parameters-40)
181
179
  * [Milestone](#milestone)
182
- * [Parameters](#parameters-41)
183
180
  * [MultiGroupProvider](#multigroupprovider)
184
- * [Parameters](#parameters-42)
181
+ * [Parameters](#parameters-39)
185
182
  * [repository](#repository)
186
- * [Parameters](#parameters-43)
183
+ * [Parameters](#parameters-40)
187
184
  * [branch](#branch-1)
188
- * [Parameters](#parameters-44)
185
+ * [Parameters](#parameters-41)
189
186
  * [repositoryGroup](#repositorygroup)
190
- * [Parameters](#parameters-45)
187
+ * [Parameters](#parameters-42)
191
188
  * [repositoryGroups](#repositorygroups)
192
- * [Parameters](#parameters-46)
189
+ * [Parameters](#parameters-43)
193
190
  * [createRepositoryGroup](#createrepositorygroup)
194
- * [Parameters](#parameters-47)
191
+ * [Parameters](#parameters-44)
195
192
  * [addRepositoryGroup](#addrepositorygroup)
196
- * [Parameters](#parameters-48)
193
+ * [Parameters](#parameters-45)
197
194
  * [NamedObject](#namedobject)
198
- * [Parameters](#parameters-49)
195
+ * [Parameters](#parameters-46)
199
196
  * [Properties](#properties-7)
200
197
  * [equals](#equals-3)
201
- * [Parameters](#parameters-50)
198
+ * [Parameters](#parameters-47)
202
199
  * [displayName](#displayname)
203
200
  * [fullName](#fullname-1)
204
201
  * [toJSON](#tojson-2)
202
+ * [OwnedObject](#ownedobject)
203
+ * [Parameters](#parameters-48)
204
+ * [registerInstanceMethodName](#registerinstancemethodname)
205
205
  * [Project](#project)
206
- * [Parameters](#parameters-51)
207
206
  * [PullRequest](#pullrequest)
208
- * [Parameters](#parameters-52)
207
+ * [Parameters](#parameters-49)
209
208
  * [Properties](#properties-8)
210
209
  * [fullName](#fullname-2)
211
210
  * [url](#url-2)
212
211
  * [repository](#repository-1)
213
212
  * [provider](#provider-2)
214
213
  * [equals](#equals-4)
215
- * [Parameters](#parameters-53)
214
+ * [Parameters](#parameters-50)
216
215
  * [delete](#delete-1)
217
216
  * [merge](#merge)
218
- * [Parameters](#parameters-54)
217
+ * [Parameters](#parameters-51)
219
218
  * [decline](#decline)
220
219
  * [reviews](#reviews)
221
220
  * [identifier](#identifier)
@@ -223,9 +222,9 @@ console.log(await readme.getString());
223
222
  * [defaultListStates](#defaultliststates)
224
223
  * [validMergeMethods](#validmergemethods)
225
224
  * [list](#list-1)
226
- * [Parameters](#parameters-55)
225
+ * [Parameters](#parameters-52)
227
226
  * [open](#open)
228
- * [Parameters](#parameters-56)
227
+ * [Parameters](#parameters-53)
229
228
  * [title](#title)
230
229
  * [body](#body)
231
230
  * [state](#state)
@@ -235,19 +234,19 @@ console.log(await readme.getString());
235
234
  * [ContentEntry](#contententry)
236
235
  * [Properties](#properties-9)
237
236
  * [Ref](#ref)
238
- * [Parameters](#parameters-57)
237
+ * [Parameters](#parameters-54)
239
238
  * [equals](#equals-5)
240
- * [Parameters](#parameters-58)
239
+ * [Parameters](#parameters-55)
241
240
  * [ref](#ref-1)
242
241
  * [refId](#refid)
243
- * [Parameters](#parameters-59)
242
+ * [Parameters](#parameters-56)
244
243
  * [entries](#entries)
245
- * [Parameters](#parameters-60)
244
+ * [Parameters](#parameters-57)
246
245
  * [asyncIterator](#asynciterator)
247
246
  * [maybeEntry](#maybeentry)
248
- * [Parameters](#parameters-61)
247
+ * [Parameters](#parameters-58)
249
248
  * [entry](#entry)
250
- * [Parameters](#parameters-62)
249
+ * [Parameters](#parameters-59)
251
250
  * [owner](#owner)
252
251
  * [fullName](#fullname-3)
253
252
  * [fullCondensedName](#fullcondensedname)
@@ -263,30 +262,27 @@ console.log(await readme.getString());
263
262
  * [attributes](#attributes-1)
264
263
  * [isProtected](#isprotected-1)
265
264
  * [RepositoryGroup](#repositorygroup-1)
266
- * [Parameters](#parameters-63)
265
+ * [Parameters](#parameters-60)
267
266
  * [Properties](#properties-10)
268
267
  * [attributeMapping](#attributemapping-1)
269
268
  * [type](#type)
270
269
  * [url](#url-3)
271
270
  * [RepositoryOwner](#repositoryowner)
272
- * [Parameters](#parameters-64)
271
+ * [Parameters](#parameters-61)
273
272
  * [Repository](#repository-2)
274
- * [Parameters](#parameters-65)
273
+ * [Parameters](#parameters-62)
275
274
  * [Properties](#properties-11)
276
275
  * [fullName](#fullname-4)
277
276
  * [slug](#slug)
278
- * [provider](#provider-3)
279
277
  * [identifier](#identifier-2)
280
- * [equals](#equals-6)
281
- * [Parameters](#parameters-66)
282
278
  * [entry](#entry-1)
283
- * [Parameters](#parameters-67)
279
+ * [Parameters](#parameters-63)
284
280
  * [entries](#entries-1)
285
- * [Parameters](#parameters-68)
281
+ * [Parameters](#parameters-64)
286
282
  * [maybeEntry](#maybeentry-1)
287
- * [Parameters](#parameters-69)
283
+ * [Parameters](#parameters-65)
288
284
  * [commits](#commits)
289
- * [Parameters](#parameters-70)
285
+ * [Parameters](#parameters-66)
290
286
  * [urls](#urls)
291
287
  * [url](#url-4)
292
288
  * [cloneURL](#cloneurl)
@@ -300,40 +296,40 @@ console.log(await readme.getString());
300
296
  * [delete](#delete-2)
301
297
  * [defaultBranch](#defaultbranch)
302
298
  * [branch](#branch-2)
303
- * [Parameters](#parameters-71)
299
+ * [Parameters](#parameters-67)
304
300
  * [branches](#branches-1)
305
- * [Parameters](#parameters-72)
301
+ * [Parameters](#parameters-68)
306
302
  * [createBranch](#createbranch-1)
307
- * [Parameters](#parameters-73)
303
+ * [Parameters](#parameters-69)
308
304
  * [addBranch](#addbranch)
309
- * [Parameters](#parameters-74)
305
+ * [Parameters](#parameters-70)
310
306
  * [deleteBranch](#deletebranch)
311
- * [Parameters](#parameters-75)
307
+ * [Parameters](#parameters-71)
312
308
  * [tag](#tag)
313
- * [Parameters](#parameters-76)
309
+ * [Parameters](#parameters-72)
314
310
  * [tags](#tags-1)
315
- * [Parameters](#parameters-77)
311
+ * [Parameters](#parameters-73)
316
312
  * [addTag](#addtag)
317
- * [Parameters](#parameters-78)
313
+ * [Parameters](#parameters-74)
318
314
  * [createPullRequest](#createpullrequest-1)
319
- * [Parameters](#parameters-79)
315
+ * [Parameters](#parameters-75)
320
316
  * [addPullRequest](#addpullrequest)
321
- * [Parameters](#parameters-80)
317
+ * [Parameters](#parameters-76)
322
318
  * [pullRequests](#pullrequests-1)
323
319
  * [pullRequest](#pullrequest-1)
324
- * [Parameters](#parameters-81)
320
+ * [Parameters](#parameters-77)
325
321
  * [deletePullRequest](#deletepullrequest)
326
- * [Parameters](#parameters-82)
322
+ * [Parameters](#parameters-78)
327
323
  * [addHook](#addhook)
328
- * [Parameters](#parameters-83)
324
+ * [Parameters](#parameters-79)
329
325
  * [createHook](#createhook)
330
- * [Parameters](#parameters-84)
326
+ * [Parameters](#parameters-80)
331
327
  * [hooks](#hooks-1)
332
328
  * [hook](#hook-1)
333
- * [Parameters](#parameters-85)
329
+ * [Parameters](#parameters-81)
334
330
  * [type](#type-1)
335
331
  * [refId](#refid-1)
336
- * [Parameters](#parameters-86)
332
+ * [Parameters](#parameters-82)
337
333
  * [toString](#tostring-1)
338
334
  * [toJSON](#tojson-3)
339
335
  * [attributes](#attributes-2)
@@ -343,33 +339,27 @@ console.log(await readme.getString());
343
339
  * [Review](#review)
344
340
  * [SingleGroupProvider](#singlegroupprovider)
345
341
  * [repository](#repository-3)
346
- * [Parameters](#parameters-87)
342
+ * [Parameters](#parameters-83)
347
343
  * [repositoryGroup](#repositorygroup-2)
348
- * [Parameters](#parameters-88)
344
+ * [Parameters](#parameters-84)
349
345
  * [repositoryGroups](#repositorygroups-1)
350
- * [Parameters](#parameters-89)
346
+ * [Parameters](#parameters-85)
351
347
  * [Tag](#tag-1)
352
- * [Parameters](#parameters-90)
348
+ * [Parameters](#parameters-86)
353
349
  * [refType](#reftype-1)
354
350
  * [isWritable](#iswritable-1)
355
351
  * [asArray](#asarray)
356
- * [Parameters](#parameters-91)
352
+ * [Parameters](#parameters-87)
357
353
  * [stripBaseName](#stripbasename)
358
- * [Parameters](#parameters-92)
354
+ * [Parameters](#parameters-88)
359
355
  * [stripBaseNames](#stripbasenames)
360
- * [Parameters](#parameters-93)
356
+ * [Parameters](#parameters-89)
361
357
  * [generateBranchName](#generatebranchname)
362
- * [Parameters](#parameters-94)
358
+ * [Parameters](#parameters-90)
363
359
 
364
360
  ## Application
365
361
 
366
- **Extends NamedObject**
367
-
368
- ### Parameters
369
-
370
- * `owner`
371
- * `name`
372
- * `options`
362
+ **Extends OwnedObject**
373
363
 
374
364
  ## Attribute
375
365
 
@@ -639,6 +629,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
639
629
  * `info` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
640
630
  * `warn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
641
631
  * `error` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
632
+ * `trace` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
642
633
 
643
634
  ## BaseProvider
644
635
 
@@ -1086,23 +1077,11 @@ Provide name, events and all defined attributes.
1086
1077
 
1087
1078
  ## Issue
1088
1079
 
1089
- **Extends NamedObject**
1090
-
1091
- ### Parameters
1092
-
1093
- * `owner`
1094
- * `name`
1095
- * `options`
1080
+ **Extends OwnedObject**
1096
1081
 
1097
1082
  ## Milestone
1098
1083
 
1099
- **Extends NamedObject**
1100
-
1101
- ### Parameters
1102
-
1103
- * `owner`
1104
- * `name`
1105
- * `options`
1084
+ **Extends OwnedObject**
1106
1085
 
1107
1086
  ## MultiGroupProvider
1108
1087
 
@@ -1217,16 +1196,29 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1217
1196
 
1218
1197
  Provide name and all defined attributes.
1219
1198
 
1220
- ## Project
1199
+ ## OwnedObject
1221
1200
 
1222
1201
  **Extends NamedObject**
1223
1202
 
1203
+ Named Object registering itself in the owner.
1204
+
1224
1205
  ### Parameters
1225
1206
 
1226
1207
  * `owner`
1227
1208
  * `name`
1228
1209
  * `options`
1229
1210
 
1211
+ ### registerInstanceMethodName
1212
+
1213
+ Method name to be called to register one instance in the owner.
1214
+ sample: Application => \_addApplication
1215
+
1216
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1217
+
1218
+ ## Project
1219
+
1220
+ **Extends OwnedObject**
1221
+
1230
1222
  ## PullRequest
1231
1223
 
1232
1224
  **Extends NamedObject**
@@ -1501,7 +1493,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1501
1493
  ### fullCondensedName
1502
1494
 
1503
1495
  Repository fullName and branch name combined.
1504
- But skipping the branch name if it is the default branch
1496
+ But skipping the branch name if it is the default branch.
1505
1497
 
1506
1498
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 'user/repo#branch'
1507
1499
 
@@ -1645,28 +1637,12 @@ Name of the repo as used in the URL.
1645
1637
 
1646
1638
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1647
1639
 
1648
- ### provider
1649
-
1650
- The owners provider.
1651
-
1652
- Returns **[BaseProvider](#baseprovider)**
1653
-
1654
1640
  ### identifier
1655
1641
 
1656
1642
  Short human readable identifier with provider and branch.
1657
1643
 
1658
1644
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1659
1645
 
1660
- ### equals
1661
-
1662
- Check for equality.
1663
-
1664
- #### Parameters
1665
-
1666
- * `other` **[Repository](#repository)**
1667
-
1668
- Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if name and provider are equal
1669
-
1670
1646
  ### entry
1671
1647
 
1672
1648
  Lookup entries form the head of the default branch.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "28.3.0",
3
+ "version": "28.3.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "ava": "^4.2.0",
37
37
  "c8": "^7.11.2",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^2.1.2",
39
+ "repository-provider-test-support": "^2.1.4",
40
40
  "semantic-release": "^19.0.2",
41
41
  "typescript": "^4.6.3"
42
42
  },
@@ -23,7 +23,11 @@ export class NamedObject extends BaseObject {
23
23
  * @return {boolean} true if names are equal and have the same owner
24
24
  */
25
25
  equals(other) {
26
- return super.equals(other) && this.fullName === other.fullName && this.provider.equals(other.provider);
26
+ return (
27
+ super.equals(other) &&
28
+ this.fullName === other.fullName &&
29
+ this.provider.equals(other.provider)
30
+ );
27
31
  }
28
32
 
29
33
  /**
@@ -37,11 +41,13 @@ export class NamedObject extends BaseObject {
37
41
  /**
38
42
  * @return {string} name with owner name
39
43
  */
40
- get fullName()
41
- {
44
+ get fullName() {
42
45
  return this.owner.name + "/" + this.name;
43
46
  }
44
47
 
48
+ /**
49
+ * @return {string} name
50
+ */
45
51
  toString() {
46
52
  return this.name;
47
53
  }