backport 7.4.0 → 8.2.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 +15 -16
- package/dist/backportRun.d.ts +12 -6
- package/dist/backportRun.js +64 -62
- package/dist/entrypoint.cli.js +4 -8
- package/dist/entrypoint.module.d.ts +13 -6
- package/dist/entrypoint.module.js +14 -20
- package/dist/entrypoint.module.private.test.js +47 -346
- package/dist/errors/BackportError.d.ts +19 -0
- package/dist/errors/BackportError.js +29 -0
- package/dist/lib/BackportError.d.ts +19 -0
- package/dist/lib/BackportError.js +29 -0
- package/dist/lib/cherrypickAndCreateTargetPullRequest.d.ts +11 -0
- package/dist/lib/cherrypickAndCreateTargetPullRequest.js +242 -0
- package/dist/lib/cherrypickAndCreateTargetPullRequest.test.d.ts +1 -0
- package/dist/lib/cherrypickAndCreateTargetPullRequest.test.js +321 -0
- package/dist/lib/child-process-promisified.d.ts +25 -0
- package/dist/lib/child-process-promisified.js +60 -0
- package/dist/lib/env.d.ts +9 -0
- package/dist/lib/env.js +33 -0
- package/dist/lib/env.test.d.ts +1 -0
- package/dist/lib/env.test.js +26 -0
- package/dist/lib/getCommits.d.ts +2 -0
- package/dist/lib/getCommits.js +75 -0
- package/dist/lib/getCommitsWithoutBackports.d.ts +11 -0
- package/dist/lib/getCommitsWithoutBackports.js +68 -0
- package/dist/lib/getCommitsWithoutBackports.test.d.ts +1 -0
- package/dist/lib/getCommitsWithoutBackports.test.js +335 -0
- package/dist/lib/getGitConfigAuthor.d.ts +6 -0
- package/dist/lib/getGitConfigAuthor.js +15 -0
- package/dist/lib/getTargetBranches.d.ts +5 -0
- package/dist/lib/getTargetBranches.js +67 -0
- package/dist/lib/getTargetBranches.test.d.ts +1 -0
- package/dist/lib/getTargetBranches.test.js +210 -0
- package/dist/lib/git.d.ts +77 -0
- package/dist/lib/git.js +439 -0
- package/dist/lib/git.private.test.d.ts +1 -0
- package/dist/lib/git.private.test.js +618 -0
- package/dist/lib/git.test.d.ts +1 -0
- package/dist/lib/git.test.js +580 -0
- package/dist/lib/github/commitFormatters.d.ts +3 -0
- package/dist/lib/github/commitFormatters.js +17 -0
- package/dist/lib/github/commitFormatters.test.d.ts +1 -0
- package/dist/lib/github/commitFormatters.test.js +11 -0
- package/dist/lib/github/v3/addAssigneesToPullRequest.d.ts +2 -0
- package/dist/lib/github/v3/addAssigneesToPullRequest.js +32 -0
- package/dist/lib/github/v3/addAssigneesToPullRequest.test.d.ts +1 -0
- package/dist/lib/github/v3/addAssigneesToPullRequest.test.js +27 -0
- package/dist/lib/github/v3/addLabelsToPullRequest.d.ts +2 -0
- package/dist/lib/github/v3/addLabelsToPullRequest.js +30 -0
- package/dist/lib/github/v3/addReviewersToPullRequest.d.ts +2 -0
- package/dist/lib/github/v3/addReviewersToPullRequest.js +32 -0
- package/dist/lib/github/v3/createPullRequest.d.ts +29 -0
- package/dist/lib/github/v3/createPullRequest.js +91 -0
- package/dist/lib/github/v3/createPullRequest.test.d.ts +1 -0
- package/dist/lib/github/v3/createPullRequest.test.js +377 -0
- package/dist/lib/github/v3/createStatusComment.d.ts +11 -0
- package/dist/lib/github/v3/createStatusComment.js +138 -0
- package/dist/lib/github/v3/createStatusComment.test.d.ts +1 -0
- package/dist/lib/github/v3/createStatusComment.test.js +566 -0
- package/dist/lib/github/v3/getGithubV3ErrorMessage.d.ts +14 -0
- package/dist/lib/github/v3/getGithubV3ErrorMessage.js +16 -0
- package/dist/lib/github/v4/FetchPullRequestId.d.ts +2 -0
- package/dist/lib/github/v4/FetchPullRequestId.js +36 -0
- package/dist/lib/github/v4/apiRequestV4.d.ts +31 -0
- package/dist/lib/github/v4/apiRequestV4.js +71 -0
- package/dist/lib/github/v4/apiRequestV4.test.d.ts +1 -0
- package/dist/lib/github/v4/apiRequestV4.test.js +109 -0
- package/dist/lib/github/v4/disablePullRequestAutoMerge.d.ts +2 -0
- package/dist/lib/github/v4/disablePullRequestAutoMerge.js +32 -0
- package/dist/lib/github/v4/enablePullRequestAutoMerge.d.ts +2 -0
- package/dist/lib/github/v4/enablePullRequestAutoMerge.js +50 -0
- package/dist/lib/github/v4/enablePullRequestAutoMerge.private.test.d.ts +1 -0
- package/dist/lib/github/v4/enablePullRequestAutoMerge.private.test.js +112 -0
- package/dist/lib/github/v4/fetchAuthorId.d.ts +10 -0
- package/dist/lib/github/v4/fetchAuthorId.js +28 -0
- package/dist/lib/github/v4/fetchAuthorId.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchAuthorId.private.test.js +25 -0
- package/dist/lib/github/v4/fetchCommits/allFetchers.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchCommits/allFetchers.private.test.js +93 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitByPullNumber.d.ts +11 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitByPullNumber.js +58 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js +136 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitBySha.d.ts +11 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitBySha.js +48 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitBySha.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitBySha.private.test.js +118 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitsByAuthor.d.ts +29 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitsByAuthor.js +110 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +196 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitsByAuthor.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchCommits/fetchCommitsByAuthor.test.js +157 -0
- package/dist/lib/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js +107 -0
- package/dist/lib/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.d.ts +12 -0
- package/dist/lib/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.js +69 -0
- package/dist/lib/github/v4/fetchExistingPullRequest.d.ts +9 -0
- package/dist/lib/github/v4/fetchExistingPullRequest.js +64 -0
- package/dist/lib/github/v4/fetchExistingPullRequest.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchExistingPullRequest.private.test.js +44 -0
- package/dist/lib/github/v4/fetchPullRequestAutoMergeMethod.d.ts +2 -0
- package/dist/lib/github/v4/fetchPullRequestAutoMergeMethod.js +39 -0
- package/dist/lib/github/v4/fetchRemoteProjectConfig.d.ts +8 -0
- package/dist/lib/github/v4/fetchRemoteProjectConfig.js +49 -0
- package/dist/lib/github/v4/fetchRemoteProjectConfig.private.test.d.ts +1 -0
- package/dist/lib/github/v4/fetchRemoteProjectConfig.private.test.js +49 -0
- package/dist/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +72 -0
- package/dist/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.js +78 -0
- package/dist/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.d.ts +1 -0
- package/dist/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.js +116 -0
- package/dist/lib/github/v4/getOptionsFromGithub/query.d.ts +16 -0
- package/dist/lib/github/v4/getOptionsFromGithub/query.js +29 -0
- package/dist/lib/github/v4/getRepoOwnerAndNameFromGitRemotes.d.ts +29 -0
- package/dist/lib/github/v4/getRepoOwnerAndNameFromGitRemotes.js +61 -0
- package/dist/lib/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.d.ts +1 -0
- package/dist/lib/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js +72 -0
- package/dist/lib/github/v4/mocks/commitsByAuthorMock.d.ts +2 -0
- package/dist/lib/github/v4/mocks/commitsByAuthorMock.js +176 -0
- package/dist/lib/github/v4/throwOnInvalidAccessToken.d.ts +7 -0
- package/dist/lib/github/v4/throwOnInvalidAccessToken.js +45 -0
- package/dist/lib/github/v4/throwOnInvalidAccessToken.test.d.ts +1 -0
- package/dist/lib/github/v4/throwOnInvalidAccessToken.test.js +87 -0
- package/dist/lib/github/v4/validateTargetBranches.d.ts +14 -0
- package/dist/lib/github/v4/validateTargetBranches.js +46 -0
- package/dist/lib/github/v4/validateTargetBranches.private.test.d.ts +1 -0
- package/dist/lib/github/v4/validateTargetBranches.private.test.js +51 -0
- package/dist/lib/logger.d.ts +11 -0
- package/dist/lib/logger.js +80 -0
- package/dist/lib/ora.d.ts +2 -0
- package/dist/lib/ora.js +21 -0
- package/dist/lib/prompt.test.d.ts +1 -0
- package/dist/lib/prompt.test.js +139 -0
- package/dist/lib/prompts.d.ts +17 -0
- package/dist/lib/prompts.js +132 -0
- package/dist/lib/remoteConfig.d.ts +20 -0
- package/dist/lib/remoteConfig.js +52 -0
- package/dist/lib/sequentially.d.ts +1 -0
- package/dist/lib/sequentially.js +10 -0
- package/dist/lib/setupRepo.d.ts +2 -0
- package/dist/lib/setupRepo.js +56 -0
- package/dist/lib/setupRepo.test.d.ts +1 -0
- package/dist/lib/setupRepo.test.js +278 -0
- package/dist/lib/sourceCommit/getExpectedTargetPullRequests.d.ts +16 -0
- package/dist/lib/sourceCommit/getExpectedTargetPullRequests.js +102 -0
- package/dist/lib/sourceCommit/getExpectedTargetPullRequests.test.d.ts +1 -0
- package/dist/lib/sourceCommit/getExpectedTargetPullRequests.test.js +467 -0
- package/dist/lib/sourceCommit/getMockSourceCommit.d.ts +26 -0
- package/dist/lib/sourceCommit/getMockSourceCommit.js +103 -0
- package/dist/lib/sourceCommit/parseSourceCommit.d.ts +108 -0
- package/dist/lib/sourceCommit/parseSourceCommit.js +123 -0
- package/dist/lib/sourceCommit/parseSourceCommit.test.d.ts +1 -0
- package/dist/lib/sourceCommit/parseSourceCommit.test.js +226 -0
- package/dist/options/ConfigOptions.d.ts +4 -2
- package/dist/options/cliArgs.d.ts +14 -6
- package/dist/options/cliArgs.js +50 -22
- package/dist/options/cliArgs.test.js +128 -4
- package/dist/options/config/config.d.ts +5 -4
- package/dist/options/config/config.js +3 -5
- package/dist/options/config/config.test.js +0 -1
- package/dist/options/config/globalConfig.d.ts +5 -3
- package/dist/options/config/globalConfig.js +17 -14
- package/dist/options/config/readConfigFile.d.ts +5 -3
- package/dist/options/config/readConfigFile.js +2 -2
- package/dist/options/options.d.ts +41 -5
- package/dist/options/options.js +24 -24
- package/dist/options/options.test.js +117 -55
- package/dist/runSequentially.d.ts +14 -9
- package/dist/runSequentially.js +27 -12
- package/dist/scripts/postinstall.js +4 -3
- package/dist/scripts/postinstall.test.js +6 -2
- package/dist/services/BackportError.d.ts +19 -0
- package/dist/services/BackportError.js +29 -0
- package/dist/services/HandledBackportError.d.ts +19 -0
- package/dist/services/HandledBackportError.js +29 -0
- package/dist/services/HandledError.d.ts +2 -2
- package/dist/services/HandledError.js +7 -7
- package/dist/services/child-process-promisified.d.ts +19 -3
- package/dist/services/child-process-promisified.js +46 -17
- package/dist/services/git.d.ts +6 -7
- package/dist/services/git.integration.test.js +381 -65
- package/dist/services/git.js +189 -123
- package/dist/services/git.private.test.d.ts +1 -0
- package/dist/services/git.private.test.js +618 -0
- package/dist/services/git.test.js +167 -124
- package/dist/services/github/v3/addAssigneesToPullRequest.js +1 -1
- package/dist/services/github/v3/addLabelsToPullRequest.js +1 -1
- package/dist/services/github/v3/addReviewersToPullRequest.js +2 -1
- package/dist/services/github/v3/createPullRequest.js +4 -2
- package/dist/services/github/v3/createStatusComment.js +16 -17
- package/dist/services/github/v3/createStatusComment.test.js +20 -9
- package/dist/services/github/v4/apiRequestV4.js +2 -2
- package/dist/services/github/v4/apiRequestV4.test.js +2 -2
- package/dist/services/github/v4/enablePullRequestAutoMerge.js +2 -4
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.js +4 -3
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js +5 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.js +3 -2
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.js +5 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.js +4 -3
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +5 -1
- package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.js +3 -2
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.js +2 -2
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js +5 -1
- package/dist/services/github/v4/throwOnInvalidAccessToken.js +5 -5
- package/dist/services/logger.js +5 -1
- package/dist/services/test.d.ts +1 -0
- package/dist/services/test.js +23 -0
- package/dist/state.d.ts +0 -0
- package/dist/state.js +1 -0
- package/dist/test/e2e/cli/commit-author.private.test.js +4 -4
- package/dist/test/e2e/cli/different-merge-strategies.private.test.js +27 -25
- package/dist/test/e2e/cli/entrypoint.cli.private.test.js +53 -75
- package/dist/test/e2e/cli/error-handling-interactive-mode.private.test.d.ts +1 -0
- package/dist/test/e2e/cli/error-handling-interactive-mode.private.test.js +80 -0
- package/dist/test/e2e/cli/error-handling-non-interactive-mode.private.test.d.ts +1 -0
- package/dist/test/e2e/cli/error-handling-non-interactive-mode.private.test.js +199 -0
- package/dist/test/e2e/cli/interactive-error-handling.private.test.d.ts +1 -0
- package/dist/test/e2e/cli/interactive-error-handling.private.test.js +80 -0
- package/dist/test/e2e/cli/non-interactive-error-handling.private.test.d.ts +1 -0
- package/dist/test/e2e/cli/non-interactive-error-handling.private.test.js +198 -0
- package/dist/test/e2e/cli/repo-with-backportrc-removed.private.test.js +28 -29
- package/dist/test/e2e/cli/runBackportViaCli.d.ts +6 -2
- package/dist/test/e2e/cli/runBackportViaCli.js +44 -23
- package/dist/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js +22 -14
- package/dist/test/e2e/module/entrypoint.module.mutation.test.js +28 -21
- package/dist/test/handleUnbackportedPullRequests.private.test.js +11 -8
- package/dist/test/sandbox.js +5 -1
- package/dist/test/setupFiles/automatic-mocks.js +6 -2
- package/dist/ui/cherrypickAndCreateTargetPullRequest.js +4 -4
- package/dist/ui/cherrypickAndCreateTargetPullRequest.test.js +7 -159
- package/dist/ui/getCommits.js +2 -2
- package/dist/ui/getCommitsWithoutBackports.test.js +5 -1
- package/dist/ui/getGitConfigAuthor.js +1 -1
- package/dist/ui/getTargetBranches.js +3 -3
- package/dist/ui/getTargetBranches.test.js +5 -1
- package/dist/ui/ora.d.ts +1 -8
- package/dist/ui/setupRepo.js +3 -3
- package/dist/ui/setupRepo.test.js +98 -61
- package/dist/utils/isErrnoError.d.ts +2 -0
- package/dist/utils/isErrnoError.js +7 -0
- package/dist/utils/packageVersion.d.ts +1 -1
- package/dist/utils/packageVersion.js +1 -1
- package/package.json +19 -19
- package/yarn.lock +472 -701
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const entrypoint_module_1 = require("./entrypoint.module");
|
|
4
|
+
const commitFormatters_1 = require("./lib/github/commitFormatters");
|
|
4
5
|
const getDevAccessToken_1 = require("./test/private/getDevAccessToken");
|
|
5
6
|
const accessToken = (0, getDevAccessToken_1.getDevAccessToken)();
|
|
6
7
|
jest.unmock('del');
|
|
@@ -12,23 +13,27 @@ describe('entrypoint.module', () => {
|
|
|
12
13
|
let response;
|
|
13
14
|
beforeAll(async () => {
|
|
14
15
|
response = (await (0, entrypoint_module_1.backportRun)({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
options: {
|
|
17
|
+
repoOwner: 'backport-org',
|
|
18
|
+
repoName: 'repo-with-conflicts',
|
|
19
|
+
interactive: false,
|
|
20
|
+
accessToken,
|
|
21
|
+
pullNumber: 12,
|
|
22
|
+
targetBranches: ['7.x'],
|
|
23
|
+
},
|
|
21
24
|
}));
|
|
22
25
|
});
|
|
23
26
|
it('should have overall status=success', async () => {
|
|
24
27
|
expect(response.status).toBe('success');
|
|
25
28
|
});
|
|
26
|
-
it('should
|
|
27
|
-
expect(response.results[0].status).toBe('
|
|
29
|
+
it('should fail with "handled-error"', () => {
|
|
30
|
+
expect(response.results[0].status).toBe('handled-error');
|
|
28
31
|
});
|
|
29
32
|
it('should have correct error code', () => {
|
|
30
33
|
//@ts-expect-error
|
|
31
34
|
expect(response.results[0].error.errorContext.code).toBe('merge-conflict-exception');
|
|
35
|
+
//@ts-expect-error
|
|
36
|
+
expect(response.results[0].error.message).toBe('Commit could not be cherrypicked due to conflicts in: la-liga.md');
|
|
32
37
|
});
|
|
33
38
|
it('contains a list of conflicting files', () => {
|
|
34
39
|
//@ts-expect-error
|
|
@@ -39,29 +44,34 @@ describe('entrypoint.module', () => {
|
|
|
39
44
|
let response;
|
|
40
45
|
beforeAll(async () => {
|
|
41
46
|
response = (await (0, entrypoint_module_1.backportRun)({
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
options: {
|
|
48
|
+
repoOwner: 'backport-org',
|
|
49
|
+
repoName: 'repo-with-conflicts',
|
|
50
|
+
interactive: false,
|
|
51
|
+
accessToken,
|
|
52
|
+
pullNumber: 12,
|
|
53
|
+
},
|
|
47
54
|
}));
|
|
48
55
|
});
|
|
49
|
-
it('should
|
|
50
|
-
expect(response.status).toBe('
|
|
56
|
+
it('should correct error code', async () => {
|
|
57
|
+
expect(response.status).toBe('aborted');
|
|
51
58
|
//@ts-expect-error
|
|
52
59
|
expect(response.error.errorContext.code).toBe('no-branches-exception');
|
|
60
|
+
expect(response.error.message).toBe('There are no branches to backport to. Aborting.');
|
|
53
61
|
});
|
|
54
62
|
});
|
|
55
63
|
describe('when backporting', () => {
|
|
56
64
|
let response;
|
|
57
65
|
beforeAll(async () => {
|
|
58
66
|
response = (await (0, entrypoint_module_1.backportRun)({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
67
|
+
options: {
|
|
68
|
+
repoOwner: 'backport-org',
|
|
69
|
+
repoName: 'repo-with-conflicts',
|
|
70
|
+
interactive: false,
|
|
71
|
+
accessToken,
|
|
72
|
+
pullNumber: 8,
|
|
73
|
+
dryRun: true,
|
|
74
|
+
},
|
|
65
75
|
}));
|
|
66
76
|
});
|
|
67
77
|
it('should return successful backport response', async () => {
|
|
@@ -215,337 +225,28 @@ describe('entrypoint.module', () => {
|
|
|
215
225
|
prFilter: 'label:Team:apm merged:<2021-06-02 base:master',
|
|
216
226
|
maxNumber: 3,
|
|
217
227
|
});
|
|
218
|
-
|
|
228
|
+
const commitMessage = commits.map((commit) => {
|
|
229
|
+
return {
|
|
230
|
+
...commit.sourceCommit,
|
|
231
|
+
message: (0, commitFormatters_1.getFirstLine)(commit.sourceCommit.message),
|
|
232
|
+
};
|
|
233
|
+
});
|
|
234
|
+
expect(commitMessage).toMatchInlineSnapshot(`
|
|
219
235
|
Array [
|
|
220
236
|
Object {
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
"expectedTargetPullRequests": Array [
|
|
226
|
-
Object {
|
|
227
|
-
"branch": "7.x",
|
|
228
|
-
"mergeCommit": Object {
|
|
229
|
-
"message": "[7.x] Migrate most plugins to synchronous lifecycle (#89562) (#90579)
|
|
230
|
-
|
|
231
|
-
* Migrate most plugins to synchronous lifecycle (#89562)
|
|
232
|
-
|
|
233
|
-
* first pass
|
|
234
|
-
|
|
235
|
-
* migrate more plugins
|
|
236
|
-
|
|
237
|
-
* migrate yet more plugins
|
|
238
|
-
|
|
239
|
-
* more oss plugins
|
|
240
|
-
|
|
241
|
-
* fix test file
|
|
242
|
-
|
|
243
|
-
* change Plugin signature on the client-side too
|
|
244
|
-
|
|
245
|
-
* fix test types
|
|
246
|
-
|
|
247
|
-
* migrate OSS client-side plugins
|
|
248
|
-
|
|
249
|
-
* migrate OSS client-side test plugins
|
|
250
|
-
|
|
251
|
-
* migrate xpack client-side plugins
|
|
252
|
-
|
|
253
|
-
* revert fix attempt on fleet plugin
|
|
254
|
-
|
|
255
|
-
* fix presentation start signature
|
|
256
|
-
|
|
257
|
-
* fix yet another signature
|
|
258
|
-
|
|
259
|
-
* add warnings for server-side async plugins in dev mode
|
|
260
|
-
|
|
261
|
-
* remove unused import
|
|
262
|
-
|
|
263
|
-
* fix isPromise
|
|
264
|
-
|
|
265
|
-
* Add client-side deprecations
|
|
266
|
-
|
|
267
|
-
* update migration examples
|
|
268
|
-
|
|
269
|
-
* update generated doc
|
|
270
|
-
|
|
271
|
-
* fix xpack unit tests
|
|
272
|
-
|
|
273
|
-
* nit
|
|
274
|
-
|
|
275
|
-
* (will be reverted) explicitly await for license to be ready in the auth hook
|
|
276
|
-
|
|
277
|
-
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
278
|
-
|
|
279
|
-
This reverts commit fdf73feb
|
|
280
|
-
|
|
281
|
-
* restore await on on promise contracts
|
|
282
|
-
|
|
283
|
-
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
284
|
-
|
|
285
|
-
This reverts commit fdf73feb
|
|
286
|
-
|
|
287
|
-
* Revert \\"restore await on on promise contracts\\"
|
|
288
|
-
|
|
289
|
-
This reverts commit c5f2fe51
|
|
290
|
-
|
|
291
|
-
* add delay before starting tests in FTR
|
|
292
|
-
|
|
293
|
-
* update deprecation ts doc
|
|
294
|
-
|
|
295
|
-
* add explicit contract for monitoring setup
|
|
296
|
-
|
|
297
|
-
* migrate monitoring plugin to sync
|
|
298
|
-
|
|
299
|
-
* change plugin timeout to 10sec
|
|
300
|
-
|
|
301
|
-
* use delay instead of silence
|
|
302
|
-
# Conflicts:
|
|
303
|
-
# x-pack/plugins/xpack_legacy/server/plugin.ts
|
|
304
|
-
|
|
305
|
-
* fix mock",
|
|
306
|
-
"sha": "97f89e256b14dd01a4f20355dd04e8e27241c90a",
|
|
307
|
-
},
|
|
308
|
-
"number": 90579,
|
|
309
|
-
"state": "MERGED",
|
|
310
|
-
"url": "https://github.com/elastic/kibana/pull/90579",
|
|
311
|
-
},
|
|
312
|
-
],
|
|
313
|
-
"sourceBranch": "master",
|
|
314
|
-
"sourceCommit": Object {
|
|
315
|
-
"committedDate": "2021-02-08T09:19:54Z",
|
|
316
|
-
"message": "Migrate most plugins to synchronous lifecycle (#89562)
|
|
317
|
-
|
|
318
|
-
* first pass
|
|
319
|
-
|
|
320
|
-
* migrate more plugins
|
|
321
|
-
|
|
322
|
-
* migrate yet more plugins
|
|
323
|
-
|
|
324
|
-
* more oss plugins
|
|
325
|
-
|
|
326
|
-
* fix test file
|
|
327
|
-
|
|
328
|
-
* change Plugin signature on the client-side too
|
|
329
|
-
|
|
330
|
-
* fix test types
|
|
331
|
-
|
|
332
|
-
* migrate OSS client-side plugins
|
|
333
|
-
|
|
334
|
-
* migrate OSS client-side test plugins
|
|
335
|
-
|
|
336
|
-
* migrate xpack client-side plugins
|
|
337
|
-
|
|
338
|
-
* revert fix attempt on fleet plugin
|
|
339
|
-
|
|
340
|
-
* fix presentation start signature
|
|
341
|
-
|
|
342
|
-
* fix yet another signature
|
|
343
|
-
|
|
344
|
-
* add warnings for server-side async plugins in dev mode
|
|
345
|
-
|
|
346
|
-
* remove unused import
|
|
347
|
-
|
|
348
|
-
* fix isPromise
|
|
349
|
-
|
|
350
|
-
* Add client-side deprecations
|
|
351
|
-
|
|
352
|
-
* update migration examples
|
|
353
|
-
|
|
354
|
-
* update generated doc
|
|
355
|
-
|
|
356
|
-
* fix xpack unit tests
|
|
357
|
-
|
|
358
|
-
* nit
|
|
359
|
-
|
|
360
|
-
* (will be reverted) explicitly await for license to be ready in the auth hook
|
|
361
|
-
|
|
362
|
-
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
363
|
-
|
|
364
|
-
This reverts commit fdf73feb
|
|
365
|
-
|
|
366
|
-
* restore await on on promise contracts
|
|
367
|
-
|
|
368
|
-
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
369
|
-
|
|
370
|
-
This reverts commit fdf73feb
|
|
371
|
-
|
|
372
|
-
* Revert \\"restore await on on promise contracts\\"
|
|
373
|
-
|
|
374
|
-
This reverts commit c5f2fe51
|
|
375
|
-
|
|
376
|
-
* add delay before starting tests in FTR
|
|
377
|
-
|
|
378
|
-
* update deprecation ts doc
|
|
379
|
-
|
|
380
|
-
* add explicit contract for monitoring setup
|
|
381
|
-
|
|
382
|
-
* migrate monitoring plugin to sync
|
|
383
|
-
|
|
384
|
-
* change plugin timeout to 10sec
|
|
385
|
-
|
|
386
|
-
* use delay instead of silence",
|
|
387
|
-
"sha": "3b3327dbc3c3041c9681e0cd86bd31cf411dc460",
|
|
388
|
-
},
|
|
389
|
-
"sourcePullRequest": Object {
|
|
390
|
-
"mergeCommit": Object {
|
|
391
|
-
"message": "Migrate most plugins to synchronous lifecycle (#89562)
|
|
392
|
-
|
|
393
|
-
* first pass
|
|
394
|
-
|
|
395
|
-
* migrate more plugins
|
|
396
|
-
|
|
397
|
-
* migrate yet more plugins
|
|
398
|
-
|
|
399
|
-
* more oss plugins
|
|
400
|
-
|
|
401
|
-
* fix test file
|
|
402
|
-
|
|
403
|
-
* change Plugin signature on the client-side too
|
|
404
|
-
|
|
405
|
-
* fix test types
|
|
406
|
-
|
|
407
|
-
* migrate OSS client-side plugins
|
|
408
|
-
|
|
409
|
-
* migrate OSS client-side test plugins
|
|
410
|
-
|
|
411
|
-
* migrate xpack client-side plugins
|
|
412
|
-
|
|
413
|
-
* revert fix attempt on fleet plugin
|
|
414
|
-
|
|
415
|
-
* fix presentation start signature
|
|
416
|
-
|
|
417
|
-
* fix yet another signature
|
|
418
|
-
|
|
419
|
-
* add warnings for server-side async plugins in dev mode
|
|
420
|
-
|
|
421
|
-
* remove unused import
|
|
422
|
-
|
|
423
|
-
* fix isPromise
|
|
424
|
-
|
|
425
|
-
* Add client-side deprecations
|
|
426
|
-
|
|
427
|
-
* update migration examples
|
|
428
|
-
|
|
429
|
-
* update generated doc
|
|
430
|
-
|
|
431
|
-
* fix xpack unit tests
|
|
432
|
-
|
|
433
|
-
* nit
|
|
434
|
-
|
|
435
|
-
* (will be reverted) explicitly await for license to be ready in the auth hook
|
|
436
|
-
|
|
437
|
-
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
438
|
-
|
|
439
|
-
This reverts commit fdf73feb
|
|
440
|
-
|
|
441
|
-
* restore await on on promise contracts
|
|
442
|
-
|
|
443
|
-
* Revert \\"(will be reverted) explicitly await for license to be ready in the auth hook\\"
|
|
444
|
-
|
|
445
|
-
This reverts commit fdf73feb
|
|
446
|
-
|
|
447
|
-
* Revert \\"restore await on on promise contracts\\"
|
|
448
|
-
|
|
449
|
-
This reverts commit c5f2fe51
|
|
450
|
-
|
|
451
|
-
* add delay before starting tests in FTR
|
|
452
|
-
|
|
453
|
-
* update deprecation ts doc
|
|
454
|
-
|
|
455
|
-
* add explicit contract for monitoring setup
|
|
456
|
-
|
|
457
|
-
* migrate monitoring plugin to sync
|
|
458
|
-
|
|
459
|
-
* change plugin timeout to 10sec
|
|
460
|
-
|
|
461
|
-
* use delay instead of silence",
|
|
462
|
-
"sha": "3b3327dbc3c3041c9681e0cd86bd31cf411dc460",
|
|
463
|
-
},
|
|
464
|
-
"number": 89562,
|
|
465
|
-
"url": "https://github.com/elastic/kibana/pull/89562",
|
|
466
|
-
},
|
|
237
|
+
"committedDate": "2021-06-01T15:53:07Z",
|
|
238
|
+
"message": "Upgrade EUI to v33.0.0 (#99382)",
|
|
239
|
+
"sha": "38fd8a268ad7661d92f0d84c52d6f0a3d84c9801",
|
|
467
240
|
},
|
|
468
241
|
Object {
|
|
469
|
-
"
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
},
|
|
473
|
-
"expectedTargetPullRequests": Array [
|
|
474
|
-
Object {
|
|
475
|
-
"branch": "7.x",
|
|
476
|
-
"mergeCommit": Object {
|
|
477
|
-
"message": "Upgrade to hapi version 20 (#85406) (#86592)",
|
|
478
|
-
"sha": "777c80d8a0f72be16091510d0cb5d09693ba6bb4",
|
|
479
|
-
},
|
|
480
|
-
"number": 86592,
|
|
481
|
-
"state": "MERGED",
|
|
482
|
-
"url": "https://github.com/elastic/kibana/pull/86592",
|
|
483
|
-
},
|
|
484
|
-
],
|
|
485
|
-
"sourceBranch": "master",
|
|
486
|
-
"sourceCommit": Object {
|
|
487
|
-
"committedDate": "2020-12-19T12:10:11Z",
|
|
488
|
-
"message": "Upgrade to hapi version 20 (#85406)",
|
|
489
|
-
"sha": "e8b21bc6c12cfd793c46e1d86577d5e5ec8a71f8",
|
|
490
|
-
},
|
|
491
|
-
"sourcePullRequest": Object {
|
|
492
|
-
"mergeCommit": Object {
|
|
493
|
-
"message": "Upgrade to hapi version 20 (#85406)",
|
|
494
|
-
"sha": "e8b21bc6c12cfd793c46e1d86577d5e5ec8a71f8",
|
|
495
|
-
},
|
|
496
|
-
"number": 85406,
|
|
497
|
-
"url": "https://github.com/elastic/kibana/pull/85406",
|
|
498
|
-
},
|
|
242
|
+
"committedDate": "2021-02-08T09:19:54Z",
|
|
243
|
+
"message": "Migrate most plugins to synchronous lifecycle (#89562)",
|
|
244
|
+
"sha": "3b3327dbc3c3041c9681e0cd86bd31cf411dc460",
|
|
499
245
|
},
|
|
500
246
|
Object {
|
|
501
|
-
"
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
},
|
|
505
|
-
"expectedTargetPullRequests": Array [
|
|
506
|
-
Object {
|
|
507
|
-
"branch": "7.x",
|
|
508
|
-
"mergeCommit": Object {
|
|
509
|
-
"message": "Move EUI styled components integration to kibana_react (#86065) (#89217)
|
|
510
|
-
|
|
511
|
-
...from xpack_legacy.
|
|
512
|
-
|
|
513
|
-
Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.
|
|
514
|
-
|
|
515
|
-
Fixes #78248.",
|
|
516
|
-
"sha": "57b798474ae5ec2892a06ffa5706c5dd405db137",
|
|
517
|
-
},
|
|
518
|
-
"number": 89217,
|
|
519
|
-
"state": "MERGED",
|
|
520
|
-
"url": "https://github.com/elastic/kibana/pull/89217",
|
|
521
|
-
},
|
|
522
|
-
],
|
|
523
|
-
"sourceBranch": "master",
|
|
524
|
-
"sourceCommit": Object {
|
|
525
|
-
"committedDate": "2021-01-25T19:48:35Z",
|
|
526
|
-
"message": "Move EUI styled components integration to kibana_react (#86065)
|
|
527
|
-
|
|
528
|
-
...from xpack_legacy.
|
|
529
|
-
|
|
530
|
-
Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.
|
|
531
|
-
|
|
532
|
-
Fixes #78248.",
|
|
533
|
-
"sha": "e5588a129b1a0b2796822d4773176cc712dd5318",
|
|
534
|
-
},
|
|
535
|
-
"sourcePullRequest": Object {
|
|
536
|
-
"mergeCommit": Object {
|
|
537
|
-
"message": "Move EUI styled components integration to kibana_react (#86065)
|
|
538
|
-
|
|
539
|
-
...from xpack_legacy.
|
|
540
|
-
|
|
541
|
-
Remove the duplicated typings from the observability plugin and only use the ones from kibana_react.
|
|
542
|
-
|
|
543
|
-
Fixes #78248.",
|
|
544
|
-
"sha": "e5588a129b1a0b2796822d4773176cc712dd5318",
|
|
545
|
-
},
|
|
546
|
-
"number": 86065,
|
|
547
|
-
"url": "https://github.com/elastic/kibana/pull/86065",
|
|
548
|
-
},
|
|
247
|
+
"committedDate": "2021-04-01T12:40:47Z",
|
|
248
|
+
"message": "TS Incremental build exclude test files (#95610)",
|
|
249
|
+
"sha": "b6e582c53ebb9c496c232408066b128d2ca2f92c",
|
|
549
250
|
},
|
|
550
251
|
]
|
|
551
252
|
`);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Commit } from '../lib/sourceCommit/parseSourceCommit';
|
|
2
|
+
declare type ErrorContext = {
|
|
3
|
+
code: 'merge-conflict-exception';
|
|
4
|
+
conflictingFiles: string[];
|
|
5
|
+
commitsWithoutBackports: {
|
|
6
|
+
formatted: string;
|
|
7
|
+
commit: Commit;
|
|
8
|
+
}[];
|
|
9
|
+
} | {
|
|
10
|
+
code: 'message-only-exception';
|
|
11
|
+
message: string;
|
|
12
|
+
} | {
|
|
13
|
+
code: 'no-branches-exception' | 'abort-exception';
|
|
14
|
+
};
|
|
15
|
+
export declare class BackportError extends Error {
|
|
16
|
+
errorContext: ErrorContext;
|
|
17
|
+
constructor(errorContextOrString: ErrorContext | string);
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BackportError = void 0;
|
|
4
|
+
function getMessage(errorContext) {
|
|
5
|
+
switch (errorContext.code) {
|
|
6
|
+
case 'merge-conflict-exception':
|
|
7
|
+
return `Commit could not be cherrypicked due to conflicts in: ${errorContext.conflictingFiles.join(',')}`;
|
|
8
|
+
case 'no-branches-exception':
|
|
9
|
+
return 'There are no branches to backport to. Aborting.';
|
|
10
|
+
case 'abort-exception':
|
|
11
|
+
return 'Aborted';
|
|
12
|
+
case 'message-only-exception':
|
|
13
|
+
return errorContext.message;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class BackportError extends Error {
|
|
17
|
+
constructor(errorContextOrString) {
|
|
18
|
+
const errorContext = typeof errorContextOrString === 'string'
|
|
19
|
+
? { code: 'message-only-exception', message: errorContextOrString }
|
|
20
|
+
: errorContextOrString;
|
|
21
|
+
const message = getMessage(errorContext);
|
|
22
|
+
super(message);
|
|
23
|
+
Error.captureStackTrace(this, BackportError);
|
|
24
|
+
this.name = 'BackportError';
|
|
25
|
+
this.message = message;
|
|
26
|
+
this.errorContext = errorContext;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.BackportError = BackportError;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Commit } from './sourceCommit/parseSourceCommit';
|
|
2
|
+
declare type ErrorContext = {
|
|
3
|
+
code: 'merge-conflict-exception';
|
|
4
|
+
conflictingFiles: string[];
|
|
5
|
+
commitsWithoutBackports: {
|
|
6
|
+
formatted: string;
|
|
7
|
+
commit: Commit;
|
|
8
|
+
}[];
|
|
9
|
+
} | {
|
|
10
|
+
code: 'message-only-exception';
|
|
11
|
+
message: string;
|
|
12
|
+
} | {
|
|
13
|
+
code: 'no-branches-exception' | 'abort-conflict-resolution-exception';
|
|
14
|
+
};
|
|
15
|
+
export declare class BackportError extends Error {
|
|
16
|
+
errorContext: ErrorContext;
|
|
17
|
+
constructor(errorContextOrString: ErrorContext | string);
|
|
18
|
+
}
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BackportError = void 0;
|
|
4
|
+
function getMessage(errorContext) {
|
|
5
|
+
switch (errorContext.code) {
|
|
6
|
+
case 'merge-conflict-exception':
|
|
7
|
+
return `Commit could not be cherrypicked due to conflicts in: ${errorContext.conflictingFiles.join(',')}`;
|
|
8
|
+
case 'no-branches-exception':
|
|
9
|
+
return 'There are no branches to backport to. Aborting.';
|
|
10
|
+
case 'abort-conflict-resolution-exception':
|
|
11
|
+
return 'Conflict resolution was aborted by the user';
|
|
12
|
+
case 'message-only-exception':
|
|
13
|
+
return errorContext.message;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
class BackportError extends Error {
|
|
17
|
+
constructor(errorContextOrString) {
|
|
18
|
+
const errorContext = typeof errorContextOrString === 'string'
|
|
19
|
+
? { code: 'message-only-exception', message: errorContextOrString }
|
|
20
|
+
: errorContextOrString;
|
|
21
|
+
const message = getMessage(errorContext);
|
|
22
|
+
super(message);
|
|
23
|
+
Error.captureStackTrace(this, BackportError);
|
|
24
|
+
this.name = 'BackportError';
|
|
25
|
+
this.message = message;
|
|
26
|
+
this.errorContext = errorContext;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.BackportError = BackportError;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ValidConfigOptions } from '../options/options';
|
|
2
|
+
import { Commit } from './sourceCommit/parseSourceCommit';
|
|
3
|
+
export declare function cherrypickAndCreateTargetPullRequest({ options, commits, targetBranch, }: {
|
|
4
|
+
options: ValidConfigOptions;
|
|
5
|
+
commits: Commit[];
|
|
6
|
+
targetBranch: string;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
url: string;
|
|
9
|
+
number: number;
|
|
10
|
+
didUpdate: boolean;
|
|
11
|
+
}>;
|