repository-provider 28.0.0 → 28.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/README.md CHANGED
@@ -90,40 +90,40 @@ console.log(await readme.getString());
90
90
  * [avatarURL](#avatarurl)
91
91
  * [homePageURL](#homepageurl)
92
92
  * [MessageDestination](#messagedestination)
93
- * [Parameters](#parameters-13)
94
- * [BaseProvider](#baseprovider)
95
93
  * [Properties](#properties-1)
94
+ * [BaseProvider](#baseprovider)
95
+ * [Properties](#properties-2)
96
96
  * [equals](#equals-1)
97
- * [Parameters](#parameters-14)
97
+ * [Parameters](#parameters-13)
98
98
  * [repositoryBases](#repositorybases)
99
99
  * [normalizeRepositoryName](#normalizerepositoryname)
100
- * [Parameters](#parameters-15)
100
+ * [Parameters](#parameters-14)
101
101
  * [normalizeGroupName](#normalizegroupname)
102
- * [Parameters](#parameters-16)
102
+ * [Parameters](#parameters-15)
103
103
  * [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
104
104
  * [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
105
105
  * [supportsBase](#supportsbase)
106
- * [Parameters](#parameters-17)
106
+ * [Parameters](#parameters-16)
107
107
  * [parseName](#parsename)
108
- * [Parameters](#parameters-18)
108
+ * [Parameters](#parameters-17)
109
109
  * [createRepository](#createrepository)
110
- * [Parameters](#parameters-19)
110
+ * [Parameters](#parameters-18)
111
111
  * [list](#list)
112
- * [Parameters](#parameters-20)
112
+ * [Parameters](#parameters-19)
113
113
  * [projects](#projects)
114
- * [Parameters](#parameters-21)
114
+ * [Parameters](#parameters-20)
115
115
  * [milestones](#milestones)
116
- * [Parameters](#parameters-22)
116
+ * [Parameters](#parameters-21)
117
117
  * [repositories](#repositories)
118
- * [Parameters](#parameters-23)
118
+ * [Parameters](#parameters-22)
119
119
  * [branches](#branches)
120
- * [Parameters](#parameters-24)
120
+ * [Parameters](#parameters-23)
121
121
  * [tags](#tags)
122
- * [Parameters](#parameters-25)
122
+ * [Parameters](#parameters-24)
123
123
  * [hooks](#hooks)
124
- * [Parameters](#parameters-26)
124
+ * [Parameters](#parameters-25)
125
125
  * [pullRequests](#pullrequests)
126
- * [Parameters](#parameters-27)
126
+ * [Parameters](#parameters-26)
127
127
  * [name](#name)
128
128
  * [fullName](#fullname)
129
129
  * [provider](#provider-1)
@@ -138,82 +138,82 @@ console.log(await readme.getString());
138
138
  * [pullRequestClass](#pullrequestclass-1)
139
139
  * [instanceIdentifier](#instanceidentifier)
140
140
  * [optionsFromEnvironment](#optionsfromenvironment)
141
- * [Parameters](#parameters-28)
141
+ * [Parameters](#parameters-27)
142
142
  * [areOptionsSufficcient](#areoptionssufficcient)
143
- * [Parameters](#parameters-29)
143
+ * [Parameters](#parameters-28)
144
144
  * [initialize](#initialize)
145
- * [Parameters](#parameters-30)
145
+ * [Parameters](#parameters-29)
146
146
  * [priority](#priority)
147
147
  * [name](#name-1)
148
148
  * [messageDestination](#messagedestination-1)
149
149
  * [Branch](#branch)
150
- * [Parameters](#parameters-31)
151
- * [Properties](#properties-2)
150
+ * [Parameters](#parameters-30)
151
+ * [Properties](#properties-3)
152
152
  * [url](#url-1)
153
153
  * [refType](#reftype)
154
154
  * [isDefault](#isdefault)
155
155
  * [delete](#delete)
156
156
  * [commit](#commit)
157
- * [Parameters](#parameters-32)
157
+ * [Parameters](#parameters-31)
158
158
  * [commitIntoPullRequest](#commitintopullrequest)
159
- * [Parameters](#parameters-33)
159
+ * [Parameters](#parameters-32)
160
160
  * [removeEntries](#removeentries)
161
- * [Parameters](#parameters-34)
161
+ * [Parameters](#parameters-33)
162
162
  * [createPullRequest](#createpullrequest)
163
- * [Parameters](#parameters-35)
163
+ * [Parameters](#parameters-34)
164
164
  * [createBranch](#createbranch)
165
- * [Parameters](#parameters-36)
165
+ * [Parameters](#parameters-35)
166
166
  * [CommitResult](#commitresult)
167
- * [Properties](#properties-3)
168
- * [Commit](#commit-1)
169
- * [Parameters](#parameters-37)
170
167
  * [Properties](#properties-4)
171
- * [Hook](#hook)
172
- * [Parameters](#parameters-38)
168
+ * [Commit](#commit-1)
169
+ * [Parameters](#parameters-36)
173
170
  * [Properties](#properties-5)
171
+ * [Hook](#hook)
172
+ * [Parameters](#parameters-37)
173
+ * [Properties](#properties-6)
174
174
  * [equals](#equals-2)
175
- * [Parameters](#parameters-39)
175
+ * [Parameters](#parameters-38)
176
176
  * [toJSON](#tojson-1)
177
177
  * [Issue](#issue)
178
- * [Parameters](#parameters-40)
178
+ * [Parameters](#parameters-39)
179
179
  * [Milestone](#milestone)
180
- * [Parameters](#parameters-41)
180
+ * [Parameters](#parameters-40)
181
181
  * [MultiGroupProvider](#multigroupprovider)
182
- * [Parameters](#parameters-42)
182
+ * [Parameters](#parameters-41)
183
183
  * [repository](#repository)
184
- * [Parameters](#parameters-43)
184
+ * [Parameters](#parameters-42)
185
185
  * [branch](#branch-1)
186
- * [Parameters](#parameters-44)
186
+ * [Parameters](#parameters-43)
187
187
  * [repositoryGroup](#repositorygroup)
188
- * [Parameters](#parameters-45)
188
+ * [Parameters](#parameters-44)
189
189
  * [repositoryGroups](#repositorygroups)
190
- * [Parameters](#parameters-46)
190
+ * [Parameters](#parameters-45)
191
191
  * [createRepositoryGroup](#createrepositorygroup)
192
- * [Parameters](#parameters-47)
192
+ * [Parameters](#parameters-46)
193
193
  * [addRepositoryGroup](#addrepositorygroup)
194
- * [Parameters](#parameters-48)
194
+ * [Parameters](#parameters-47)
195
195
  * [NamedObject](#namedobject)
196
- * [Parameters](#parameters-49)
197
- * [Properties](#properties-6)
196
+ * [Parameters](#parameters-48)
197
+ * [Properties](#properties-7)
198
198
  * [equals](#equals-3)
199
- * [Parameters](#parameters-50)
199
+ * [Parameters](#parameters-49)
200
200
  * [displayName](#displayname)
201
201
  * [fullName](#fullname-1)
202
202
  * [toJSON](#tojson-2)
203
203
  * [Project](#project)
204
- * [Parameters](#parameters-51)
204
+ * [Parameters](#parameters-50)
205
205
  * [PullRequest](#pullrequest)
206
- * [Parameters](#parameters-52)
207
- * [Properties](#properties-7)
206
+ * [Parameters](#parameters-51)
207
+ * [Properties](#properties-8)
208
208
  * [fullName](#fullname-2)
209
209
  * [url](#url-2)
210
210
  * [repository](#repository-1)
211
211
  * [provider](#provider-2)
212
212
  * [equals](#equals-4)
213
- * [Parameters](#parameters-53)
213
+ * [Parameters](#parameters-52)
214
214
  * [delete](#delete-1)
215
215
  * [merge](#merge)
216
- * [Parameters](#parameters-54)
216
+ * [Parameters](#parameters-53)
217
217
  * [decline](#decline)
218
218
  * [reviews](#reviews)
219
219
  * [identifier](#identifier)
@@ -221,9 +221,9 @@ console.log(await readme.getString());
221
221
  * [defaultListStates](#defaultliststates)
222
222
  * [validMergeMethods](#validmergemethods)
223
223
  * [list](#list-1)
224
- * [Parameters](#parameters-55)
224
+ * [Parameters](#parameters-54)
225
225
  * [open](#open)
226
- * [Parameters](#parameters-56)
226
+ * [Parameters](#parameters-55)
227
227
  * [title](#title)
228
228
  * [body](#body)
229
229
  * [state](#state)
@@ -231,21 +231,21 @@ console.log(await readme.getString());
231
231
  * [merged](#merged)
232
232
  * [draft](#draft)
233
233
  * [ContentEntry](#contententry)
234
- * [Properties](#properties-8)
234
+ * [Properties](#properties-9)
235
235
  * [Ref](#ref)
236
- * [Parameters](#parameters-57)
236
+ * [Parameters](#parameters-56)
237
237
  * [equals](#equals-5)
238
- * [Parameters](#parameters-58)
238
+ * [Parameters](#parameters-57)
239
239
  * [ref](#ref-1)
240
240
  * [refId](#refid)
241
- * [Parameters](#parameters-59)
241
+ * [Parameters](#parameters-58)
242
242
  * [entries](#entries)
243
- * [Parameters](#parameters-60)
243
+ * [Parameters](#parameters-59)
244
244
  * [asyncIterator](#asynciterator)
245
245
  * [maybeEntry](#maybeentry)
246
- * [Parameters](#parameters-61)
246
+ * [Parameters](#parameters-60)
247
247
  * [entry](#entry)
248
- * [Parameters](#parameters-62)
248
+ * [Parameters](#parameters-61)
249
249
  * [owner](#owner)
250
250
  * [fullName](#fullname-3)
251
251
  * [fullCondensedName](#fullcondensedname)
@@ -261,27 +261,29 @@ console.log(await readme.getString());
261
261
  * [attributes](#attributes-1)
262
262
  * [isProtected](#isprotected-1)
263
263
  * [RepositoryGroup](#repositorygroup-1)
264
- * [Parameters](#parameters-63)
265
- * [Properties](#properties-9)
264
+ * [Parameters](#parameters-62)
265
+ * [Properties](#properties-10)
266
266
  * [attributeMapping](#attributemapping-1)
267
267
  * [type](#type)
268
268
  * [url](#url-3)
269
269
  * [RepositoryOwner](#repositoryowner)
270
- * [Parameters](#parameters-64)
270
+ * [Parameters](#parameters-63)
271
271
  * [Repository](#repository-2)
272
- * [Parameters](#parameters-65)
273
- * [Properties](#properties-10)
272
+ * [Parameters](#parameters-64)
273
+ * [Properties](#properties-11)
274
274
  * [fullName](#fullname-4)
275
275
  * [slug](#slug)
276
276
  * [provider](#provider-3)
277
277
  * [identifier](#identifier-2)
278
278
  * [equals](#equals-6)
279
- * [Parameters](#parameters-66)
279
+ * [Parameters](#parameters-65)
280
280
  * [entry](#entry-1)
281
- * [Parameters](#parameters-67)
281
+ * [Parameters](#parameters-66)
282
282
  * [entries](#entries-1)
283
- * [Parameters](#parameters-68)
283
+ * [Parameters](#parameters-67)
284
284
  * [maybeEntry](#maybeentry-1)
285
+ * [Parameters](#parameters-68)
286
+ * [commits](#commits)
285
287
  * [Parameters](#parameters-69)
286
288
  * [urls](#urls)
287
289
  * [url](#url-4)
@@ -622,7 +624,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
622
624
 
623
625
  Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)
624
626
 
625
- ### Parameters
627
+ ### Properties
626
628
 
627
629
  * `info` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
628
630
  * `warn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**
@@ -871,8 +873,8 @@ form the given set of environment variables.
871
873
 
872
874
  #### Parameters
873
875
 
874
- * `env` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** taken from process.env
875
- * `instanceIdentifier` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (optional, default `this.instanceIdentifier`)
876
+ * `env` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** as of from process.env
877
+ * `instanceIdentifier` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** part of variable name. (optional, default `this.instanceIdentifier`)
876
878
 
877
879
  Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** undefined if no suitable environment variables have been found
878
880
 
@@ -901,16 +903,16 @@ Returns **[BaseProvider](#baseprovider)** newly created provider or undefined if
901
903
 
902
904
  ## priority
903
905
 
904
- In case there are several provider able to support a given source which one sould be used ?
906
+ In case there are several providers able to support a given source which one sould be used ?
905
907
  this defines the order
906
908
 
907
909
  ## name
908
910
 
909
- Name of the provider
911
+ Name of the provider.
910
912
 
911
913
  ## messageDestination
912
914
 
913
- to forward info/warn and error messages to
915
+ To forward info/warn and error messages to
914
916
 
915
917
  ## Branch
916
918
 
@@ -940,7 +942,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
940
942
 
941
943
  ### refType
942
944
 
943
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** tags
945
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** heades
944
946
 
945
947
  ### isDefault
946
948
 
@@ -1035,6 +1037,8 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
1035
1037
  * `repository` **[Repository](#repository)**
1036
1038
  * `message` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1037
1039
  * `sha` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1040
+ * `author` **User**
1041
+ * `committer` **User**
1038
1042
 
1039
1043
  ## Hook
1040
1044
 
@@ -1322,8 +1326,8 @@ Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Glob
1322
1326
 
1323
1327
  ### list
1324
1328
 
1325
- List all pull request for a given repo
1326
- result will be filtered by source branch, destination branch and states
1329
+ List all pull request for a given repo.
1330
+ Result will be filtered by source branch, destination branch and states
1327
1331
 
1328
1332
  #### Parameters
1329
1333
 
@@ -1683,6 +1687,16 @@ Get exactly one matching entry by name or undefined if no such entry is found.
1683
1687
 
1684
1688
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[ContentEntry](#contententry)>**
1685
1689
 
1690
+ ### commits
1691
+
1692
+ List commits of the default branch.
1693
+
1694
+ #### Parameters
1695
+
1696
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
1697
+
1698
+ Returns **AsyncIterator<[Commit](#commit)>** all matching commits in the repository
1699
+
1686
1700
  ### urls
1687
1701
 
1688
1702
  Urls to access the repo.
@@ -1840,7 +1854,7 @@ Returns **[Tag](#tag)** newly created tag
1840
1854
 
1841
1855
  ### createPullRequest
1842
1856
 
1843
- Create a pull request (or deliver an already present for thefiven name).
1857
+ Create a pull request (or deliver an already present for the given name).
1844
1858
 
1845
1859
  #### Parameters
1846
1860
 
@@ -2026,6 +2040,8 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
2026
2040
 
2027
2041
  ### isWritable
2028
2042
 
2043
+ Tags cannot be written to.
2044
+
2029
2045
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false
2030
2046
 
2031
2047
  ## asArray
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "28.0.0",
3
+ "version": "28.1.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,10 +33,10 @@
33
33
  "matching-iterator": "^2.0.4"
34
34
  },
35
35
  "devDependencies": {
36
- "ava": "^4.1.0",
37
- "c8": "^7.11.0",
36
+ "ava": "^4.2.0",
37
+ "c8": "^7.11.2",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.12.11",
39
+ "repository-provider-test-support": "^2.1.0",
40
40
  "semantic-release": "^19.0.2",
41
41
  "typescript": "^4.6.3"
42
42
  },
@@ -98,6 +98,14 @@ export class BaseObject {
98
98
  return this.owner.provider;
99
99
  }
100
100
 
101
+ /**
102
+ * Forwarded to the owner.
103
+ * @param {...any} args
104
+ */
105
+ trace(...args) {
106
+ return this.owner.trace(...args);
107
+ }
108
+
101
109
  /**
102
110
  * Forwarded to the owner.
103
111
  * @param {...any} args
@@ -166,7 +174,7 @@ export class BaseObject {
166
174
  * By default we use the owners implementation.
167
175
  * @return {Function} as defined in the owner
168
176
  */
169
- get hookClass() {
177
+ get hookClass() {
170
178
  return this.owner.hookClass;
171
179
  }
172
180
  }
@@ -449,6 +449,10 @@ export class BaseProvider extends BaseObject {
449
449
 
450
450
  initializeRepositories() {}
451
451
 
452
+ trace(...args) {
453
+ return this.messageDestination.trace(...args);
454
+ }
455
+
452
456
  info(...args) {
453
457
  return this.messageDestination.info(...args);
454
458
  }
@@ -52,8 +52,8 @@ export class PullRequest extends NamedObject {
52
52
  }
53
53
 
54
54
  /**
55
- * List all pull request for a given repo
56
- * result will be filtered by source branch, destination branch and states
55
+ * List all pull request for a given repo.
56
+ * Result will be filtered by source branch, destination branch and states
57
57
  * @param {Repository} repository
58
58
  * @param {Object} filter
59
59
  * @param {Branch?} filter.source
@@ -358,7 +358,7 @@ export class Repository extends NamedObject {
358
358
  }
359
359
 
360
360
  /**
361
- * Create a pull request (or deliver an already present for thefiven name).
361
+ * Create a pull request (or deliver an already present for the given name).
362
362
  * @param {string} name of the pr
363
363
  * @param {Branch} source branch
364
364
  * @param {Object} options