repository-provider 27.0.6 → 28.1.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 +92 -76
- package/package.json +5 -5
- package/src/base-object.mjs +9 -1
- package/src/base-provider.mjs +18 -10
- package/src/branch.mjs +1 -1
- package/src/commit.mjs +7 -0
- package/src/pull-request.mjs +2 -2
- package/src/repository.mjs +9 -1
- package/src/tag.mjs +1 -1
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-
|
|
97
|
+
* [Parameters](#parameters-13)
|
|
98
98
|
* [repositoryBases](#repositorybases)
|
|
99
99
|
* [normalizeRepositoryName](#normalizerepositoryname)
|
|
100
|
-
* [Parameters](#parameters-
|
|
100
|
+
* [Parameters](#parameters-14)
|
|
101
101
|
* [normalizeGroupName](#normalizegroupname)
|
|
102
|
-
* [Parameters](#parameters-
|
|
102
|
+
* [Parameters](#parameters-15)
|
|
103
103
|
* [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
|
|
104
104
|
* [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
|
|
105
105
|
* [supportsBase](#supportsbase)
|
|
106
|
-
* [Parameters](#parameters-
|
|
106
|
+
* [Parameters](#parameters-16)
|
|
107
107
|
* [parseName](#parsename)
|
|
108
|
-
* [Parameters](#parameters-
|
|
108
|
+
* [Parameters](#parameters-17)
|
|
109
109
|
* [createRepository](#createrepository)
|
|
110
|
-
* [Parameters](#parameters-
|
|
110
|
+
* [Parameters](#parameters-18)
|
|
111
111
|
* [list](#list)
|
|
112
|
-
* [Parameters](#parameters-
|
|
112
|
+
* [Parameters](#parameters-19)
|
|
113
113
|
* [projects](#projects)
|
|
114
|
-
* [Parameters](#parameters-
|
|
114
|
+
* [Parameters](#parameters-20)
|
|
115
115
|
* [milestones](#milestones)
|
|
116
|
-
* [Parameters](#parameters-
|
|
116
|
+
* [Parameters](#parameters-21)
|
|
117
117
|
* [repositories](#repositories)
|
|
118
|
-
* [Parameters](#parameters-
|
|
118
|
+
* [Parameters](#parameters-22)
|
|
119
119
|
* [branches](#branches)
|
|
120
|
-
* [Parameters](#parameters-
|
|
120
|
+
* [Parameters](#parameters-23)
|
|
121
121
|
* [tags](#tags)
|
|
122
|
-
* [Parameters](#parameters-
|
|
122
|
+
* [Parameters](#parameters-24)
|
|
123
123
|
* [hooks](#hooks)
|
|
124
|
-
* [Parameters](#parameters-
|
|
124
|
+
* [Parameters](#parameters-25)
|
|
125
125
|
* [pullRequests](#pullrequests)
|
|
126
|
-
* [Parameters](#parameters-
|
|
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-
|
|
141
|
+
* [Parameters](#parameters-27)
|
|
142
142
|
* [areOptionsSufficcient](#areoptionssufficcient)
|
|
143
|
-
* [Parameters](#parameters-
|
|
143
|
+
* [Parameters](#parameters-28)
|
|
144
144
|
* [initialize](#initialize)
|
|
145
|
-
* [Parameters](#parameters-
|
|
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-
|
|
151
|
-
* [Properties](#properties-
|
|
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-
|
|
157
|
+
* [Parameters](#parameters-31)
|
|
158
158
|
* [commitIntoPullRequest](#commitintopullrequest)
|
|
159
|
-
* [Parameters](#parameters-
|
|
159
|
+
* [Parameters](#parameters-32)
|
|
160
160
|
* [removeEntries](#removeentries)
|
|
161
|
-
* [Parameters](#parameters-
|
|
161
|
+
* [Parameters](#parameters-33)
|
|
162
162
|
* [createPullRequest](#createpullrequest)
|
|
163
|
-
* [Parameters](#parameters-
|
|
163
|
+
* [Parameters](#parameters-34)
|
|
164
164
|
* [createBranch](#createbranch)
|
|
165
|
-
* [Parameters](#parameters-
|
|
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
|
-
* [
|
|
172
|
-
* [Parameters](#parameters-
|
|
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-
|
|
175
|
+
* [Parameters](#parameters-38)
|
|
176
176
|
* [toJSON](#tojson-1)
|
|
177
177
|
* [Issue](#issue)
|
|
178
|
-
* [Parameters](#parameters-
|
|
178
|
+
* [Parameters](#parameters-39)
|
|
179
179
|
* [Milestone](#milestone)
|
|
180
|
-
* [Parameters](#parameters-
|
|
180
|
+
* [Parameters](#parameters-40)
|
|
181
181
|
* [MultiGroupProvider](#multigroupprovider)
|
|
182
|
-
* [Parameters](#parameters-
|
|
182
|
+
* [Parameters](#parameters-41)
|
|
183
183
|
* [repository](#repository)
|
|
184
|
-
* [Parameters](#parameters-
|
|
184
|
+
* [Parameters](#parameters-42)
|
|
185
185
|
* [branch](#branch-1)
|
|
186
|
-
* [Parameters](#parameters-
|
|
186
|
+
* [Parameters](#parameters-43)
|
|
187
187
|
* [repositoryGroup](#repositorygroup)
|
|
188
|
-
* [Parameters](#parameters-
|
|
188
|
+
* [Parameters](#parameters-44)
|
|
189
189
|
* [repositoryGroups](#repositorygroups)
|
|
190
|
-
* [Parameters](#parameters-
|
|
190
|
+
* [Parameters](#parameters-45)
|
|
191
191
|
* [createRepositoryGroup](#createrepositorygroup)
|
|
192
|
-
* [Parameters](#parameters-
|
|
192
|
+
* [Parameters](#parameters-46)
|
|
193
193
|
* [addRepositoryGroup](#addrepositorygroup)
|
|
194
|
-
* [Parameters](#parameters-
|
|
194
|
+
* [Parameters](#parameters-47)
|
|
195
195
|
* [NamedObject](#namedobject)
|
|
196
|
-
* [Parameters](#parameters-
|
|
197
|
-
* [Properties](#properties-
|
|
196
|
+
* [Parameters](#parameters-48)
|
|
197
|
+
* [Properties](#properties-7)
|
|
198
198
|
* [equals](#equals-3)
|
|
199
|
-
* [Parameters](#parameters-
|
|
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-
|
|
204
|
+
* [Parameters](#parameters-50)
|
|
205
205
|
* [PullRequest](#pullrequest)
|
|
206
|
-
* [Parameters](#parameters-
|
|
207
|
-
* [Properties](#properties-
|
|
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-
|
|
213
|
+
* [Parameters](#parameters-52)
|
|
214
214
|
* [delete](#delete-1)
|
|
215
215
|
* [merge](#merge)
|
|
216
|
-
* [Parameters](#parameters-
|
|
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-
|
|
224
|
+
* [Parameters](#parameters-54)
|
|
225
225
|
* [open](#open)
|
|
226
|
-
* [Parameters](#parameters-
|
|
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-
|
|
234
|
+
* [Properties](#properties-9)
|
|
235
235
|
* [Ref](#ref)
|
|
236
|
-
* [Parameters](#parameters-
|
|
236
|
+
* [Parameters](#parameters-56)
|
|
237
237
|
* [equals](#equals-5)
|
|
238
|
-
* [Parameters](#parameters-
|
|
238
|
+
* [Parameters](#parameters-57)
|
|
239
239
|
* [ref](#ref-1)
|
|
240
240
|
* [refId](#refid)
|
|
241
|
-
* [Parameters](#parameters-
|
|
241
|
+
* [Parameters](#parameters-58)
|
|
242
242
|
* [entries](#entries)
|
|
243
|
-
* [Parameters](#parameters-
|
|
243
|
+
* [Parameters](#parameters-59)
|
|
244
244
|
* [asyncIterator](#asynciterator)
|
|
245
245
|
* [maybeEntry](#maybeentry)
|
|
246
|
-
* [Parameters](#parameters-
|
|
246
|
+
* [Parameters](#parameters-60)
|
|
247
247
|
* [entry](#entry)
|
|
248
|
-
* [Parameters](#parameters-
|
|
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-
|
|
265
|
-
* [Properties](#properties-
|
|
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-
|
|
270
|
+
* [Parameters](#parameters-63)
|
|
271
271
|
* [Repository](#repository-2)
|
|
272
|
-
* [Parameters](#parameters-
|
|
273
|
-
* [Properties](#properties-
|
|
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-
|
|
279
|
+
* [Parameters](#parameters-65)
|
|
280
280
|
* [entry](#entry-1)
|
|
281
|
-
* [Parameters](#parameters-
|
|
281
|
+
* [Parameters](#parameters-66)
|
|
282
282
|
* [entries](#entries-1)
|
|
283
|
-
* [Parameters](#parameters-
|
|
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
|
-
###
|
|
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)**
|
|
875
|
-
* `instanceIdentifier` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
|
|
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
|
|
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
|
-
|
|
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)**
|
|
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
|
-
|
|
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
|
|
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": "
|
|
3
|
+
"version": "28.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"matching-iterator": "^2.0.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"ava": "^4.
|
|
37
|
-
"c8": "^7.11.
|
|
36
|
+
"ava": "^4.2.0",
|
|
37
|
+
"c8": "^7.11.2",
|
|
38
38
|
"documentation": "^13.2.5",
|
|
39
|
-
"repository-provider-test-support": "^1.
|
|
39
|
+
"repository-provider-test-support": "^2.1.1",
|
|
40
40
|
"semantic-release": "^19.0.2",
|
|
41
41
|
"typescript": "^4.6.3"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
|
-
"node": ">=14.
|
|
44
|
+
"node": ">=16.14.2"
|
|
45
45
|
},
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
package/src/base-object.mjs
CHANGED
|
@@ -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
|
-
|
|
177
|
+
get hookClass() {
|
|
170
178
|
return this.owner.hookClass;
|
|
171
179
|
}
|
|
172
180
|
}
|
package/src/base-provider.mjs
CHANGED
|
@@ -12,9 +12,9 @@ import { BaseObject } from "./base-object.mjs";
|
|
|
12
12
|
/**
|
|
13
13
|
* @typedef {Object} MessageDestination
|
|
14
14
|
* Endpoint to deliver log messages to.
|
|
15
|
-
* @
|
|
16
|
-
* @
|
|
17
|
-
* @
|
|
15
|
+
* @property {Function} info
|
|
16
|
+
* @property {Function} warn
|
|
17
|
+
* @property {Function} error
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -31,8 +31,9 @@ export class BaseProvider extends BaseObject {
|
|
|
31
31
|
/**
|
|
32
32
|
* Extract options suitable for the constructor
|
|
33
33
|
* form the given set of environment variables.
|
|
34
|
-
*
|
|
35
|
-
* @param {
|
|
34
|
+
* Object with the detected key value pairs is delivered.
|
|
35
|
+
* @param {Object} env as from process.env
|
|
36
|
+
* @param {string} instanceIdentifier part of variable name.
|
|
36
37
|
* @return {Object} undefined if no suitable environment variables have been found
|
|
37
38
|
*/
|
|
38
39
|
static optionsFromEnvironment(
|
|
@@ -58,8 +59,11 @@ export class BaseProvider extends BaseObject {
|
|
|
58
59
|
if (options === undefined) {
|
|
59
60
|
options = {};
|
|
60
61
|
}
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
|
|
63
|
+
if(options[name] === undefined) {
|
|
64
|
+
options[name] = value;
|
|
65
|
+
Object.assign(options, attribute.additionalAttributes);
|
|
66
|
+
}
|
|
63
67
|
break;
|
|
64
68
|
}
|
|
65
69
|
}
|
|
@@ -89,7 +93,7 @@ export class BaseProvider extends BaseObject {
|
|
|
89
93
|
return {
|
|
90
94
|
...super.attributes,
|
|
91
95
|
/**
|
|
92
|
-
* In case there are several
|
|
96
|
+
* In case there are several providers able to support a given source which one sould be used ?
|
|
93
97
|
* this defines the order
|
|
94
98
|
*/
|
|
95
99
|
priority: {
|
|
@@ -98,7 +102,7 @@ export class BaseProvider extends BaseObject {
|
|
|
98
102
|
},
|
|
99
103
|
|
|
100
104
|
/**
|
|
101
|
-
* Name of the provider
|
|
105
|
+
* Name of the provider.
|
|
102
106
|
*/
|
|
103
107
|
name: {
|
|
104
108
|
type: "string",
|
|
@@ -111,7 +115,7 @@ export class BaseProvider extends BaseObject {
|
|
|
111
115
|
},
|
|
112
116
|
|
|
113
117
|
/**
|
|
114
|
-
*
|
|
118
|
+
* To forward info/warn and error messages to
|
|
115
119
|
*/
|
|
116
120
|
messageDestination: {
|
|
117
121
|
type: "object",
|
|
@@ -449,6 +453,10 @@ export class BaseProvider extends BaseObject {
|
|
|
449
453
|
|
|
450
454
|
initializeRepositories() {}
|
|
451
455
|
|
|
456
|
+
trace(...args) {
|
|
457
|
+
return this.messageDestination.trace(...args);
|
|
458
|
+
}
|
|
459
|
+
|
|
452
460
|
info(...args) {
|
|
453
461
|
return this.messageDestination.info(...args);
|
|
454
462
|
}
|
package/src/branch.mjs
CHANGED
package/src/commit.mjs
CHANGED
|
@@ -5,10 +5,17 @@
|
|
|
5
5
|
* @property {string} ref
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export class User
|
|
9
|
+
{
|
|
10
|
+
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* @property {Repository} repository
|
|
10
15
|
* @property {string} message
|
|
11
16
|
* @property {string} sha
|
|
17
|
+
* @property {User} author
|
|
18
|
+
* @property {User} committer
|
|
12
19
|
*/
|
|
13
20
|
export class Commit {
|
|
14
21
|
constructor(repository) {
|
package/src/pull-request.mjs
CHANGED
|
@@ -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
|
-
*
|
|
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
|
package/src/repository.mjs
CHANGED
|
@@ -149,6 +149,14 @@ export class Repository extends NamedObject {
|
|
|
149
149
|
return (await this.defaultBranch).maybeEntry(name);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
/**
|
|
153
|
+
* List commits of the default branch.
|
|
154
|
+
* @param {Object} options
|
|
155
|
+
* @return {AsyncIterator<Commit>} all matching commits in the repository
|
|
156
|
+
*/
|
|
157
|
+
async *commits(options) {
|
|
158
|
+
}
|
|
159
|
+
|
|
152
160
|
/**
|
|
153
161
|
* Urls to access the repo.
|
|
154
162
|
* @return {string[]}
|
|
@@ -350,7 +358,7 @@ export class Repository extends NamedObject {
|
|
|
350
358
|
}
|
|
351
359
|
|
|
352
360
|
/**
|
|
353
|
-
* Create a pull request (or deliver an already present for
|
|
361
|
+
* Create a pull request (or deliver an already present for the given name).
|
|
354
362
|
* @param {string} name of the pr
|
|
355
363
|
* @param {Branch} source branch
|
|
356
364
|
* @param {Object} options
|