backport 7.3.2 → 7.3.5
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 +8 -0
- package/dist/backportRun.js +25 -12
- package/dist/entrypoint.cli.js +2 -2
- package/dist/entrypoint.module.d.ts +3 -0
- package/dist/entrypoint.module.js +19 -8
- package/dist/entrypoint.module.private.test.d.ts +1 -0
- package/dist/entrypoint.module.private.test.js +592 -0
- package/dist/options/ConfigOptions.d.ts +1 -0
- package/dist/options/cliArgs.d.ts +2 -0
- package/dist/options/cliArgs.js +8 -0
- package/dist/options/config/config.d.ts +1 -0
- package/dist/options/config/readConfigFile.d.ts +1 -0
- package/dist/options/options.d.ts +2 -0
- package/dist/options/options.js +5 -5
- package/dist/options/options.test.js +9 -2
- package/dist/services/github/v4/apiRequestV4.d.ts +3 -3
- package/dist/services/github/v4/fetchCommits/allFetchers.private.test.js +2 -2
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.d.ts +3 -2
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.js +4 -0
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +1 -1
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.d.ts +1 -1
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.js +3 -3
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js +10 -4
- package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.d.ts +12 -0
- package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.js +68 -0
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +1 -0
- package/dist/services/github/v4/throwOnInvalidAccessToken.js +1 -1
- package/dist/services/prompt.test.js +1 -1
- package/dist/services/prompts.js +4 -4
- package/dist/services/remoteConfig.js +1 -1
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.d.ts +1 -1
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.js +1 -1
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.js +39 -39
- package/dist/services/sourceCommit/parseSourceCommit.test.js +3 -3
- package/dist/test/e2e/cli/cli.private.test.js +3 -0
- package/dist/test/handleUnbackportedPullRequests.private.test.js +1 -1
- package/dist/ui/getCommits.js +15 -4
- package/dist/ui/getCommitsWithoutBackports.test.js +2 -2
- package/dist/ui/getTargetBranches.js +1 -1
- package/dist/ui/getTargetBranches.test.js +2 -2
- package/dist/utils/filterMissingCommits.d.ts +2 -0
- package/dist/utils/filterMissingCommits.js +7 -0
- package/dist/utils/filterUnmergedCommits.d.ts +2 -0
- package/dist/utils/filterUnmergedCommits.js +7 -0
- package/dist/utils/packageVersion.d.ts +1 -1
- package/dist/utils/packageVersion.js +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const entrypoint_module_1 = require("./entrypoint.module");
|
|
4
|
+
const getDevAccessToken_1 = require("./test/private/getDevAccessToken");
|
|
5
|
+
describe('entrypoint.module', () => {
|
|
6
|
+
describe('getCommits', () => {
|
|
7
|
+
it('pullNumber', async () => {
|
|
8
|
+
const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
|
|
9
|
+
const commits = await (0, entrypoint_module_1.getCommits)({
|
|
10
|
+
accessToken: accessToken,
|
|
11
|
+
repoName: 'kibana',
|
|
12
|
+
repoOwner: 'elastic',
|
|
13
|
+
pullNumber: 88188,
|
|
14
|
+
});
|
|
15
|
+
const expectedCommits = [
|
|
16
|
+
{
|
|
17
|
+
author: { name: 'Søren Louv-Jansen', email: 'sorenlouv@gmail.com' },
|
|
18
|
+
sourceCommit: {
|
|
19
|
+
committedDate: '2021-01-13T20:01:44Z',
|
|
20
|
+
message: '[APM] Fix incorrect table column header (95th instead of avg) (#88188)',
|
|
21
|
+
sha: 'd1b348e6213c5ad48653dfaad6eaf4928b2c688b',
|
|
22
|
+
},
|
|
23
|
+
sourcePullRequest: {
|
|
24
|
+
number: 88188,
|
|
25
|
+
url: 'https://github.com/elastic/kibana/pull/88188',
|
|
26
|
+
mergeCommit: {
|
|
27
|
+
message: '[APM] Fix incorrect table column header (95th instead of avg) (#88188)',
|
|
28
|
+
sha: 'd1b348e6213c5ad48653dfaad6eaf4928b2c688b',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
sourceBranch: 'master',
|
|
32
|
+
expectedTargetPullRequests: [
|
|
33
|
+
{
|
|
34
|
+
url: 'https://github.com/elastic/kibana/pull/88288',
|
|
35
|
+
number: 88288,
|
|
36
|
+
branch: '7.x',
|
|
37
|
+
state: 'MERGED',
|
|
38
|
+
mergeCommit: {
|
|
39
|
+
sha: '52710be7add6811ec4783c7d383d4159c0aa76f5',
|
|
40
|
+
message: '[7.x] [APM] Fix incorrect table column header (95th instead of avg) (#88188) (#88288)\n\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
url: 'https://github.com/elastic/kibana/pull/88289',
|
|
45
|
+
number: 88289,
|
|
46
|
+
branch: '7.11',
|
|
47
|
+
state: 'MERGED',
|
|
48
|
+
mergeCommit: {
|
|
49
|
+
sha: 'b8194e9ec27d69f485d8b194d1cb5e4f6d8fef6d',
|
|
50
|
+
message: '[APM] Fix incorrect table column header (95th instead of avg) (#88188) (#88289)',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
];
|
|
56
|
+
expect(commits).toEqual(expectedCommits);
|
|
57
|
+
});
|
|
58
|
+
it('sha', async () => {
|
|
59
|
+
const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
|
|
60
|
+
const commits = await (0, entrypoint_module_1.getCommits)({
|
|
61
|
+
accessToken: accessToken,
|
|
62
|
+
repoName: 'kibana',
|
|
63
|
+
repoOwner: 'elastic',
|
|
64
|
+
sha: 'd1b348e6213c5ad48653dfaad6eaf4928b2c688b',
|
|
65
|
+
});
|
|
66
|
+
const expectedCommits = [
|
|
67
|
+
{
|
|
68
|
+
author: { name: 'Søren Louv-Jansen', email: 'sorenlouv@gmail.com' },
|
|
69
|
+
sourceCommit: {
|
|
70
|
+
committedDate: '2021-01-13T20:01:44Z',
|
|
71
|
+
message: '[APM] Fix incorrect table column header (95th instead of avg) (#88188)',
|
|
72
|
+
sha: 'd1b348e6213c5ad48653dfaad6eaf4928b2c688b',
|
|
73
|
+
},
|
|
74
|
+
sourcePullRequest: {
|
|
75
|
+
number: 88188,
|
|
76
|
+
url: 'https://github.com/elastic/kibana/pull/88188',
|
|
77
|
+
mergeCommit: {
|
|
78
|
+
message: '[APM] Fix incorrect table column header (95th instead of avg) (#88188)',
|
|
79
|
+
sha: 'd1b348e6213c5ad48653dfaad6eaf4928b2c688b',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
sourceBranch: 'master',
|
|
83
|
+
expectedTargetPullRequests: [
|
|
84
|
+
{
|
|
85
|
+
url: 'https://github.com/elastic/kibana/pull/88288',
|
|
86
|
+
number: 88288,
|
|
87
|
+
branch: '7.x',
|
|
88
|
+
state: 'MERGED',
|
|
89
|
+
mergeCommit: {
|
|
90
|
+
sha: '52710be7add6811ec4783c7d383d4159c0aa76f5',
|
|
91
|
+
message: '[7.x] [APM] Fix incorrect table column header (95th instead of avg) (#88188) (#88288)\n\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
url: 'https://github.com/elastic/kibana/pull/88289',
|
|
96
|
+
number: 88289,
|
|
97
|
+
branch: '7.11',
|
|
98
|
+
state: 'MERGED',
|
|
99
|
+
mergeCommit: {
|
|
100
|
+
sha: 'b8194e9ec27d69f485d8b194d1cb5e4f6d8fef6d',
|
|
101
|
+
message: '[APM] Fix incorrect table column header (95th instead of avg) (#88188) (#88289)',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
expect(commits).toEqual(expectedCommits);
|
|
108
|
+
});
|
|
109
|
+
it('prFilter', async () => {
|
|
110
|
+
const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
|
|
111
|
+
const commits = await (0, entrypoint_module_1.getCommits)({
|
|
112
|
+
accessToken: accessToken,
|
|
113
|
+
repoName: 'kibana',
|
|
114
|
+
repoOwner: 'elastic',
|
|
115
|
+
prFilter: 'label:Team:apm merged:<2021-06-02 base:master',
|
|
116
|
+
maxNumber: 3,
|
|
117
|
+
});
|
|
118
|
+
expect(commits).toMatchInlineSnapshot(`
|
|
119
|
+
Array [
|
|
120
|
+
Object {
|
|
121
|
+
"author": Object {
|
|
122
|
+
"email": "pierre.gayvallet@elastic.co",
|
|
123
|
+
"name": "Pierre Gayvallet",
|
|
124
|
+
},
|
|
125
|
+
"expectedTargetPullRequests": Array [
|
|
126
|
+
Object {
|
|
127
|
+
"branch": "7.x",
|
|
128
|
+
"mergeCommit": Object {
|
|
129
|
+
"message": "[7.x] Migrate most plugins to synchronous lifecycle (#89562) (#90579)
|
|
130
|
+
|
|
131
|
+
* Migrate most plugins to synchronous lifecycle (#89562)
|
|
132
|
+
|
|
133
|
+
* first pass
|
|
134
|
+
|
|
135
|
+
* migrate more plugins
|
|
136
|
+
|
|
137
|
+
* migrate yet more plugins
|
|
138
|
+
|
|
139
|
+
* more oss plugins
|
|
140
|
+
|
|
141
|
+
* fix test file
|
|
142
|
+
|
|
143
|
+
* change Plugin signature on the client-side too
|
|
144
|
+
|
|
145
|
+
* fix test types
|
|
146
|
+
|
|
147
|
+
* migrate OSS client-side plugins
|
|
148
|
+
|
|
149
|
+
* migrate OSS client-side test plugins
|
|
150
|
+
|
|
151
|
+
* migrate xpack client-side plugins
|
|
152
|
+
|
|
153
|
+
* revert fix attempt on fleet plugin
|
|
154
|
+
|
|
155
|
+
* fix presentation start signature
|
|
156
|
+
|
|
157
|
+
* fix yet another signature
|
|
158
|
+
|
|
159
|
+
* add warnings for server-side async plugins in dev mode
|
|
160
|
+
|
|
161
|
+
* remove unused import
|
|
162
|
+
|
|
163
|
+
* fix isPromise
|
|
164
|
+
|
|
165
|
+
* Add client-side deprecations
|
|
166
|
+
|
|
167
|
+
* update migration examples
|
|
168
|
+
|
|
169
|
+
* update generated doc
|
|
170
|
+
|
|
171
|
+
* fix xpack unit tests
|
|
172
|
+
|
|
173
|
+
* nit
|
|
174
|
+
|
|
175
|
+
* (will be reverted) explicitly await for license to be ready in the auth hook
|
|
176
|
+
|
|
177
|
+
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
178
|
+
|
|
179
|
+
This reverts commit fdf73feb
|
|
180
|
+
|
|
181
|
+
* restore await on on promise contracts
|
|
182
|
+
|
|
183
|
+
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
184
|
+
|
|
185
|
+
This reverts commit fdf73feb
|
|
186
|
+
|
|
187
|
+
* Revert \\"restore await on on promise contracts\\"
|
|
188
|
+
|
|
189
|
+
This reverts commit c5f2fe51
|
|
190
|
+
|
|
191
|
+
* add delay before starting tests in FTR
|
|
192
|
+
|
|
193
|
+
* update deprecation ts doc
|
|
194
|
+
|
|
195
|
+
* add explicit contract for monitoring setup
|
|
196
|
+
|
|
197
|
+
* migrate monitoring plugin to sync
|
|
198
|
+
|
|
199
|
+
* change plugin timeout to 10sec
|
|
200
|
+
|
|
201
|
+
* use delay instead of silence
|
|
202
|
+
# Conflicts:
|
|
203
|
+
# x-pack/plugins/xpack_legacy/server/plugin.ts
|
|
204
|
+
|
|
205
|
+
* fix mock",
|
|
206
|
+
"sha": "97f89e256b14dd01a4f20355dd04e8e27241c90a",
|
|
207
|
+
},
|
|
208
|
+
"number": 90579,
|
|
209
|
+
"state": "MERGED",
|
|
210
|
+
"url": "https://github.com/elastic/kibana/pull/90579",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
"sourceBranch": "master",
|
|
214
|
+
"sourceCommit": Object {
|
|
215
|
+
"committedDate": "2021-02-08T09:19:54Z",
|
|
216
|
+
"message": "Migrate most plugins to synchronous lifecycle (#89562)
|
|
217
|
+
|
|
218
|
+
* first pass
|
|
219
|
+
|
|
220
|
+
* migrate more plugins
|
|
221
|
+
|
|
222
|
+
* migrate yet more plugins
|
|
223
|
+
|
|
224
|
+
* more oss plugins
|
|
225
|
+
|
|
226
|
+
* fix test file
|
|
227
|
+
|
|
228
|
+
* change Plugin signature on the client-side too
|
|
229
|
+
|
|
230
|
+
* fix test types
|
|
231
|
+
|
|
232
|
+
* migrate OSS client-side plugins
|
|
233
|
+
|
|
234
|
+
* migrate OSS client-side test plugins
|
|
235
|
+
|
|
236
|
+
* migrate xpack client-side plugins
|
|
237
|
+
|
|
238
|
+
* revert fix attempt on fleet plugin
|
|
239
|
+
|
|
240
|
+
* fix presentation start signature
|
|
241
|
+
|
|
242
|
+
* fix yet another signature
|
|
243
|
+
|
|
244
|
+
* add warnings for server-side async plugins in dev mode
|
|
245
|
+
|
|
246
|
+
* remove unused import
|
|
247
|
+
|
|
248
|
+
* fix isPromise
|
|
249
|
+
|
|
250
|
+
* Add client-side deprecations
|
|
251
|
+
|
|
252
|
+
* update migration examples
|
|
253
|
+
|
|
254
|
+
* update generated doc
|
|
255
|
+
|
|
256
|
+
* fix xpack unit tests
|
|
257
|
+
|
|
258
|
+
* nit
|
|
259
|
+
|
|
260
|
+
* (will be reverted) explicitly await for license to be ready in the auth hook
|
|
261
|
+
|
|
262
|
+
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
263
|
+
|
|
264
|
+
This reverts commit fdf73feb
|
|
265
|
+
|
|
266
|
+
* restore await on on promise contracts
|
|
267
|
+
|
|
268
|
+
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
269
|
+
|
|
270
|
+
This reverts commit fdf73feb
|
|
271
|
+
|
|
272
|
+
* Revert \\"restore await on on promise contracts\\"
|
|
273
|
+
|
|
274
|
+
This reverts commit c5f2fe51
|
|
275
|
+
|
|
276
|
+
* add delay before starting tests in FTR
|
|
277
|
+
|
|
278
|
+
* update deprecation ts doc
|
|
279
|
+
|
|
280
|
+
* add explicit contract for monitoring setup
|
|
281
|
+
|
|
282
|
+
* migrate monitoring plugin to sync
|
|
283
|
+
|
|
284
|
+
* change plugin timeout to 10sec
|
|
285
|
+
|
|
286
|
+
* use delay instead of silence",
|
|
287
|
+
"sha": "3b3327dbc3c3041c9681e0cd86bd31cf411dc460",
|
|
288
|
+
},
|
|
289
|
+
"sourcePullRequest": Object {
|
|
290
|
+
"mergeCommit": Object {
|
|
291
|
+
"message": "Migrate most plugins to synchronous lifecycle (#89562)
|
|
292
|
+
|
|
293
|
+
* first pass
|
|
294
|
+
|
|
295
|
+
* migrate more plugins
|
|
296
|
+
|
|
297
|
+
* migrate yet more plugins
|
|
298
|
+
|
|
299
|
+
* more oss plugins
|
|
300
|
+
|
|
301
|
+
* fix test file
|
|
302
|
+
|
|
303
|
+
* change Plugin signature on the client-side too
|
|
304
|
+
|
|
305
|
+
* fix test types
|
|
306
|
+
|
|
307
|
+
* migrate OSS client-side plugins
|
|
308
|
+
|
|
309
|
+
* migrate OSS client-side test plugins
|
|
310
|
+
|
|
311
|
+
* migrate xpack client-side plugins
|
|
312
|
+
|
|
313
|
+
* revert fix attempt on fleet plugin
|
|
314
|
+
|
|
315
|
+
* fix presentation start signature
|
|
316
|
+
|
|
317
|
+
* fix yet another signature
|
|
318
|
+
|
|
319
|
+
* add warnings for server-side async plugins in dev mode
|
|
320
|
+
|
|
321
|
+
* remove unused import
|
|
322
|
+
|
|
323
|
+
* fix isPromise
|
|
324
|
+
|
|
325
|
+
* Add client-side deprecations
|
|
326
|
+
|
|
327
|
+
* update migration examples
|
|
328
|
+
|
|
329
|
+
* update generated doc
|
|
330
|
+
|
|
331
|
+
* fix xpack unit tests
|
|
332
|
+
|
|
333
|
+
* nit
|
|
334
|
+
|
|
335
|
+
* (will be reverted) explicitly await for license to be ready in the auth hook
|
|
336
|
+
|
|
337
|
+
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
338
|
+
|
|
339
|
+
This reverts commit fdf73feb
|
|
340
|
+
|
|
341
|
+
* restore await on on promise contracts
|
|
342
|
+
|
|
343
|
+
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
344
|
+
|
|
345
|
+
This reverts commit fdf73feb
|
|
346
|
+
|
|
347
|
+
* Revert \\"restore await on on promise contracts\\"
|
|
348
|
+
|
|
349
|
+
This reverts commit c5f2fe51
|
|
350
|
+
|
|
351
|
+
* add delay before starting tests in FTR
|
|
352
|
+
|
|
353
|
+
* update deprecation ts doc
|
|
354
|
+
|
|
355
|
+
* add explicit contract for monitoring setup
|
|
356
|
+
|
|
357
|
+
* migrate monitoring plugin to sync
|
|
358
|
+
|
|
359
|
+
* change plugin timeout to 10sec
|
|
360
|
+
|
|
361
|
+
* use delay instead of silence",
|
|
362
|
+
"sha": "3b3327dbc3c3041c9681e0cd86bd31cf411dc460",
|
|
363
|
+
},
|
|
364
|
+
"number": 89562,
|
|
365
|
+
"url": "https://github.com/elastic/kibana/pull/89562",
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
Object {
|
|
369
|
+
"author": Object {
|
|
370
|
+
"email": "w@tson.dk",
|
|
371
|
+
"name": "Thomas Watson",
|
|
372
|
+
},
|
|
373
|
+
"expectedTargetPullRequests": Array [
|
|
374
|
+
Object {
|
|
375
|
+
"branch": "7.x",
|
|
376
|
+
"mergeCommit": Object {
|
|
377
|
+
"message": "Upgrade to hapi version 20 (#85406) (#86592)",
|
|
378
|
+
"sha": "777c80d8a0f72be16091510d0cb5d09693ba6bb4",
|
|
379
|
+
},
|
|
380
|
+
"number": 86592,
|
|
381
|
+
"state": "MERGED",
|
|
382
|
+
"url": "https://github.com/elastic/kibana/pull/86592",
|
|
383
|
+
},
|
|
384
|
+
],
|
|
385
|
+
"sourceBranch": "master",
|
|
386
|
+
"sourceCommit": Object {
|
|
387
|
+
"committedDate": "2020-12-19T12:10:11Z",
|
|
388
|
+
"message": "Upgrade to hapi version 20 (#85406)",
|
|
389
|
+
"sha": "e8b21bc6c12cfd793c46e1d86577d5e5ec8a71f8",
|
|
390
|
+
},
|
|
391
|
+
"sourcePullRequest": Object {
|
|
392
|
+
"mergeCommit": Object {
|
|
393
|
+
"message": "Upgrade to hapi version 20 (#85406)",
|
|
394
|
+
"sha": "e8b21bc6c12cfd793c46e1d86577d5e5ec8a71f8",
|
|
395
|
+
},
|
|
396
|
+
"number": 85406,
|
|
397
|
+
"url": "https://github.com/elastic/kibana/pull/85406",
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
Object {
|
|
401
|
+
"author": Object {
|
|
402
|
+
"email": "nathan.smith@elastic.co",
|
|
403
|
+
"name": "Nathan L Smith",
|
|
404
|
+
},
|
|
405
|
+
"expectedTargetPullRequests": Array [
|
|
406
|
+
Object {
|
|
407
|
+
"branch": "7.x",
|
|
408
|
+
"mergeCommit": Object {
|
|
409
|
+
"message": "Move EUI styled components integration to kibana_react (#86065) (#89217)
|
|
410
|
+
|
|
411
|
+
...from xpack_legacy.
|
|
412
|
+
|
|
413
|
+
Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.
|
|
414
|
+
|
|
415
|
+
Fixes #78248.",
|
|
416
|
+
"sha": "57b798474ae5ec2892a06ffa5706c5dd405db137",
|
|
417
|
+
},
|
|
418
|
+
"number": 89217,
|
|
419
|
+
"state": "MERGED",
|
|
420
|
+
"url": "https://github.com/elastic/kibana/pull/89217",
|
|
421
|
+
},
|
|
422
|
+
],
|
|
423
|
+
"sourceBranch": "master",
|
|
424
|
+
"sourceCommit": Object {
|
|
425
|
+
"committedDate": "2021-01-25T19:48:35Z",
|
|
426
|
+
"message": "Move EUI styled components integration to kibana_react (#86065)
|
|
427
|
+
|
|
428
|
+
...from xpack_legacy.
|
|
429
|
+
|
|
430
|
+
Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.
|
|
431
|
+
|
|
432
|
+
Fixes #78248.",
|
|
433
|
+
"sha": "e5588a129b1a0b2796822d4773176cc712dd5318",
|
|
434
|
+
},
|
|
435
|
+
"sourcePullRequest": Object {
|
|
436
|
+
"mergeCommit": Object {
|
|
437
|
+
"message": "Move EUI styled components integration to kibana_react (#86065)
|
|
438
|
+
|
|
439
|
+
...from xpack_legacy.
|
|
440
|
+
|
|
441
|
+
Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.
|
|
442
|
+
|
|
443
|
+
Fixes #78248.",
|
|
444
|
+
"sha": "e5588a129b1a0b2796822d4773176cc712dd5318",
|
|
445
|
+
},
|
|
446
|
+
"number": 86065,
|
|
447
|
+
"url": "https://github.com/elastic/kibana/pull/86065",
|
|
448
|
+
},
|
|
449
|
+
},
|
|
450
|
+
]
|
|
451
|
+
`);
|
|
452
|
+
});
|
|
453
|
+
it('author', async () => {
|
|
454
|
+
const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
|
|
455
|
+
const commits = await (0, entrypoint_module_1.getCommits)({
|
|
456
|
+
accessToken: accessToken,
|
|
457
|
+
repoName: 'kibana',
|
|
458
|
+
repoOwner: 'elastic',
|
|
459
|
+
author: 'sqren',
|
|
460
|
+
dateUntil: '2021-01-01T10:00:00Z',
|
|
461
|
+
maxNumber: 3,
|
|
462
|
+
});
|
|
463
|
+
expect(commits).toMatchInlineSnapshot(`
|
|
464
|
+
Array [
|
|
465
|
+
Object {
|
|
466
|
+
"author": Object {
|
|
467
|
+
"email": "sorenlouv@gmail.com",
|
|
468
|
+
"name": "Søren Louv-Jansen",
|
|
469
|
+
},
|
|
470
|
+
"expectedTargetPullRequests": Array [
|
|
471
|
+
Object {
|
|
472
|
+
"branch": "7.x",
|
|
473
|
+
"mergeCommit": Object {
|
|
474
|
+
"message": "[APM] Fix broken link to ML when time range is not set (#85976) (#86227)
|
|
475
|
+
|
|
476
|
+
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>",
|
|
477
|
+
"sha": "2d361f018e0776c237d03b84ca8aa24615d16d99",
|
|
478
|
+
},
|
|
479
|
+
"number": 86227,
|
|
480
|
+
"state": "MERGED",
|
|
481
|
+
"url": "https://github.com/elastic/kibana/pull/86227",
|
|
482
|
+
},
|
|
483
|
+
Object {
|
|
484
|
+
"branch": "7.11",
|
|
485
|
+
"mergeCommit": Object {
|
|
486
|
+
"message": "[APM] Fix broken link to ML when time range is not set (#85976) (#86228)",
|
|
487
|
+
"sha": "c6c0015e01601cd852730d5cd20e1a906cbee900",
|
|
488
|
+
},
|
|
489
|
+
"number": 86228,
|
|
490
|
+
"state": "MERGED",
|
|
491
|
+
"url": "https://github.com/elastic/kibana/pull/86228",
|
|
492
|
+
},
|
|
493
|
+
],
|
|
494
|
+
"sourceBranch": "master",
|
|
495
|
+
"sourceCommit": Object {
|
|
496
|
+
"committedDate": "2020-12-16T15:17:03Z",
|
|
497
|
+
"message": "[APM] Fix broken link to ML when time range is not set (#85976)",
|
|
498
|
+
"sha": "744d6809ded7e1055bfda280c351cee3e8c0e3bf",
|
|
499
|
+
},
|
|
500
|
+
"sourcePullRequest": Object {
|
|
501
|
+
"mergeCommit": Object {
|
|
502
|
+
"message": "[APM] Fix broken link to ML when time range is not set (#85976)",
|
|
503
|
+
"sha": "744d6809ded7e1055bfda280c351cee3e8c0e3bf",
|
|
504
|
+
},
|
|
505
|
+
"number": 85976,
|
|
506
|
+
"url": "https://github.com/elastic/kibana/pull/85976",
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
Object {
|
|
510
|
+
"author": Object {
|
|
511
|
+
"email": "sorenlouv@gmail.com",
|
|
512
|
+
"name": "Søren Louv-Jansen",
|
|
513
|
+
},
|
|
514
|
+
"expectedTargetPullRequests": Array [
|
|
515
|
+
Object {
|
|
516
|
+
"branch": "7.x",
|
|
517
|
+
"mergeCommit": Object {
|
|
518
|
+
"message": "[7.x] [APM] Correlations polish (#85116) (#85940)
|
|
519
|
+
|
|
520
|
+
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>",
|
|
521
|
+
"sha": "42b3ecb40c344cd57800b8fa387ae32bad24bfc4",
|
|
522
|
+
},
|
|
523
|
+
"number": 85940,
|
|
524
|
+
"state": "MERGED",
|
|
525
|
+
"url": "https://github.com/elastic/kibana/pull/85940",
|
|
526
|
+
},
|
|
527
|
+
],
|
|
528
|
+
"sourceBranch": "master",
|
|
529
|
+
"sourceCommit": Object {
|
|
530
|
+
"committedDate": "2020-12-15T12:15:00Z",
|
|
531
|
+
"message": "[APM] Correlations polish (#85116)
|
|
532
|
+
|
|
533
|
+
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>",
|
|
534
|
+
"sha": "20638a64e2a895d4e4a6597d4a37b5db7003f1e9",
|
|
535
|
+
},
|
|
536
|
+
"sourcePullRequest": Object {
|
|
537
|
+
"mergeCommit": Object {
|
|
538
|
+
"message": "[APM] Correlations polish (#85116)
|
|
539
|
+
|
|
540
|
+
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>",
|
|
541
|
+
"sha": "20638a64e2a895d4e4a6597d4a37b5db7003f1e9",
|
|
542
|
+
},
|
|
543
|
+
"number": 85116,
|
|
544
|
+
"url": "https://github.com/elastic/kibana/pull/85116",
|
|
545
|
+
},
|
|
546
|
+
},
|
|
547
|
+
Object {
|
|
548
|
+
"author": Object {
|
|
549
|
+
"email": "sorenlouv@gmail.com",
|
|
550
|
+
"name": "Søren Louv-Jansen",
|
|
551
|
+
},
|
|
552
|
+
"expectedTargetPullRequests": Array [
|
|
553
|
+
Object {
|
|
554
|
+
"branch": "7.x",
|
|
555
|
+
"mergeCommit": Object {
|
|
556
|
+
"message": "[7.x] [APM] Improve pointer event hook (#85117) (#85142)",
|
|
557
|
+
"sha": "3b72a4f3cc7c0abd0541073e1d0246b85cea3def",
|
|
558
|
+
},
|
|
559
|
+
"number": 85142,
|
|
560
|
+
"state": "MERGED",
|
|
561
|
+
"url": "https://github.com/elastic/kibana/pull/85142",
|
|
562
|
+
},
|
|
563
|
+
],
|
|
564
|
+
"sourceBranch": "master",
|
|
565
|
+
"sourceCommit": Object {
|
|
566
|
+
"committedDate": "2020-12-07T14:43:58Z",
|
|
567
|
+
"message": "[APM] Improve pointer event hook (#85117)",
|
|
568
|
+
"sha": "cee681afb3c5f87371112fab9a7e5dddbafea0a8",
|
|
569
|
+
},
|
|
570
|
+
"sourcePullRequest": Object {
|
|
571
|
+
"mergeCommit": Object {
|
|
572
|
+
"message": "[APM] Improve pointer event hook (#85117)",
|
|
573
|
+
"sha": "cee681afb3c5f87371112fab9a7e5dddbafea0a8",
|
|
574
|
+
},
|
|
575
|
+
"number": 85117,
|
|
576
|
+
"url": "https://github.com/elastic/kibana/pull/85117",
|
|
577
|
+
},
|
|
578
|
+
},
|
|
579
|
+
]
|
|
580
|
+
`);
|
|
581
|
+
});
|
|
582
|
+
it('throws when missing a filter', async () => {
|
|
583
|
+
const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
|
|
584
|
+
await expect(() => (0, entrypoint_module_1.getCommits)({
|
|
585
|
+
accessToken: accessToken,
|
|
586
|
+
repoName: 'kibana',
|
|
587
|
+
repoOwner: 'elastic',
|
|
588
|
+
maxNumber: 3,
|
|
589
|
+
})).rejects.toThrowError('Must supply one of: `pullNumber`, `sha`, `prFilter` or `author`');
|
|
590
|
+
});
|
|
591
|
+
});
|
|
592
|
+
});
|
|
@@ -24,12 +24,14 @@ export declare function getOptionsFromCliArgs(processArgs: readonly string[], {
|
|
|
24
24
|
githubApiBaseUrlV4?: string | undefined;
|
|
25
25
|
gitAuthorName?: string | undefined;
|
|
26
26
|
gitAuthorEmail?: string | undefined;
|
|
27
|
+
ls?: boolean | undefined;
|
|
27
28
|
mainline?: number | undefined;
|
|
28
29
|
maxNumber?: number | undefined;
|
|
29
30
|
multipleBranches?: boolean | undefined;
|
|
30
31
|
multipleCommits?: boolean | undefined;
|
|
31
32
|
noVerify?: boolean | undefined;
|
|
32
33
|
repoForkOwner?: string | undefined;
|
|
34
|
+
onlyMissing?: boolean | undefined;
|
|
33
35
|
prDescription?: string | undefined;
|
|
34
36
|
prTitle?: string | undefined;
|
|
35
37
|
prFilter?: string | undefined;
|
package/dist/options/cliArgs.js
CHANGED
|
@@ -129,6 +129,10 @@ function getOptionsFromCliArgs(processArgs, { exitOnError = true } = {}) {
|
|
|
129
129
|
hidden: true,
|
|
130
130
|
description: `Path to log file`,
|
|
131
131
|
type: 'string',
|
|
132
|
+
})
|
|
133
|
+
.option('ls', {
|
|
134
|
+
description: 'List commits instead of backporting them',
|
|
135
|
+
type: 'boolean',
|
|
132
136
|
})
|
|
133
137
|
.option('mainline', {
|
|
134
138
|
description: 'Parent id of merge commit. Defaults to 1 when supplied without arguments',
|
|
@@ -188,6 +192,10 @@ function getOptionsFromCliArgs(processArgs, { exitOnError = true } = {}) {
|
|
|
188
192
|
description: 'Create backports in the origin repo',
|
|
189
193
|
type: 'boolean',
|
|
190
194
|
conflicts: ['fork', 'repoForkOwner'],
|
|
195
|
+
})
|
|
196
|
+
.option('onlyMissing', {
|
|
197
|
+
description: 'Only list commits with missing or unmerged backports',
|
|
198
|
+
type: 'boolean',
|
|
191
199
|
})
|
|
192
200
|
.option('path', {
|
|
193
201
|
description: 'Only list commits touching files under the specified path',
|
|
@@ -33,6 +33,7 @@ export declare function getOptionsFromConfigFiles({ optionsFromCliArgs, optionsF
|
|
|
33
33
|
githubApiBaseUrlV3?: string | undefined;
|
|
34
34
|
githubApiBaseUrlV4?: string | undefined;
|
|
35
35
|
logFilePath?: string | undefined;
|
|
36
|
+
ls?: boolean | undefined;
|
|
36
37
|
maxNumber?: number | undefined;
|
|
37
38
|
multiple?: boolean | undefined;
|
|
38
39
|
multipleBranches?: boolean | undefined;
|
|
@@ -23,6 +23,7 @@ export declare function withConfigMigrations({ upstream, labels, branches, ...co
|
|
|
23
23
|
githubApiBaseUrlV4?: string | undefined;
|
|
24
24
|
gitAuthorName?: string | undefined;
|
|
25
25
|
gitAuthorEmail?: string | undefined;
|
|
26
|
+
ls?: boolean | undefined;
|
|
26
27
|
maxNumber?: number | undefined;
|
|
27
28
|
multiple?: boolean | undefined;
|
|
28
29
|
multipleBranches?: boolean | undefined;
|
|
@@ -25,12 +25,14 @@ export declare function getOptions(processArgs: string[], optionsFromModule: Con
|
|
|
25
25
|
githubApiBaseUrlV4?: string | undefined;
|
|
26
26
|
gitAuthorName?: string | undefined;
|
|
27
27
|
gitAuthorEmail?: string | undefined;
|
|
28
|
+
ls?: boolean | undefined;
|
|
28
29
|
mainline?: number | undefined;
|
|
29
30
|
maxNumber: number;
|
|
30
31
|
multipleBranches: boolean;
|
|
31
32
|
multipleCommits: boolean;
|
|
32
33
|
noVerify: boolean;
|
|
33
34
|
repoForkOwner: string;
|
|
35
|
+
onlyMissing?: boolean | undefined;
|
|
34
36
|
prDescription?: string | undefined;
|
|
35
37
|
prTitle?: string | undefined;
|
|
36
38
|
prFilter?: string | undefined;
|