repository-provider 34.0.2 → 34.1.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2023 by arlac77
1
+ Copyright (c) 2017-2024 by arlac77
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
package/README.md CHANGED
@@ -56,16 +56,6 @@ console.log(await readme.string);
56
56
  * [Parameters](#parameters-3)
57
57
  * [mapAttributesInverse](#mapattributesinverse)
58
58
  * [Parameters](#parameters-4)
59
- * [AttributeDefinition](#attributedefinition)
60
- * [Properties](#properties)
61
- * [tokens](#tokens)
62
- * [Parameters](#parameters-5)
63
- * [setAttribute](#setattribute)
64
- * [Parameters](#parameters-6)
65
- * [getAttribute](#getattribute)
66
- * [Parameters](#parameters-7)
67
- * [getAttributeAndOperator](#getattributeandoperator)
68
- * [Parameters](#parameters-8)
69
59
  * [default\_attribute](#default_attribute)
70
60
  * [description\_attribute](#description_attribute)
71
61
  * [id\_attribute](#id_attribute)
@@ -73,9 +63,9 @@ console.log(await readme.string);
73
63
  * [title\_attribute](#title_attribute)
74
64
  * [priority\_attribute](#priority_attribute)
75
65
  * [BaseObject](#baseobject)
76
- * [Parameters](#parameters-9)
66
+ * [Parameters](#parameters-5)
77
67
  * [updateAttributes](#updateattributes)
78
- * [Parameters](#parameters-10)
68
+ * [Parameters](#parameters-6)
79
69
  * [update](#update)
80
70
  * [toString](#tostring)
81
71
  * [displayName](#displayname)
@@ -84,47 +74,47 @@ console.log(await readme.string);
84
74
  * [condensedName](#condensedname)
85
75
  * [isWritable](#iswritable)
86
76
  * [equals](#equals)
87
- * [Parameters](#parameters-11)
77
+ * [Parameters](#parameters-7)
88
78
  * [type](#type)
89
79
  * [collectionName](#collectionname)
90
80
  * [attributes](#attributes)
91
81
  * [writableAttributes](#writableattributes)
92
82
  * [attributeMapping](#attributemapping)
93
83
  * [MessageDestination](#messagedestination)
94
- * [Properties](#properties-1)
84
+ * [Properties](#properties)
95
85
  * [BaseProvider](#baseprovider)
96
- * [Properties](#properties-2)
86
+ * [Properties](#properties-1)
97
87
  * [equals](#equals-1)
98
- * [Parameters](#parameters-12)
88
+ * [Parameters](#parameters-8)
99
89
  * [repositoryBases](#repositorybases)
100
90
  * [supportsBase](#supportsbase)
101
- * [Parameters](#parameters-13)
91
+ * [Parameters](#parameters-9)
102
92
  * [normalizeRepositoryName](#normalizerepositoryname)
103
- * [Parameters](#parameters-14)
93
+ * [Parameters](#parameters-10)
104
94
  * [normalizeGroupName](#normalizegroupname)
105
- * [Parameters](#parameters-15)
95
+ * [Parameters](#parameters-11)
106
96
  * [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
107
97
  * [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
108
98
  * [parseName](#parsename)
109
- * [Parameters](#parameters-16)
99
+ * [Parameters](#parameters-12)
110
100
  * [createRepository](#createrepository)
111
- * [Parameters](#parameters-17)
101
+ * [Parameters](#parameters-13)
112
102
  * [list](#list)
113
- * [Parameters](#parameters-18)
103
+ * [Parameters](#parameters-14)
114
104
  * [projects](#projects)
115
- * [Parameters](#parameters-19)
105
+ * [Parameters](#parameters-15)
116
106
  * [milestones](#milestones)
117
- * [Parameters](#parameters-20)
107
+ * [Parameters](#parameters-16)
118
108
  * [repositories](#repositories)
119
- * [Parameters](#parameters-21)
109
+ * [Parameters](#parameters-17)
120
110
  * [branches](#branches)
121
- * [Parameters](#parameters-22)
111
+ * [Parameters](#parameters-18)
122
112
  * [tags](#tags)
123
- * [Parameters](#parameters-23)
113
+ * [Parameters](#parameters-19)
124
114
  * [hooks](#hooks)
125
- * [Parameters](#parameters-24)
115
+ * [Parameters](#parameters-20)
126
116
  * [pullRequests](#pullrequests)
127
- * [Parameters](#parameters-25)
117
+ * [Parameters](#parameters-21)
128
118
  * [name](#name)
129
119
  * [provider](#provider)
130
120
  * [toJSON](#tojson)
@@ -137,63 +127,63 @@ console.log(await readme.string);
137
127
  * [pullRequestClass](#pullrequestclass)
138
128
  * [instanceIdentifier](#instanceidentifier)
139
129
  * [optionsFromEnvironment](#optionsfromenvironment)
140
- * [Parameters](#parameters-26)
130
+ * [Parameters](#parameters-22)
141
131
  * [areOptionsSufficcient](#areoptionssufficcient)
142
- * [Parameters](#parameters-27)
132
+ * [Parameters](#parameters-23)
143
133
  * [initialize](#initialize)
144
- * [Parameters](#parameters-28)
134
+ * [Parameters](#parameters-24)
145
135
  * [name](#name-1)
146
136
  * [messageDestination](#messagedestination-1)
147
137
  * [Branch](#branch)
148
- * [Parameters](#parameters-29)
149
- * [Properties](#properties-3)
138
+ * [Parameters](#parameters-25)
139
+ * [Properties](#properties-2)
150
140
  * [url](#url)
151
141
  * [refType](#reftype)
152
142
  * [isWritable](#iswritable-1)
153
143
  * [isDefault](#isdefault)
154
144
  * [delete](#delete)
155
145
  * [commit](#commit)
156
- * [Parameters](#parameters-30)
146
+ * [Parameters](#parameters-26)
157
147
  * [commitIntoPullRequest](#commitintopullrequest)
158
- * [Parameters](#parameters-31)
148
+ * [Parameters](#parameters-27)
159
149
  * [removeEntries](#removeentries)
160
- * [Parameters](#parameters-32)
150
+ * [Parameters](#parameters-28)
161
151
  * [createPullRequest](#createpullrequest)
162
- * [Parameters](#parameters-33)
152
+ * [Parameters](#parameters-29)
163
153
  * [createBranch](#createbranch)
164
- * [Parameters](#parameters-34)
154
+ * [Parameters](#parameters-30)
165
155
  * [CommitResult](#commitresult)
166
- * [Properties](#properties-4)
156
+ * [Properties](#properties-3)
167
157
  * [Commit](#commit-1)
168
- * [Parameters](#parameters-35)
169
- * [Properties](#properties-5)
158
+ * [Parameters](#parameters-31)
159
+ * [Properties](#properties-4)
170
160
  * [Hook](#hook)
171
161
  * [Issue](#issue)
172
162
  * [Milestone](#milestone)
173
163
  * [MultiGroupProvider](#multigroupprovider)
174
164
  * [repository](#repository)
175
- * [Parameters](#parameters-36)
165
+ * [Parameters](#parameters-32)
176
166
  * [branch](#branch-1)
177
- * [Parameters](#parameters-37)
167
+ * [Parameters](#parameters-33)
178
168
  * [repositoryGroup](#repositorygroup)
179
- * [Parameters](#parameters-38)
169
+ * [Parameters](#parameters-34)
180
170
  * [repositoryGroups](#repositorygroups)
181
- * [Parameters](#parameters-39)
171
+ * [Parameters](#parameters-35)
182
172
  * [createRepositoryGroup](#createrepositorygroup)
183
- * [Parameters](#parameters-40)
173
+ * [Parameters](#parameters-36)
184
174
  * [addRepositoryGroup](#addrepositorygroup)
185
- * [Parameters](#parameters-41)
175
+ * [Parameters](#parameters-37)
186
176
  * [NamedObject](#namedobject)
187
- * [Parameters](#parameters-42)
188
- * [Properties](#properties-6)
177
+ * [Parameters](#parameters-38)
178
+ * [Properties](#properties-5)
189
179
  * [equals](#equals-2)
190
- * [Parameters](#parameters-43)
180
+ * [Parameters](#parameters-39)
191
181
  * [toJSON](#tojson-1)
192
182
  * [OwnedObject](#ownedobject)
193
- * [Parameters](#parameters-44)
183
+ * [Parameters](#parameters-40)
194
184
  * [delete](#delete-1)
195
185
  * [equals](#equals-3)
196
- * [Parameters](#parameters-45)
186
+ * [Parameters](#parameters-41)
197
187
  * [homePageURL](#homepageurl)
198
188
  * [issuesURL](#issuesurl)
199
189
  * [isLocked](#islocked)
@@ -206,15 +196,15 @@ console.log(await readme.string);
206
196
  * [identifier](#identifier)
207
197
  * [fullName](#fullname-1)
208
198
  * [trace](#trace)
209
- * [Parameters](#parameters-46)
199
+ * [Parameters](#parameters-42)
210
200
  * [info](#info)
211
- * [Parameters](#parameters-47)
201
+ * [Parameters](#parameters-43)
212
202
  * [warn](#warn)
213
- * [Parameters](#parameters-48)
203
+ * [Parameters](#parameters-44)
214
204
  * [error](#error)
215
- * [Parameters](#parameters-49)
205
+ * [Parameters](#parameters-45)
216
206
  * [debug](#debug)
217
- * [Parameters](#parameters-50)
207
+ * [Parameters](#parameters-46)
218
208
  * [repositoryClass](#repositoryclass-1)
219
209
  * [pullRequestClass](#pullrequestclass-1)
220
210
  * [branchClass](#branchclass-1)
@@ -225,14 +215,14 @@ console.log(await readme.string);
225
215
  * [deleteMethodName](#deletemethodname)
226
216
  * [Project](#project)
227
217
  * [PullRequest](#pullrequest)
228
- * [Parameters](#parameters-51)
229
- * [Properties](#properties-7)
218
+ * [Parameters](#parameters-47)
219
+ * [Properties](#properties-6)
230
220
  * [fullName](#fullname-2)
231
221
  * [url](#url-2)
232
222
  * [repository](#repository-1)
233
223
  * [delete](#delete-2)
234
224
  * [merge](#merge)
235
- * [Parameters](#parameters-52)
225
+ * [Parameters](#parameters-48)
236
226
  * [decline](#decline)
237
227
  * [reviews](#reviews)
238
228
  * [identifier](#identifier-1)
@@ -240,25 +230,25 @@ console.log(await readme.string);
240
230
  * [states](#states)
241
231
  * [validMergeMethods](#validmergemethods)
242
232
  * [list](#list-1)
243
- * [Parameters](#parameters-53)
233
+ * [Parameters](#parameters-49)
244
234
  * [open](#open)
245
- * [Parameters](#parameters-54)
235
+ * [Parameters](#parameters-50)
246
236
  * [state](#state)
247
237
  * [locked](#locked)
248
238
  * [merged](#merged)
249
239
  * [draft](#draft)
250
240
  * [ContentEntry](#contententry)
251
- * [Properties](#properties-8)
241
+ * [Properties](#properties-7)
252
242
  * [Ref](#ref)
253
243
  * [ref](#ref-1)
254
244
  * [refId](#refid)
255
245
  * [entries](#entries)
256
- * [Parameters](#parameters-55)
246
+ * [Parameters](#parameters-51)
257
247
  * [asyncIterator](#asynciterator)
258
248
  * [maybeEntry](#maybeentry)
259
- * [Parameters](#parameters-56)
249
+ * [Parameters](#parameters-52)
260
250
  * [entry](#entry)
261
- * [Parameters](#parameters-57)
251
+ * [Parameters](#parameters-53)
262
252
  * [repository](#repository-2)
263
253
  * [fullName](#fullname-3)
264
254
  * [fullCondensedName](#fullcondensedname-1)
@@ -267,25 +257,25 @@ console.log(await readme.string);
267
257
  * [attributes](#attributes-1)
268
258
  * [isProtected](#isprotected-1)
269
259
  * [RepositoryGroup](#repositorygroup-1)
270
- * [Parameters](#parameters-58)
271
- * [Properties](#properties-9)
260
+ * [Parameters](#parameters-54)
261
+ * [Properties](#properties-8)
272
262
  * [attributeMapping](#attributemapping-1)
273
263
  * [type](#type-1)
274
264
  * [homePageURL](#homepageurl-1)
275
265
  * [RepositoryOwner](#repositoryowner)
276
- * [Parameters](#parameters-59)
266
+ * [Parameters](#parameters-55)
277
267
  * [Repository](#repository-3)
278
- * [Parameters](#parameters-60)
279
- * [Properties](#properties-10)
268
+ * [Parameters](#parameters-56)
269
+ * [Properties](#properties-9)
280
270
  * [slug](#slug-1)
281
271
  * [entry](#entry-1)
282
- * [Parameters](#parameters-61)
272
+ * [Parameters](#parameters-57)
283
273
  * [entries](#entries-1)
284
- * [Parameters](#parameters-62)
274
+ * [Parameters](#parameters-58)
285
275
  * [maybeEntry](#maybeentry-1)
286
- * [Parameters](#parameters-63)
276
+ * [Parameters](#parameters-59)
287
277
  * [commits](#commits)
288
- * [Parameters](#parameters-64)
278
+ * [Parameters](#parameters-60)
289
279
  * [cloneURL](#cloneurl)
290
280
  * [issuesURL](#issuesurl-1)
291
281
  * [homePageURL](#homepageurl-2)
@@ -296,67 +286,67 @@ console.log(await readme.string);
296
286
  * [delete](#delete-3)
297
287
  * [defaultBranch](#defaultbranch)
298
288
  * [branch](#branch-2)
299
- * [Parameters](#parameters-65)
289
+ * [Parameters](#parameters-61)
300
290
  * [hasBranches](#hasbranches)
301
291
  * [branches](#branches-1)
302
- * [Parameters](#parameters-66)
292
+ * [Parameters](#parameters-62)
303
293
  * [createBranch](#createbranch-1)
304
- * [Parameters](#parameters-67)
294
+ * [Parameters](#parameters-63)
305
295
  * [addBranch](#addbranch)
306
- * [Parameters](#parameters-68)
296
+ * [Parameters](#parameters-64)
307
297
  * [deleteBranch](#deletebranch)
308
- * [Parameters](#parameters-69)
298
+ * [Parameters](#parameters-65)
309
299
  * [tag](#tag)
310
- * [Parameters](#parameters-70)
300
+ * [Parameters](#parameters-66)
311
301
  * [tags](#tags-1)
312
- * [Parameters](#parameters-71)
302
+ * [Parameters](#parameters-67)
313
303
  * [addTag](#addtag)
314
- * [Parameters](#parameters-72)
304
+ * [Parameters](#parameters-68)
315
305
  * [createPullRequest](#createpullrequest-1)
316
- * [Parameters](#parameters-73)
306
+ * [Parameters](#parameters-69)
317
307
  * [addPullRequest](#addpullrequest)
318
- * [Parameters](#parameters-74)
308
+ * [Parameters](#parameters-70)
319
309
  * [pullRequests](#pullrequests-1)
320
310
  * [pullRequest](#pullrequest-1)
321
- * [Parameters](#parameters-75)
311
+ * [Parameters](#parameters-71)
322
312
  * [deletePullRequest](#deletepullrequest)
323
- * [Parameters](#parameters-76)
313
+ * [Parameters](#parameters-72)
324
314
  * [addHook](#addhook)
325
- * [Parameters](#parameters-77)
315
+ * [Parameters](#parameters-73)
326
316
  * [createHook](#createhook)
327
- * [Parameters](#parameters-78)
317
+ * [Parameters](#parameters-74)
328
318
  * [hooks](#hooks-1)
329
319
  * [hook](#hook-1)
330
- * [Parameters](#parameters-79)
320
+ * [Parameters](#parameters-75)
331
321
  * [milestone](#milestone-1)
332
- * [Parameters](#parameters-80)
322
+ * [Parameters](#parameters-76)
333
323
  * [project](#project-1)
334
- * [Parameters](#parameters-81)
324
+ * [Parameters](#parameters-77)
335
325
  * [application](#application-1)
336
- * [Parameters](#parameters-82)
326
+ * [Parameters](#parameters-78)
337
327
  * [type](#type-2)
338
328
  * [refId](#refid-1)
339
- * [Parameters](#parameters-83)
329
+ * [Parameters](#parameters-79)
340
330
  * [attributes](#attributes-2)
341
331
  * [defaultBranchName](#defaultbranchname)
342
332
  * [Review](#review)
343
333
  * [SingleGroupProvider](#singlegroupprovider)
344
334
  * [repository](#repository-4)
345
- * [Parameters](#parameters-84)
335
+ * [Parameters](#parameters-80)
346
336
  * [repositoryGroup](#repositorygroup-2)
347
- * [Parameters](#parameters-85)
337
+ * [Parameters](#parameters-81)
348
338
  * [repositoryGroups](#repositorygroups-1)
349
- * [Parameters](#parameters-86)
339
+ * [Parameters](#parameters-82)
350
340
  * [Tag](#tag-1)
351
341
  * [refType](#reftype-1)
352
342
  * [asArray](#asarray)
353
- * [Parameters](#parameters-87)
343
+ * [Parameters](#parameters-83)
354
344
  * [stripBaseName](#stripbasename)
355
- * [Parameters](#parameters-88)
345
+ * [Parameters](#parameters-84)
356
346
  * [stripBaseNames](#stripbasenames)
357
- * [Parameters](#parameters-89)
347
+ * [Parameters](#parameters-85)
358
348
  * [generateBranchName](#generatebranchname)
359
- * [Parameters](#parameters-90)
349
+ * [Parameters](#parameters-86)
360
350
 
361
351
  ## Application
362
352
 
@@ -443,67 +433,6 @@ Filters out null, undefined and empty strings
443
433
 
444
434
  Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** keys renamed after mapping
445
435
 
446
- ## AttributeDefinition
447
-
448
- Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
449
-
450
- ### Properties
451
-
452
- * `type` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
453
- * `writable` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** 
454
- * `private` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)?** should the value be shown
455
- * `depends` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of an attribute we depend on
456
- * `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
457
- * `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
458
- * `default` **any?** the default value
459
- * `set` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** set the value
460
- * `get` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)?** get the value can be used to calculate default values
461
- * `env` **([Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)> | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))?** environment variable use to provide the value
462
-
463
- ## tokens
464
-
465
- Split property path into tokens
466
-
467
- ### Parameters
468
-
469
- * `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
470
-
471
- ## setAttribute
472
-
473
- Set Object attribute.
474
- The name may be a property path like 'a.b.c'.
475
-
476
- ### Parameters
477
-
478
- * `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
479
- * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
480
- * `value` **any**&#x20;
481
-
482
- ## getAttribute
483
-
484
- Deliver attribute value.
485
- The name may be a property path like 'a.b.c' or a\[2]
486
-
487
- ### Parameters
488
-
489
- * `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
490
- * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
491
-
492
- Returns **any** value associated with the given property name
493
-
494
- ## getAttributeAndOperator
495
-
496
- Deliver attribute value and operator.
497
- The name may be a property path like 'a.b.c <='.
498
-
499
- ### Parameters
500
-
501
- * `object` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
502
- * `expression` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
503
- * `getters` (optional, default `{}`)
504
-
505
- Returns **\[any, [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)]** value associated with the given property name
506
-
507
436
  ## default\_attribute
508
437
 
509
438
  common attributes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "34.0.2",
3
+ "version": "34.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -31,19 +31,19 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "matching-iterator": "^2.0.12",
34
- "pacc": "^2.1.4"
34
+ "pacc": "^2.1.5"
35
35
  },
36
36
  "devDependencies": {
37
- "ava": "^5.3.1",
38
- "browser-ava": "^2.1.0",
39
- "c8": "^8.0.1",
37
+ "ava": "^6.0.1",
38
+ "browser-ava": "^2.1.7",
39
+ "c8": "^9.0.0",
40
40
  "documentation": "^14.0.2",
41
41
  "repository-provider-test-support": "^3.0.1",
42
- "semantic-release": "^22.0.7",
43
- "typescript": "^5.2.2"
42
+ "semantic-release": "^22.0.12",
43
+ "typescript": "^5.3.3"
44
44
  },
45
45
  "engines": {
46
- "node": ">=20.9.0"
46
+ "node": ">=20.10.0"
47
47
  },
48
48
  "repository": {
49
49
  "type": "git",
package/src/branch.mjs CHANGED
@@ -149,10 +149,10 @@ export class Branch extends Ref {
149
149
  }
150
150
 
151
151
  if (options.bodyFromCommitMessages) {
152
- options.body = body;
152
+ options.body = options.body ? options.body + '\n' + body : body;
153
153
  }
154
154
 
155
- if (body.length > 0 && !options.skipWithoutCommits) {
155
+ if (options.body?.length > 0 && !options.skipWithoutCommits) {
156
156
  return prBranch.createPullRequest(this, options);
157
157
  } else {
158
158
  return new PullRequest(