repository-provider 32.5.1 → 32.6.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 CHANGED
@@ -71,6 +71,8 @@ console.log(await readme.getString());
71
71
  * [priority\_attribute](#priority_attribute)
72
72
  * [BaseObject](#baseobject)
73
73
  * [Parameters](#parameters-8)
74
+ * [updateAttributes](#updateattributes)
75
+ * [Parameters](#parameters-9)
74
76
  * [update](#update)
75
77
  * [toString](#tostring)
76
78
  * [displayName](#displayname)
@@ -78,7 +80,7 @@ console.log(await readme.getString());
78
80
  * [fullCondensedName](#fullcondensedname)
79
81
  * [isWritable](#iswritable)
80
82
  * [equals](#equals)
81
- * [Parameters](#parameters-9)
83
+ * [Parameters](#parameters-10)
82
84
  * [type](#type)
83
85
  * [collectionName](#collectionname)
84
86
  * [attributes](#attributes)
@@ -89,36 +91,36 @@ console.log(await readme.getString());
89
91
  * [BaseProvider](#baseprovider)
90
92
  * [Properties](#properties-2)
91
93
  * [equals](#equals-1)
92
- * [Parameters](#parameters-10)
94
+ * [Parameters](#parameters-11)
93
95
  * [repositoryBases](#repositorybases)
94
96
  * [normalizeRepositoryName](#normalizerepositoryname)
95
- * [Parameters](#parameters-11)
96
- * [normalizeGroupName](#normalizegroupname)
97
97
  * [Parameters](#parameters-12)
98
+ * [normalizeGroupName](#normalizegroupname)
99
+ * [Parameters](#parameters-13)
98
100
  * [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
99
101
  * [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
100
102
  * [supportsBase](#supportsbase)
101
- * [Parameters](#parameters-13)
102
- * [parseName](#parsename)
103
103
  * [Parameters](#parameters-14)
104
- * [createRepository](#createrepository)
104
+ * [parseName](#parsename)
105
105
  * [Parameters](#parameters-15)
106
- * [list](#list)
106
+ * [createRepository](#createrepository)
107
107
  * [Parameters](#parameters-16)
108
- * [projects](#projects)
108
+ * [list](#list)
109
109
  * [Parameters](#parameters-17)
110
- * [milestones](#milestones)
110
+ * [projects](#projects)
111
111
  * [Parameters](#parameters-18)
112
- * [repositories](#repositories)
112
+ * [milestones](#milestones)
113
113
  * [Parameters](#parameters-19)
114
- * [branches](#branches)
114
+ * [repositories](#repositories)
115
115
  * [Parameters](#parameters-20)
116
- * [tags](#tags)
116
+ * [branches](#branches)
117
117
  * [Parameters](#parameters-21)
118
- * [hooks](#hooks)
118
+ * [tags](#tags)
119
119
  * [Parameters](#parameters-22)
120
- * [pullRequests](#pullrequests)
120
+ * [hooks](#hooks)
121
121
  * [Parameters](#parameters-23)
122
+ * [pullRequests](#pullrequests)
123
+ * [Parameters](#parameters-24)
122
124
  * [name](#name)
123
125
  * [provider](#provider)
124
126
  * [url](#url)
@@ -132,15 +134,15 @@ console.log(await readme.getString());
132
134
  * [pullRequestClass](#pullrequestclass)
133
135
  * [instanceIdentifier](#instanceidentifier)
134
136
  * [optionsFromEnvironment](#optionsfromenvironment)
135
- * [Parameters](#parameters-24)
136
- * [areOptionsSufficcient](#areoptionssufficcient)
137
137
  * [Parameters](#parameters-25)
138
- * [initialize](#initialize)
138
+ * [areOptionsSufficcient](#areoptionssufficcient)
139
139
  * [Parameters](#parameters-26)
140
+ * [initialize](#initialize)
141
+ * [Parameters](#parameters-27)
140
142
  * [name](#name-1)
141
143
  * [messageDestination](#messagedestination-1)
142
144
  * [Branch](#branch)
143
- * [Parameters](#parameters-27)
145
+ * [Parameters](#parameters-28)
144
146
  * [Properties](#properties-3)
145
147
  * [url](#url-1)
146
148
  * [refType](#reftype)
@@ -148,62 +150,61 @@ console.log(await readme.getString());
148
150
  * [isDefault](#isdefault)
149
151
  * [delete](#delete)
150
152
  * [commit](#commit)
151
- * [Parameters](#parameters-28)
152
- * [commitIntoPullRequest](#commitintopullrequest)
153
153
  * [Parameters](#parameters-29)
154
- * [removeEntries](#removeentries)
154
+ * [commitIntoPullRequest](#commitintopullrequest)
155
155
  * [Parameters](#parameters-30)
156
- * [createPullRequest](#createpullrequest)
156
+ * [removeEntries](#removeentries)
157
157
  * [Parameters](#parameters-31)
158
- * [createBranch](#createbranch)
158
+ * [createPullRequest](#createpullrequest)
159
159
  * [Parameters](#parameters-32)
160
+ * [createBranch](#createbranch)
161
+ * [Parameters](#parameters-33)
160
162
  * [CommitResult](#commitresult)
161
163
  * [Properties](#properties-4)
162
164
  * [Commit](#commit-1)
163
- * [Parameters](#parameters-33)
165
+ * [Parameters](#parameters-34)
164
166
  * [Properties](#properties-5)
165
167
  * [Hook](#hook)
166
168
  * [Issue](#issue)
167
169
  * [Milestone](#milestone)
168
170
  * [MultiGroupProvider](#multigroupprovider)
169
171
  * [repository](#repository)
170
- * [Parameters](#parameters-34)
171
- * [branch](#branch-1)
172
172
  * [Parameters](#parameters-35)
173
- * [repositoryGroup](#repositorygroup)
173
+ * [branch](#branch-1)
174
174
  * [Parameters](#parameters-36)
175
- * [repositoryGroups](#repositorygroups)
175
+ * [repositoryGroup](#repositorygroup)
176
176
  * [Parameters](#parameters-37)
177
- * [createRepositoryGroup](#createrepositorygroup)
177
+ * [repositoryGroups](#repositorygroups)
178
178
  * [Parameters](#parameters-38)
179
- * [addRepositoryGroup](#addrepositorygroup)
179
+ * [createRepositoryGroup](#createrepositorygroup)
180
180
  * [Parameters](#parameters-39)
181
+ * [addRepositoryGroup](#addrepositorygroup)
182
+ * [Parameters](#parameters-40)
181
183
  * [NamedObject](#namedobject)
182
- * [Parameters](#parameters-40)
184
+ * [Parameters](#parameters-41)
183
185
  * [Properties](#properties-6)
184
186
  * [equals](#equals-2)
185
- * [Parameters](#parameters-41)
187
+ * [Parameters](#parameters-42)
186
188
  * [toJSON](#tojson-1)
187
- * [attributes](#attributes-1)
188
189
  * [OwnedObject](#ownedobject)
189
- * [Parameters](#parameters-42)
190
+ * [Parameters](#parameters-43)
190
191
  * [delete](#delete-1)
191
192
  * [equals](#equals-3)
192
- * [Parameters](#parameters-43)
193
+ * [Parameters](#parameters-44)
193
194
  * [api](#api)
194
195
  * [provider](#provider-1)
195
196
  * [identifier](#identifier)
196
197
  * [fullName](#fullname-1)
197
198
  * [trace](#trace)
198
- * [Parameters](#parameters-44)
199
- * [info](#info)
200
199
  * [Parameters](#parameters-45)
201
- * [warn](#warn)
200
+ * [info](#info)
202
201
  * [Parameters](#parameters-46)
203
- * [error](#error)
202
+ * [warn](#warn)
204
203
  * [Parameters](#parameters-47)
205
- * [debug](#debug)
204
+ * [error](#error)
206
205
  * [Parameters](#parameters-48)
206
+ * [debug](#debug)
207
+ * [Parameters](#parameters-49)
207
208
  * [repositoryClass](#repositoryclass-1)
208
209
  * [pullRequestClass](#pullrequestclass-1)
209
210
  * [branchClass](#branchclass-1)
@@ -211,25 +212,26 @@ console.log(await readme.getString());
211
212
  * [entryClass](#entryclass-1)
212
213
  * [hookClass](#hookclass-1)
213
214
  * [addMethodName](#addmethodname)
215
+ * [deleteMethodName](#deletemethodname)
214
216
  * [Project](#project)
215
217
  * [PullRequest](#pullrequest)
216
- * [Parameters](#parameters-49)
218
+ * [Parameters](#parameters-50)
217
219
  * [Properties](#properties-7)
218
220
  * [fullName](#fullname-2)
219
221
  * [url](#url-2)
220
222
  * [repository](#repository-1)
221
223
  * [delete](#delete-2)
222
224
  * [merge](#merge)
223
- * [Parameters](#parameters-50)
225
+ * [Parameters](#parameters-51)
224
226
  * [decline](#decline)
225
227
  * [reviews](#reviews)
226
228
  * [identifier](#identifier-1)
227
229
  * [defaultListStates](#defaultliststates)
228
230
  * [validMergeMethods](#validmergemethods)
229
231
  * [list](#list-1)
230
- * [Parameters](#parameters-51)
231
- * [open](#open)
232
232
  * [Parameters](#parameters-52)
233
+ * [open](#open)
234
+ * [Parameters](#parameters-53)
233
235
  * [state](#state)
234
236
  * [locked](#locked)
235
237
  * [merged](#merged)
@@ -240,12 +242,12 @@ console.log(await readme.getString());
240
242
  * [ref](#ref-1)
241
243
  * [refId](#refid)
242
244
  * [entries](#entries)
243
- * [Parameters](#parameters-53)
245
+ * [Parameters](#parameters-54)
244
246
  * [asyncIterator](#asynciterator)
245
247
  * [maybeEntry](#maybeentry)
246
- * [Parameters](#parameters-54)
247
- * [entry](#entry)
248
248
  * [Parameters](#parameters-55)
249
+ * [entry](#entry)
250
+ * [Parameters](#parameters-56)
249
251
  * [repository](#repository-2)
250
252
  * [fullName](#fullname-3)
251
253
  * [fullCondensedName](#fullcondensedname-1)
@@ -256,29 +258,29 @@ console.log(await readme.getString());
256
258
  * [isArchived](#isarchived)
257
259
  * [isDisabled](#isdisabled)
258
260
  * [isProtected](#isprotected)
259
- * [attributes](#attributes-2)
261
+ * [attributes](#attributes-1)
260
262
  * [isProtected](#isprotected-1)
261
263
  * [RepositoryGroup](#repositorygroup-1)
262
- * [Parameters](#parameters-56)
264
+ * [Parameters](#parameters-57)
263
265
  * [Properties](#properties-9)
264
266
  * [attributeMapping](#attributemapping-1)
265
267
  * [type](#type-1)
266
268
  * [homePageURL](#homepageurl-1)
267
269
  * [RepositoryOwner](#repositoryowner)
268
- * [Parameters](#parameters-57)
269
- * [Repository](#repository-3)
270
270
  * [Parameters](#parameters-58)
271
+ * [Repository](#repository-3)
272
+ * [Parameters](#parameters-59)
271
273
  * [Properties](#properties-10)
272
274
  * [fullName](#fullname-4)
273
275
  * [slug](#slug)
274
276
  * [entry](#entry-1)
275
- * [Parameters](#parameters-59)
276
- * [entries](#entries-1)
277
277
  * [Parameters](#parameters-60)
278
- * [maybeEntry](#maybeentry-1)
278
+ * [entries](#entries-1)
279
279
  * [Parameters](#parameters-61)
280
- * [commits](#commits)
280
+ * [maybeEntry](#maybeentry-1)
281
281
  * [Parameters](#parameters-62)
282
+ * [commits](#commits)
283
+ * [Parameters](#parameters-63)
282
284
  * [cloneURL](#cloneurl)
283
285
  * [issuesURL](#issuesurl-1)
284
286
  * [homePageURL](#homepageurl-2)
@@ -289,62 +291,61 @@ console.log(await readme.getString());
289
291
  * [delete](#delete-3)
290
292
  * [defaultBranch](#defaultbranch)
291
293
  * [branch](#branch-2)
292
- * [Parameters](#parameters-63)
294
+ * [Parameters](#parameters-64)
293
295
  * [hasBranches](#hasbranches)
294
296
  * [branches](#branches-1)
295
- * [Parameters](#parameters-64)
296
- * [createBranch](#createbranch-1)
297
297
  * [Parameters](#parameters-65)
298
- * [addBranch](#addbranch)
298
+ * [createBranch](#createbranch-1)
299
299
  * [Parameters](#parameters-66)
300
- * [deleteBranch](#deletebranch)
300
+ * [addBranch](#addbranch)
301
301
  * [Parameters](#parameters-67)
302
- * [tag](#tag)
302
+ * [deleteBranch](#deletebranch)
303
303
  * [Parameters](#parameters-68)
304
- * [tags](#tags-1)
304
+ * [tag](#tag)
305
305
  * [Parameters](#parameters-69)
306
- * [addTag](#addtag)
306
+ * [tags](#tags-1)
307
307
  * [Parameters](#parameters-70)
308
- * [createPullRequest](#createpullrequest-1)
308
+ * [addTag](#addtag)
309
309
  * [Parameters](#parameters-71)
310
- * [addPullRequest](#addpullrequest)
310
+ * [createPullRequest](#createpullrequest-1)
311
311
  * [Parameters](#parameters-72)
312
+ * [addPullRequest](#addpullrequest)
313
+ * [Parameters](#parameters-73)
312
314
  * [pullRequests](#pullrequests-1)
313
315
  * [pullRequest](#pullrequest-1)
314
- * [Parameters](#parameters-73)
315
- * [deletePullRequest](#deletepullrequest)
316
316
  * [Parameters](#parameters-74)
317
- * [addHook](#addhook)
317
+ * [deletePullRequest](#deletepullrequest)
318
318
  * [Parameters](#parameters-75)
319
- * [createHook](#createhook)
319
+ * [addHook](#addhook)
320
320
  * [Parameters](#parameters-76)
321
+ * [createHook](#createhook)
322
+ * [Parameters](#parameters-77)
321
323
  * [hooks](#hooks-1)
322
324
  * [hook](#hook-1)
323
- * [Parameters](#parameters-77)
325
+ * [Parameters](#parameters-78)
324
326
  * [type](#type-2)
325
327
  * [refId](#refid-1)
326
- * [Parameters](#parameters-78)
327
- * [attributes](#attributes-3)
328
+ * [Parameters](#parameters-79)
329
+ * [attributes](#attributes-2)
328
330
  * [defaultBranchName](#defaultbranchname)
329
- * [issuesURL](#issuesurl-2)
330
331
  * [Review](#review)
331
332
  * [SingleGroupProvider](#singlegroupprovider)
332
333
  * [repository](#repository-4)
333
- * [Parameters](#parameters-79)
334
- * [repositoryGroup](#repositorygroup-2)
335
334
  * [Parameters](#parameters-80)
336
- * [repositoryGroups](#repositorygroups-1)
335
+ * [repositoryGroup](#repositorygroup-2)
337
336
  * [Parameters](#parameters-81)
337
+ * [repositoryGroups](#repositorygroups-1)
338
+ * [Parameters](#parameters-82)
338
339
  * [Tag](#tag-1)
339
340
  * [refType](#reftype-1)
340
341
  * [asArray](#asarray)
341
- * [Parameters](#parameters-82)
342
- * [stripBaseName](#stripbasename)
343
342
  * [Parameters](#parameters-83)
344
- * [stripBaseNames](#stripbasenames)
343
+ * [stripBaseName](#stripbasename)
345
344
  * [Parameters](#parameters-84)
346
- * [generateBranchName](#generatebranchname)
345
+ * [stripBaseNames](#stripbasenames)
347
346
  * [Parameters](#parameters-85)
347
+ * [generateBranchName](#generatebranchname)
348
+ * [Parameters](#parameters-86)
348
349
 
349
350
  ## Application
350
351
 
@@ -508,6 +509,15 @@ this defines the order
508
509
  * `options` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
509
510
  * `additionalProperties` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
510
511
 
512
+ ### updateAttributes
513
+
514
+ Takes values from options.
515
+
516
+ #### Parameters
517
+
518
+ * `options` **[object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
519
+ * `additionalProperties`  
520
+
511
521
  ### update
512
522
 
513
523
  Save object attributes in the backing store.
@@ -586,6 +596,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
586
596
  ### Properties
587
597
 
588
598
  * `info` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
599
+ * `debug` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
589
600
  * `warn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
590
601
  * `error` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
591
602
  * `trace` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** 
@@ -1109,10 +1120,6 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1109
1120
 
1110
1121
  Provided name and all defined attributes.
1111
1122
 
1112
- ### attributes
1113
-
1114
- options
1115
-
1116
1123
  ## OwnedObject
1117
1124
 
1118
1125
  **Extends NamedObject**
@@ -1245,6 +1252,13 @@ sample: Application => \_addApplication
1245
1252
 
1246
1253
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
1247
1254
 
1255
+ ### deleteMethodName
1256
+
1257
+ Method name to be called to unregister one instance in the owner.
1258
+ sample: Application => \_deleteApplication
1259
+
1260
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
1261
+
1248
1262
  ## Project
1249
1263
 
1250
1264
  **Extends OwnedObject**
@@ -1743,7 +1757,7 @@ Internal branch creation does not call repository.initialize()
1743
1757
  #### Parameters
1744
1758
 
1745
1759
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of the new branch
1746
- * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
1760
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to be passed to the branch
1747
1761
 
1748
1762
  Returns **[Branch](#branch)** newly created branch
1749
1763
 
@@ -1898,12 +1912,6 @@ The name of the default branch
1898
1912
 
1899
1913
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
1900
1914
 
1901
- ## issuesURL
1902
-
1903
- The url of issue tracking system.
1904
-
1905
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
1906
-
1907
1915
  ## Review
1908
1916
 
1909
1917
  **Extends OwnedObject**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "32.5.1",
3
+ "version": "32.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,11 +35,11 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "ava": "^5.1.0",
38
- "browser-ava": "^1.3.15",
38
+ "browser-ava": "^1.3.17",
39
39
  "c8": "^7.12.0",
40
40
  "documentation": "^14.0.1",
41
41
  "repository-provider-test-support": "^2.2.32",
42
- "semantic-release": "^19.0.5",
42
+ "semantic-release": "^20.0.2",
43
43
  "typescript": "^4.9.4"
44
44
  },
45
45
  "engines": {
@@ -18,6 +18,7 @@ export const secret_attribute = {
18
18
  private: true,
19
19
  writable: true
20
20
  };
21
+ export const count_attribute = { type: "integer" };
21
22
  export const size_attribute = { type: "integer", mandatory: false };
22
23
  export const name_attribute = {
23
24
  type: "string",
@@ -52,6 +52,14 @@ export class OwnedObject extends NamedObject {
52
52
  return this.owner.api;
53
53
  }
54
54
 
55
+ /**
56
+ * URL as given by the owner.
57
+ * @return {string} url
58
+ */
59
+ get url() {
60
+ return this.owner.url;
61
+ }
62
+
55
63
  /**
56
64
  * The provider we live in.
57
65
  * @return {BaseProvider}
@@ -177,8 +177,7 @@ export class PullRequest extends OwnedObject {
177
177
  * @return {string} url
178
178
  */
179
179
  get url() {
180
- // TODO repo url
181
- return `${this.provider.url}${this.repository.fullName}/pull/${this.name}`;
180
+ return `${this.repository.url}/pull/${this.name}`;
182
181
  }
183
182
 
184
183
  get number() {