backport 8.3.1 → 8.4.2
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 +11 -178
- package/dist/lib/cherrypickAndCreateTargetPullRequest.js +42 -21
- package/dist/lib/child-process-promisified.js +2 -2
- package/dist/lib/git.d.ts +4 -3
- package/dist/lib/git.js +22 -29
- package/dist/lib/git.private.test.js +10 -7
- package/dist/lib/git.test.js +47 -15
- package/dist/lib/github/v4/apiRequestV4.js +14 -8
- package/dist/lib/github/v4/fetchCommits/allFetchers.private.test.js +1 -0
- package/dist/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +1 -0
- package/dist/lib/ora.d.ts +1 -0
- package/dist/options/ConfigOptions.d.ts +1 -0
- package/dist/options/cliArgs.d.ts +1 -0
- package/dist/options/cliArgs.js +5 -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 +3 -2
- package/dist/options/options.test.js +5 -4
- package/dist/test/e2e/cli/date-filters.private.test.js +1 -0
- package/dist/test/e2e/cli/different-merge-strategies.private.test.js +122 -6
- package/dist/test/e2e/cli/entrypoint.cli.private.test.js +2 -0
- package/dist/test/e2e/cli/error-handling-interactive-mode.private.test.js +27 -13
- package/dist/test/e2e/cli/error-handling-non-interactive-mode.private.test.js +3 -2
- package/dist/{entrypoint.cli.private.test.d.ts → test/e2e/cli/gracefully-handles-corrupt-repo.private.test.d.ts} +0 -0
- package/dist/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.js +52 -0
- package/dist/test/e2e/cli/repo-with-backportrc-removed.private.test.js +2 -2
- package/dist/{lib/github/v4/enablePullRequestAutoMerge.private.test.d.ts → test/e2e/cli/repo-with-programatically-added-commits.mutation.test.d.ts} +0 -0
- package/dist/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.js +114 -0
- package/dist/test/e2e/cli/runBackportViaCli.d.ts +8 -2
- package/dist/test/e2e/cli/runBackportViaCli.js +47 -17
- package/dist/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js +7 -1
- package/dist/test/e2e/module/entrypoint.module.mutation.test.js +1 -1
- package/dist/test/handleUnbackportedPullRequests.private.test.js +1 -1
- package/dist/test/replaceStringAndLinebreaks.d.ts +5 -0
- package/dist/test/replaceStringAndLinebreaks.js +8 -0
- package/dist/test/sandbox.js +6 -2
- package/dist/utils/packageVersion.d.ts +1 -1
- package/dist/utils/packageVersion.js +1 -1
- package/package.json +23 -24
- package/yarn.lock +841 -950
- package/dist/entrypoint.cli.private.test.js +0 -47
- package/dist/errors/BackportError.d.ts +0 -19
- package/dist/errors/BackportError.js +0 -29
- package/dist/lib/github/v4/enablePullRequestAutoMerge.private.test.js +0 -112
- package/dist/runSequentially.test.d.ts +0 -1
- package/dist/runSequentially.test.js +0 -243
- package/dist/services/BackportError.d.ts +0 -19
- package/dist/services/BackportError.js +0 -29
- package/dist/services/HandledBackportError.d.ts +0 -19
- package/dist/services/HandledBackportError.js +0 -29
- package/dist/services/HandledError.d.ts +0 -19
- package/dist/services/HandledError.js +0 -29
- package/dist/services/child-process-promisified.d.ts +0 -25
- package/dist/services/child-process-promisified.js +0 -58
- package/dist/services/env.d.ts +0 -7
- package/dist/services/env.js +0 -30
- package/dist/services/env.test.d.ts +0 -1
- package/dist/services/env.test.js +0 -21
- package/dist/services/git.d.ts +0 -77
- package/dist/services/git.integration.test.d.ts +0 -1
- package/dist/services/git.integration.test.js +0 -616
- package/dist/services/git.js +0 -439
- package/dist/services/git.private.test.d.ts +0 -1
- package/dist/services/git.private.test.js +0 -618
- package/dist/services/git.test.d.ts +0 -1
- package/dist/services/git.test.js +0 -580
- package/dist/services/github/commitFormatters.d.ts +0 -3
- package/dist/services/github/commitFormatters.js +0 -17
- package/dist/services/github/commitFormatters.test.d.ts +0 -1
- package/dist/services/github/commitFormatters.test.js +0 -11
- package/dist/services/github/v3/addAssigneesToPullRequest.d.ts +0 -2
- package/dist/services/github/v3/addAssigneesToPullRequest.js +0 -32
- package/dist/services/github/v3/addAssigneesToPullRequest.test.d.ts +0 -1
- package/dist/services/github/v3/addAssigneesToPullRequest.test.js +0 -27
- package/dist/services/github/v3/addLabelsToPullRequest.d.ts +0 -2
- package/dist/services/github/v3/addLabelsToPullRequest.js +0 -30
- package/dist/services/github/v3/addReviewersToPullRequest.d.ts +0 -2
- package/dist/services/github/v3/addReviewersToPullRequest.js +0 -32
- package/dist/services/github/v3/createPullRequest.d.ts +0 -29
- package/dist/services/github/v3/createPullRequest.js +0 -91
- package/dist/services/github/v3/createPullRequest.test.d.ts +0 -1
- package/dist/services/github/v3/createPullRequest.test.js +0 -377
- package/dist/services/github/v3/createStatusComment.d.ts +0 -11
- package/dist/services/github/v3/createStatusComment.js +0 -131
- package/dist/services/github/v3/createStatusComment.test.d.ts +0 -1
- package/dist/services/github/v3/createStatusComment.test.js +0 -409
- package/dist/services/github/v3/getGithubV3ErrorMessage.d.ts +0 -14
- package/dist/services/github/v3/getGithubV3ErrorMessage.js +0 -16
- package/dist/services/github/v4/FetchPullRequestId.d.ts +0 -2
- package/dist/services/github/v4/FetchPullRequestId.js +0 -36
- package/dist/services/github/v4/apiRequestV4.d.ts +0 -31
- package/dist/services/github/v4/apiRequestV4.js +0 -71
- package/dist/services/github/v4/apiRequestV4.test.d.ts +0 -1
- package/dist/services/github/v4/apiRequestV4.test.js +0 -109
- package/dist/services/github/v4/disablePullRequestAutoMerge.d.ts +0 -2
- package/dist/services/github/v4/disablePullRequestAutoMerge.js +0 -32
- package/dist/services/github/v4/enablePullRequestAutoMerge.d.ts +0 -2
- package/dist/services/github/v4/enablePullRequestAutoMerge.js +0 -50
- package/dist/services/github/v4/enablePullRequestAutoMerge.private.test.d.ts +0 -1
- package/dist/services/github/v4/enablePullRequestAutoMerge.private.test.js +0 -112
- package/dist/services/github/v4/fetchAuthorId.d.ts +0 -10
- package/dist/services/github/v4/fetchAuthorId.js +0 -28
- package/dist/services/github/v4/fetchAuthorId.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchAuthorId.private.test.js +0 -25
- package/dist/services/github/v4/fetchCommits/allFetchers.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/allFetchers.private.test.js +0 -93
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.d.ts +0 -11
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.js +0 -58
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js +0 -136
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.d.ts +0 -11
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.js +0 -48
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.js +0 -118
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.d.ts +0 -29
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.js +0 -110
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +0 -196
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.js +0 -157
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.d.ts +0 -3
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.js +0 -61
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js +0 -107
- package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.d.ts +0 -12
- package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.js +0 -69
- package/dist/services/github/v4/fetchExistingPullRequest.d.ts +0 -9
- package/dist/services/github/v4/fetchExistingPullRequest.js +0 -64
- package/dist/services/github/v4/fetchExistingPullRequest.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchExistingPullRequest.private.test.js +0 -44
- package/dist/services/github/v4/fetchPullRequestAutoMergeMethod.d.ts +0 -2
- package/dist/services/github/v4/fetchPullRequestAutoMergeMethod.js +0 -39
- package/dist/services/github/v4/fetchRemoteProjectConfig.d.ts +0 -8
- package/dist/services/github/v4/fetchRemoteProjectConfig.js +0 -49
- package/dist/services/github/v4/fetchRemoteProjectConfig.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchRemoteProjectConfig.private.test.js +0 -49
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +0 -69
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.js +0 -73
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.d.ts +0 -1
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.js +0 -116
- package/dist/services/github/v4/getOptionsFromGithub/query.d.ts +0 -16
- package/dist/services/github/v4/getOptionsFromGithub/query.js +0 -29
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.d.ts +0 -29
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.js +0 -61
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.d.ts +0 -1
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js +0 -72
- package/dist/services/github/v4/mocks/commitsByAuthorMock.d.ts +0 -2
- package/dist/services/github/v4/mocks/commitsByAuthorMock.js +0 -176
- package/dist/services/github/v4/throwOnInvalidAccessToken.d.ts +0 -6
- package/dist/services/github/v4/throwOnInvalidAccessToken.js +0 -45
- package/dist/services/github/v4/throwOnInvalidAccessToken.test.d.ts +0 -1
- package/dist/services/github/v4/throwOnInvalidAccessToken.test.js +0 -87
- package/dist/services/logger.d.ts +0 -9
- package/dist/services/logger.js +0 -74
- package/dist/services/prompt.test.d.ts +0 -1
- package/dist/services/prompt.test.js +0 -139
- package/dist/services/prompts.d.ts +0 -17
- package/dist/services/prompts.js +0 -132
- package/dist/services/remoteConfig.d.ts +0 -20
- package/dist/services/remoteConfig.js +0 -52
- package/dist/services/sequentially.d.ts +0 -1
- package/dist/services/sequentially.js +0 -10
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.d.ts +0 -16
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.js +0 -102
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.d.ts +0 -1
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.js +0 -467
- package/dist/services/sourceCommit/getMockSourceCommit.d.ts +0 -26
- package/dist/services/sourceCommit/getMockSourceCommit.js +0 -103
- package/dist/services/sourceCommit/parseSourceCommit.d.ts +0 -108
- package/dist/services/sourceCommit/parseSourceCommit.js +0 -123
- package/dist/services/sourceCommit/parseSourceCommit.test.d.ts +0 -1
- package/dist/services/sourceCommit/parseSourceCommit.test.js +0 -226
- package/dist/services/test.d.ts +0 -1
- package/dist/services/test.js +0 -23
- package/dist/state.d.ts +0 -0
- package/dist/state.js +0 -1
- package/dist/test/ExecError.d.ts +0 -16
- package/dist/test/ExecError.js +0 -15
- package/dist/test/e2e/cli/cli.private.test.d.ts +0 -1
- package/dist/test/e2e/cli/cli.private.test.js +0 -222
- package/dist/test/e2e/cli/date-filters.d.ts +0 -1
- package/dist/test/e2e/cli/date-filters.js +0 -43
- package/dist/test/e2e/cli/interactive-error-handling.private.test.d.ts +0 -1
- package/dist/test/e2e/cli/interactive-error-handling.private.test.js +0 -80
- package/dist/test/e2e/cli/non-interactive-error-handling.private.test.d.ts +0 -1
- package/dist/test/e2e/cli/non-interactive-error-handling.private.test.js +0 -198
- package/dist/test/e2e/cli.e2e.private.test.d.ts +0 -1
- package/dist/test/e2e/cli.e2e.private.test.js +0 -433
- package/dist/test/e2e/module/module.mutation.test.d.ts +0 -1
- package/dist/test/e2e/module/module.mutation.test.js +0 -369
- package/dist/test/e2e/module.e2e.mutation.test.d.ts +0 -1
- package/dist/test/e2e/module.e2e.mutation.test.js +0 -369
- package/dist/test/e2e/module.e2e.private.test.d.ts +0 -1
- package/dist/test/e2e/module.e2e.private.test.js +0 -369
- package/dist/ui/cherrypickAndCreateTargetPullRequest.d.ts +0 -13
- package/dist/ui/cherrypickAndCreateTargetPullRequest.js +0 -243
- package/dist/ui/cherrypickAndCreateTargetPullRequest.test.d.ts +0 -1
- package/dist/ui/cherrypickAndCreateTargetPullRequest.test.js +0 -320
- package/dist/ui/getCommits.d.ts +0 -2
- package/dist/ui/getCommits.js +0 -75
- package/dist/ui/getCommitsWithoutBackports.d.ts +0 -11
- package/dist/ui/getCommitsWithoutBackports.js +0 -68
- package/dist/ui/getCommitsWithoutBackports.test.d.ts +0 -1
- package/dist/ui/getCommitsWithoutBackports.test.js +0 -335
- package/dist/ui/getGitConfigAuthor.d.ts +0 -6
- package/dist/ui/getGitConfigAuthor.js +0 -15
- package/dist/ui/getTargetBranches.d.ts +0 -5
- package/dist/ui/getTargetBranches.js +0 -67
- package/dist/ui/getTargetBranches.test.d.ts +0 -1
- package/dist/ui/getTargetBranches.test.js +0 -204
- package/dist/ui/maybeSetupRepo.d.ts +0 -2
- package/dist/ui/maybeSetupRepo.js +0 -53
- package/dist/ui/maybeSetupRepo.test.d.ts +0 -1
- package/dist/ui/maybeSetupRepo.test.js +0 -238
- package/dist/ui/ora.d.ts +0 -2
- package/dist/ui/ora.js +0 -21
- package/dist/ui/setupRepo.d.ts +0 -2
- package/dist/ui/setupRepo.js +0 -56
- package/dist/ui/setupRepo.test.d.ts +0 -1
- package/dist/ui/setupRepo.test.js +0 -273
- package/dist/utils/filterMissingCommits.d.ts +0 -2
- package/dist/utils/filterMissingCommits.js +0 -7
- package/dist/utils/redact.d.ts +0 -1
- package/dist/utils/redact.js +0 -7
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SpawnError = exports.spawnOriginal = exports.spawnPromise = exports.exec = void 0;
|
|
7
|
-
const child_process_1 = __importDefault(require("child_process"));
|
|
8
|
-
const util_1 = require("util");
|
|
9
|
-
const logger_1 = require("./logger");
|
|
10
|
-
const execPromisified = (0, util_1.promisify)(child_process_1.default.exec);
|
|
11
|
-
async function exec(cmd, options) {
|
|
12
|
-
const res = await execPromisified(cmd, {
|
|
13
|
-
maxBuffer: 100 * 1024 * 1024,
|
|
14
|
-
...options,
|
|
15
|
-
});
|
|
16
|
-
return res;
|
|
17
|
-
}
|
|
18
|
-
exports.exec = exec;
|
|
19
|
-
async function spawnPromise(cmd, cmdArgs, cwd) {
|
|
20
|
-
return new Promise(function (resolve, reject) {
|
|
21
|
-
const subprocess = child_process_1.default.spawn(cmd, cmdArgs, { cwd });
|
|
22
|
-
let stderr = '';
|
|
23
|
-
let stdout = '';
|
|
24
|
-
subprocess.stdout.on('data', (data) => {
|
|
25
|
-
stdout += data;
|
|
26
|
-
});
|
|
27
|
-
subprocess.stderr.on('data', (data) => {
|
|
28
|
-
stderr += data;
|
|
29
|
-
});
|
|
30
|
-
subprocess.on('close', (code) => {
|
|
31
|
-
if (code === 0 || code === null) {
|
|
32
|
-
logger_1.logger.verbose(`spawn success "${cmdArgs}"`);
|
|
33
|
-
resolve({ cmdArgs, code, stderr, stdout });
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const err = new SpawnError({ cmdArgs, code, stderr, stdout });
|
|
37
|
-
logger_1.logger.info('spawn error', err);
|
|
38
|
-
reject(err);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
subprocess.on('error', (err) => {
|
|
42
|
-
reject(err);
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
exports.spawnPromise = spawnPromise;
|
|
47
|
-
exports.spawnOriginal = child_process_1.default.spawn;
|
|
48
|
-
class SpawnError extends Error {
|
|
49
|
-
constructor(context) {
|
|
50
|
-
const message = `Code: ${context.code}; Args: ${JSON.stringify(context.cmdArgs)}; ${context.stderr.trim()}`;
|
|
51
|
-
super(message);
|
|
52
|
-
Error.captureStackTrace(this, SpawnError);
|
|
53
|
-
this.name = 'SpawnError';
|
|
54
|
-
this.message = message;
|
|
55
|
-
this.context = context;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.SpawnError = SpawnError;
|
package/dist/services/env.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../options/options';
|
|
2
|
-
export declare function getBackportDirPath(): string;
|
|
3
|
-
export declare function getLogfilePath({ logFilePath }: {
|
|
4
|
-
logFilePath?: string;
|
|
5
|
-
}): string;
|
|
6
|
-
export declare function getGlobalConfigPath(): string;
|
|
7
|
-
export declare function getRepoPath({ repoOwner, repoName, dir }: ValidConfigOptions): string;
|
package/dist/services/env.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getRepoPath = exports.getGlobalConfigPath = exports.getLogfilePath = exports.getBackportDirPath = void 0;
|
|
7
|
-
const os_1 = require("os");
|
|
8
|
-
const path_1 = __importDefault(require("path"));
|
|
9
|
-
function getBackportDirPath() {
|
|
10
|
-
return path_1.default.join((0, os_1.homedir)(), '.backport');
|
|
11
|
-
}
|
|
12
|
-
exports.getBackportDirPath = getBackportDirPath;
|
|
13
|
-
function getLogfilePath({ logFilePath }) {
|
|
14
|
-
if (logFilePath) {
|
|
15
|
-
return path_1.default.resolve(logFilePath);
|
|
16
|
-
}
|
|
17
|
-
return path_1.default.join((0, os_1.homedir)(), '.backport', 'backport.log');
|
|
18
|
-
}
|
|
19
|
-
exports.getLogfilePath = getLogfilePath;
|
|
20
|
-
function getGlobalConfigPath() {
|
|
21
|
-
return path_1.default.join((0, os_1.homedir)(), '.backport', 'config.json');
|
|
22
|
-
}
|
|
23
|
-
exports.getGlobalConfigPath = getGlobalConfigPath;
|
|
24
|
-
function getRepoPath({ repoOwner, repoName, dir }) {
|
|
25
|
-
if (dir) {
|
|
26
|
-
return dir;
|
|
27
|
-
}
|
|
28
|
-
return path_1.default.join((0, os_1.homedir)(), '.backport', 'repositories', repoOwner, repoName);
|
|
29
|
-
}
|
|
30
|
-
exports.getRepoPath = getRepoPath;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const os_1 = __importDefault(require("os"));
|
|
7
|
-
const env_1 = require("../services/env");
|
|
8
|
-
describe('env', () => {
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
jest.spyOn(os_1.default, 'homedir').mockReturnValue('/myHomeDir');
|
|
11
|
-
});
|
|
12
|
-
it('getGlobalConfigPath', () => {
|
|
13
|
-
expect((0, env_1.getGlobalConfigPath)()).toBe('/myHomeDir/.backport/config.json');
|
|
14
|
-
});
|
|
15
|
-
it('getRepoPath', () => {
|
|
16
|
-
expect((0, env_1.getRepoPath)({
|
|
17
|
-
repoOwner: 'elastic',
|
|
18
|
-
repoName: 'kibana',
|
|
19
|
-
})).toBe('/myHomeDir/.backport/repositories/elastic/kibana');
|
|
20
|
-
});
|
|
21
|
-
});
|
package/dist/services/git.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../options/options';
|
|
2
|
-
import { ExpectedTargetPullRequest } from './sourceCommit/getExpectedTargetPullRequests';
|
|
3
|
-
import { Commit } from './sourceCommit/parseSourceCommit';
|
|
4
|
-
export declare function getRemoteUrl({ repoName, accessToken, gitHostname }: ValidConfigOptions, repoOwner: string): string;
|
|
5
|
-
export declare function cloneRepo({ sourcePath, targetPath }: {
|
|
6
|
-
sourcePath: string;
|
|
7
|
-
targetPath: string;
|
|
8
|
-
}, onProgress: (progress: number) => void): Promise<void>;
|
|
9
|
-
export declare function getLocalConfigFileCommitDate({ cwd }: {
|
|
10
|
-
cwd: string;
|
|
11
|
-
}): Promise<number | undefined>;
|
|
12
|
-
export declare function isLocalConfigFileUntracked({ cwd }: {
|
|
13
|
-
cwd: string;
|
|
14
|
-
}): Promise<boolean | undefined>;
|
|
15
|
-
export declare function isLocalConfigFileModified({ cwd }: {
|
|
16
|
-
cwd: string;
|
|
17
|
-
}): Promise<boolean>;
|
|
18
|
-
export declare function getRepoInfoFromGitRemotes({ cwd }: {
|
|
19
|
-
cwd: string;
|
|
20
|
-
}): Promise<{
|
|
21
|
-
repoOwner: string;
|
|
22
|
-
repoName: string;
|
|
23
|
-
}[]>;
|
|
24
|
-
export declare function getGitProjectRootPath(dir: string): Promise<string | undefined>;
|
|
25
|
-
export declare function getIsCommitInBranch(options: ValidConfigOptions, commitSha: string): Promise<boolean>;
|
|
26
|
-
export declare function deleteRemote(options: ValidConfigOptions, remoteName: string): Promise<void>;
|
|
27
|
-
export declare function addRemote(options: ValidConfigOptions, remoteName: string): Promise<void>;
|
|
28
|
-
export declare function fetchBranch(options: ValidConfigOptions, branch: string): Promise<void>;
|
|
29
|
-
export declare function getIsMergeCommit(options: ValidConfigOptions, sha: string): Promise<boolean>;
|
|
30
|
-
export declare function getCommitsInMergeCommit(options: ValidConfigOptions, sha: string): Promise<string[]>;
|
|
31
|
-
export declare function cherrypick({ options, sha, mergedTargetPullRequest, commitAuthor, }: {
|
|
32
|
-
options: ValidConfigOptions;
|
|
33
|
-
sha: string;
|
|
34
|
-
mergedTargetPullRequest?: ExpectedTargetPullRequest;
|
|
35
|
-
commitAuthor: {
|
|
36
|
-
name: string;
|
|
37
|
-
email: string;
|
|
38
|
-
};
|
|
39
|
-
}): Promise<{
|
|
40
|
-
conflictingFiles: {
|
|
41
|
-
absolute: string;
|
|
42
|
-
relative: string;
|
|
43
|
-
}[];
|
|
44
|
-
unstagedFiles: string[];
|
|
45
|
-
needsResolving: boolean;
|
|
46
|
-
}>;
|
|
47
|
-
export declare function commitChanges(commit: Commit, options: ValidConfigOptions): Promise<void>;
|
|
48
|
-
export declare type ConflictingFiles = Awaited<ReturnType<typeof getConflictingFiles>>;
|
|
49
|
-
export declare function getConflictingFiles(options: ValidConfigOptions): Promise<{
|
|
50
|
-
absolute: string;
|
|
51
|
-
relative: string;
|
|
52
|
-
}[]>;
|
|
53
|
-
export declare function getUnstagedFiles(options: ValidConfigOptions): Promise<string[]>;
|
|
54
|
-
export declare function getGitConfig({ dir, key, }: {
|
|
55
|
-
dir: string;
|
|
56
|
-
key: 'user.name' | 'user.email';
|
|
57
|
-
}): Promise<string | undefined>;
|
|
58
|
-
export declare function createBackportBranch({ options, targetBranch, backportBranch, }: {
|
|
59
|
-
options: ValidConfigOptions;
|
|
60
|
-
targetBranch: string;
|
|
61
|
-
backportBranch: string;
|
|
62
|
-
}): Promise<void>;
|
|
63
|
-
export declare function deleteBackportBranch({ options, backportBranch, }: {
|
|
64
|
-
options: ValidConfigOptions;
|
|
65
|
-
backportBranch: string;
|
|
66
|
-
}): Promise<void>;
|
|
67
|
-
export declare function getRepoForkOwner(options: ValidConfigOptions): string;
|
|
68
|
-
export declare function pushBackportBranch({ options, backportBranch, }: {
|
|
69
|
-
options: ValidConfigOptions;
|
|
70
|
-
backportBranch: string;
|
|
71
|
-
}): Promise<{
|
|
72
|
-
cmdArgs: string[];
|
|
73
|
-
code: number | null;
|
|
74
|
-
stderr: string;
|
|
75
|
-
stdout: string;
|
|
76
|
-
}>;
|
|
77
|
-
export declare function getLocalSourceRepoPath(options: ValidConfigOptions): Promise<string | undefined>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|