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.
Files changed (225) hide show
  1. package/README.md +11 -178
  2. package/dist/lib/cherrypickAndCreateTargetPullRequest.js +42 -21
  3. package/dist/lib/child-process-promisified.js +2 -2
  4. package/dist/lib/git.d.ts +4 -3
  5. package/dist/lib/git.js +22 -29
  6. package/dist/lib/git.private.test.js +10 -7
  7. package/dist/lib/git.test.js +47 -15
  8. package/dist/lib/github/v4/apiRequestV4.js +14 -8
  9. package/dist/lib/github/v4/fetchCommits/allFetchers.private.test.js +1 -0
  10. package/dist/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +1 -0
  11. package/dist/lib/ora.d.ts +1 -0
  12. package/dist/options/ConfigOptions.d.ts +1 -0
  13. package/dist/options/cliArgs.d.ts +1 -0
  14. package/dist/options/cliArgs.js +5 -0
  15. package/dist/options/config/config.d.ts +1 -0
  16. package/dist/options/config/readConfigFile.d.ts +1 -0
  17. package/dist/options/options.d.ts +2 -0
  18. package/dist/options/options.js +3 -2
  19. package/dist/options/options.test.js +5 -4
  20. package/dist/test/e2e/cli/date-filters.private.test.js +1 -0
  21. package/dist/test/e2e/cli/different-merge-strategies.private.test.js +122 -6
  22. package/dist/test/e2e/cli/entrypoint.cli.private.test.js +2 -0
  23. package/dist/test/e2e/cli/error-handling-interactive-mode.private.test.js +27 -13
  24. package/dist/test/e2e/cli/error-handling-non-interactive-mode.private.test.js +3 -2
  25. package/dist/{entrypoint.cli.private.test.d.ts → test/e2e/cli/gracefully-handles-corrupt-repo.private.test.d.ts} +0 -0
  26. package/dist/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.js +52 -0
  27. package/dist/test/e2e/cli/repo-with-backportrc-removed.private.test.js +2 -2
  28. package/dist/{lib/github/v4/enablePullRequestAutoMerge.private.test.d.ts → test/e2e/cli/repo-with-programatically-added-commits.mutation.test.d.ts} +0 -0
  29. package/dist/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.js +114 -0
  30. package/dist/test/e2e/cli/runBackportViaCli.d.ts +8 -2
  31. package/dist/test/e2e/cli/runBackportViaCli.js +47 -17
  32. package/dist/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js +7 -1
  33. package/dist/test/e2e/module/entrypoint.module.mutation.test.js +1 -1
  34. package/dist/test/handleUnbackportedPullRequests.private.test.js +1 -1
  35. package/dist/test/replaceStringAndLinebreaks.d.ts +5 -0
  36. package/dist/test/replaceStringAndLinebreaks.js +8 -0
  37. package/dist/test/sandbox.js +6 -2
  38. package/dist/utils/packageVersion.d.ts +1 -1
  39. package/dist/utils/packageVersion.js +1 -1
  40. package/package.json +23 -24
  41. package/yarn.lock +841 -950
  42. package/dist/entrypoint.cli.private.test.js +0 -47
  43. package/dist/errors/BackportError.d.ts +0 -19
  44. package/dist/errors/BackportError.js +0 -29
  45. package/dist/lib/github/v4/enablePullRequestAutoMerge.private.test.js +0 -112
  46. package/dist/runSequentially.test.d.ts +0 -1
  47. package/dist/runSequentially.test.js +0 -243
  48. package/dist/services/BackportError.d.ts +0 -19
  49. package/dist/services/BackportError.js +0 -29
  50. package/dist/services/HandledBackportError.d.ts +0 -19
  51. package/dist/services/HandledBackportError.js +0 -29
  52. package/dist/services/HandledError.d.ts +0 -19
  53. package/dist/services/HandledError.js +0 -29
  54. package/dist/services/child-process-promisified.d.ts +0 -25
  55. package/dist/services/child-process-promisified.js +0 -58
  56. package/dist/services/env.d.ts +0 -7
  57. package/dist/services/env.js +0 -30
  58. package/dist/services/env.test.d.ts +0 -1
  59. package/dist/services/env.test.js +0 -21
  60. package/dist/services/git.d.ts +0 -77
  61. package/dist/services/git.integration.test.d.ts +0 -1
  62. package/dist/services/git.integration.test.js +0 -616
  63. package/dist/services/git.js +0 -439
  64. package/dist/services/git.private.test.d.ts +0 -1
  65. package/dist/services/git.private.test.js +0 -618
  66. package/dist/services/git.test.d.ts +0 -1
  67. package/dist/services/git.test.js +0 -580
  68. package/dist/services/github/commitFormatters.d.ts +0 -3
  69. package/dist/services/github/commitFormatters.js +0 -17
  70. package/dist/services/github/commitFormatters.test.d.ts +0 -1
  71. package/dist/services/github/commitFormatters.test.js +0 -11
  72. package/dist/services/github/v3/addAssigneesToPullRequest.d.ts +0 -2
  73. package/dist/services/github/v3/addAssigneesToPullRequest.js +0 -32
  74. package/dist/services/github/v3/addAssigneesToPullRequest.test.d.ts +0 -1
  75. package/dist/services/github/v3/addAssigneesToPullRequest.test.js +0 -27
  76. package/dist/services/github/v3/addLabelsToPullRequest.d.ts +0 -2
  77. package/dist/services/github/v3/addLabelsToPullRequest.js +0 -30
  78. package/dist/services/github/v3/addReviewersToPullRequest.d.ts +0 -2
  79. package/dist/services/github/v3/addReviewersToPullRequest.js +0 -32
  80. package/dist/services/github/v3/createPullRequest.d.ts +0 -29
  81. package/dist/services/github/v3/createPullRequest.js +0 -91
  82. package/dist/services/github/v3/createPullRequest.test.d.ts +0 -1
  83. package/dist/services/github/v3/createPullRequest.test.js +0 -377
  84. package/dist/services/github/v3/createStatusComment.d.ts +0 -11
  85. package/dist/services/github/v3/createStatusComment.js +0 -131
  86. package/dist/services/github/v3/createStatusComment.test.d.ts +0 -1
  87. package/dist/services/github/v3/createStatusComment.test.js +0 -409
  88. package/dist/services/github/v3/getGithubV3ErrorMessage.d.ts +0 -14
  89. package/dist/services/github/v3/getGithubV3ErrorMessage.js +0 -16
  90. package/dist/services/github/v4/FetchPullRequestId.d.ts +0 -2
  91. package/dist/services/github/v4/FetchPullRequestId.js +0 -36
  92. package/dist/services/github/v4/apiRequestV4.d.ts +0 -31
  93. package/dist/services/github/v4/apiRequestV4.js +0 -71
  94. package/dist/services/github/v4/apiRequestV4.test.d.ts +0 -1
  95. package/dist/services/github/v4/apiRequestV4.test.js +0 -109
  96. package/dist/services/github/v4/disablePullRequestAutoMerge.d.ts +0 -2
  97. package/dist/services/github/v4/disablePullRequestAutoMerge.js +0 -32
  98. package/dist/services/github/v4/enablePullRequestAutoMerge.d.ts +0 -2
  99. package/dist/services/github/v4/enablePullRequestAutoMerge.js +0 -50
  100. package/dist/services/github/v4/enablePullRequestAutoMerge.private.test.d.ts +0 -1
  101. package/dist/services/github/v4/enablePullRequestAutoMerge.private.test.js +0 -112
  102. package/dist/services/github/v4/fetchAuthorId.d.ts +0 -10
  103. package/dist/services/github/v4/fetchAuthorId.js +0 -28
  104. package/dist/services/github/v4/fetchAuthorId.private.test.d.ts +0 -1
  105. package/dist/services/github/v4/fetchAuthorId.private.test.js +0 -25
  106. package/dist/services/github/v4/fetchCommits/allFetchers.private.test.d.ts +0 -1
  107. package/dist/services/github/v4/fetchCommits/allFetchers.private.test.js +0 -93
  108. package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.d.ts +0 -11
  109. package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.js +0 -58
  110. package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.d.ts +0 -1
  111. package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js +0 -136
  112. package/dist/services/github/v4/fetchCommits/fetchCommitBySha.d.ts +0 -11
  113. package/dist/services/github/v4/fetchCommits/fetchCommitBySha.js +0 -48
  114. package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.d.ts +0 -1
  115. package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.js +0 -118
  116. package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.d.ts +0 -29
  117. package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.js +0 -110
  118. package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.d.ts +0 -1
  119. package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +0 -196
  120. package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.d.ts +0 -1
  121. package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.js +0 -157
  122. package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.d.ts +0 -3
  123. package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.js +0 -61
  124. package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.d.ts +0 -1
  125. package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js +0 -107
  126. package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.d.ts +0 -12
  127. package/dist/services/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.js +0 -69
  128. package/dist/services/github/v4/fetchExistingPullRequest.d.ts +0 -9
  129. package/dist/services/github/v4/fetchExistingPullRequest.js +0 -64
  130. package/dist/services/github/v4/fetchExistingPullRequest.private.test.d.ts +0 -1
  131. package/dist/services/github/v4/fetchExistingPullRequest.private.test.js +0 -44
  132. package/dist/services/github/v4/fetchPullRequestAutoMergeMethod.d.ts +0 -2
  133. package/dist/services/github/v4/fetchPullRequestAutoMergeMethod.js +0 -39
  134. package/dist/services/github/v4/fetchRemoteProjectConfig.d.ts +0 -8
  135. package/dist/services/github/v4/fetchRemoteProjectConfig.js +0 -49
  136. package/dist/services/github/v4/fetchRemoteProjectConfig.private.test.d.ts +0 -1
  137. package/dist/services/github/v4/fetchRemoteProjectConfig.private.test.js +0 -49
  138. package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +0 -69
  139. package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.js +0 -73
  140. package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.d.ts +0 -1
  141. package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.js +0 -116
  142. package/dist/services/github/v4/getOptionsFromGithub/query.d.ts +0 -16
  143. package/dist/services/github/v4/getOptionsFromGithub/query.js +0 -29
  144. package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.d.ts +0 -29
  145. package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.js +0 -61
  146. package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.d.ts +0 -1
  147. package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js +0 -72
  148. package/dist/services/github/v4/mocks/commitsByAuthorMock.d.ts +0 -2
  149. package/dist/services/github/v4/mocks/commitsByAuthorMock.js +0 -176
  150. package/dist/services/github/v4/throwOnInvalidAccessToken.d.ts +0 -6
  151. package/dist/services/github/v4/throwOnInvalidAccessToken.js +0 -45
  152. package/dist/services/github/v4/throwOnInvalidAccessToken.test.d.ts +0 -1
  153. package/dist/services/github/v4/throwOnInvalidAccessToken.test.js +0 -87
  154. package/dist/services/logger.d.ts +0 -9
  155. package/dist/services/logger.js +0 -74
  156. package/dist/services/prompt.test.d.ts +0 -1
  157. package/dist/services/prompt.test.js +0 -139
  158. package/dist/services/prompts.d.ts +0 -17
  159. package/dist/services/prompts.js +0 -132
  160. package/dist/services/remoteConfig.d.ts +0 -20
  161. package/dist/services/remoteConfig.js +0 -52
  162. package/dist/services/sequentially.d.ts +0 -1
  163. package/dist/services/sequentially.js +0 -10
  164. package/dist/services/sourceCommit/getExpectedTargetPullRequests.d.ts +0 -16
  165. package/dist/services/sourceCommit/getExpectedTargetPullRequests.js +0 -102
  166. package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.d.ts +0 -1
  167. package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.js +0 -467
  168. package/dist/services/sourceCommit/getMockSourceCommit.d.ts +0 -26
  169. package/dist/services/sourceCommit/getMockSourceCommit.js +0 -103
  170. package/dist/services/sourceCommit/parseSourceCommit.d.ts +0 -108
  171. package/dist/services/sourceCommit/parseSourceCommit.js +0 -123
  172. package/dist/services/sourceCommit/parseSourceCommit.test.d.ts +0 -1
  173. package/dist/services/sourceCommit/parseSourceCommit.test.js +0 -226
  174. package/dist/services/test.d.ts +0 -1
  175. package/dist/services/test.js +0 -23
  176. package/dist/state.d.ts +0 -0
  177. package/dist/state.js +0 -1
  178. package/dist/test/ExecError.d.ts +0 -16
  179. package/dist/test/ExecError.js +0 -15
  180. package/dist/test/e2e/cli/cli.private.test.d.ts +0 -1
  181. package/dist/test/e2e/cli/cli.private.test.js +0 -222
  182. package/dist/test/e2e/cli/date-filters.d.ts +0 -1
  183. package/dist/test/e2e/cli/date-filters.js +0 -43
  184. package/dist/test/e2e/cli/interactive-error-handling.private.test.d.ts +0 -1
  185. package/dist/test/e2e/cli/interactive-error-handling.private.test.js +0 -80
  186. package/dist/test/e2e/cli/non-interactive-error-handling.private.test.d.ts +0 -1
  187. package/dist/test/e2e/cli/non-interactive-error-handling.private.test.js +0 -198
  188. package/dist/test/e2e/cli.e2e.private.test.d.ts +0 -1
  189. package/dist/test/e2e/cli.e2e.private.test.js +0 -433
  190. package/dist/test/e2e/module/module.mutation.test.d.ts +0 -1
  191. package/dist/test/e2e/module/module.mutation.test.js +0 -369
  192. package/dist/test/e2e/module.e2e.mutation.test.d.ts +0 -1
  193. package/dist/test/e2e/module.e2e.mutation.test.js +0 -369
  194. package/dist/test/e2e/module.e2e.private.test.d.ts +0 -1
  195. package/dist/test/e2e/module.e2e.private.test.js +0 -369
  196. package/dist/ui/cherrypickAndCreateTargetPullRequest.d.ts +0 -13
  197. package/dist/ui/cherrypickAndCreateTargetPullRequest.js +0 -243
  198. package/dist/ui/cherrypickAndCreateTargetPullRequest.test.d.ts +0 -1
  199. package/dist/ui/cherrypickAndCreateTargetPullRequest.test.js +0 -320
  200. package/dist/ui/getCommits.d.ts +0 -2
  201. package/dist/ui/getCommits.js +0 -75
  202. package/dist/ui/getCommitsWithoutBackports.d.ts +0 -11
  203. package/dist/ui/getCommitsWithoutBackports.js +0 -68
  204. package/dist/ui/getCommitsWithoutBackports.test.d.ts +0 -1
  205. package/dist/ui/getCommitsWithoutBackports.test.js +0 -335
  206. package/dist/ui/getGitConfigAuthor.d.ts +0 -6
  207. package/dist/ui/getGitConfigAuthor.js +0 -15
  208. package/dist/ui/getTargetBranches.d.ts +0 -5
  209. package/dist/ui/getTargetBranches.js +0 -67
  210. package/dist/ui/getTargetBranches.test.d.ts +0 -1
  211. package/dist/ui/getTargetBranches.test.js +0 -204
  212. package/dist/ui/maybeSetupRepo.d.ts +0 -2
  213. package/dist/ui/maybeSetupRepo.js +0 -53
  214. package/dist/ui/maybeSetupRepo.test.d.ts +0 -1
  215. package/dist/ui/maybeSetupRepo.test.js +0 -238
  216. package/dist/ui/ora.d.ts +0 -2
  217. package/dist/ui/ora.js +0 -21
  218. package/dist/ui/setupRepo.d.ts +0 -2
  219. package/dist/ui/setupRepo.js +0 -56
  220. package/dist/ui/setupRepo.test.d.ts +0 -1
  221. package/dist/ui/setupRepo.test.js +0 -273
  222. package/dist/utils/filterMissingCommits.d.ts +0 -2
  223. package/dist/utils/filterMissingCommits.js +0 -7
  224. package/dist/utils/redact.d.ts +0 -1
  225. 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;
@@ -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;
@@ -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
- });
@@ -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 {};