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
|
@@ -101,7 +101,7 @@ describe('getTargetBranches', () => {
|
|
|
101
101
|
expectedTargetPullRequests: [
|
|
102
102
|
{ branch: '7.2', state: 'MERGED' },
|
|
103
103
|
{ branch: '7.1', state: 'OPEN' },
|
|
104
|
-
{ branch: '7.x', state: '
|
|
104
|
+
{ branch: '7.x', state: 'NOT_CREATED' },
|
|
105
105
|
],
|
|
106
106
|
},
|
|
107
107
|
];
|
|
@@ -142,7 +142,7 @@ describe('getTargetBranches', () => {
|
|
|
142
142
|
},
|
|
143
143
|
},
|
|
144
144
|
sourceBranch: 'master',
|
|
145
|
-
expectedTargetPullRequests: [{ branch: '7.x', state: '
|
|
145
|
+
expectedTargetPullRequests: [{ branch: '7.x', state: 'NOT_CREATED' }],
|
|
146
146
|
},
|
|
147
147
|
];
|
|
148
148
|
await (0, getTargetBranches_1.getTargetBranches)(options, commits);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterUnmergedCommits = void 0;
|
|
4
|
+
function filterUnmergedCommits(commit) {
|
|
5
|
+
return commit.expectedTargetPullRequests.some((pr) => pr.state !== 'MERGED');
|
|
6
|
+
}
|
|
7
|
+
exports.filterUnmergedCommits = filterUnmergedCommits;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.filterUnmergedCommits = void 0;
|
|
4
|
+
function filterUnmergedCommits(commit) {
|
|
5
|
+
return commit.expectedTargetPullRequests.some((pr) => pr.state !== 'MERGED');
|
|
6
|
+
}
|
|
7
|
+
exports.filterUnmergedCommits = filterUnmergedCommits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "7.3.
|
|
1
|
+
export declare const PACKAGE_VERSION = "7.3.5";
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"branches",
|
|
15
15
|
"branching"
|
|
16
16
|
],
|
|
17
|
-
"version": "7.3.
|
|
17
|
+
"version": "7.3.5",
|
|
18
18
|
"main": "./dist/entrypoint.module.js",
|
|
19
19
|
"types": "dist/entrypoint.module.d.ts",
|
|
20
20
|
"bin": {
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
"test-all": "jest --config ./jest.config.all.js",
|
|
34
34
|
"test-mutation": "jest --config ./jest.config.mutation.js",
|
|
35
35
|
"test-private": "jest --config ./jest.config.private.js",
|
|
36
|
-
"test": "jest"
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"docker-run": "./docker/backport.sh"
|
|
37
38
|
},
|
|
38
39
|
"lint-staged": {
|
|
39
40
|
"*.ts": [
|