backport 6.1.5 → 6.3.0-beta-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 +15 -6
- package/dist/{main.d.ts → backportRun.d.ts} +3 -3
- package/dist/{main.js → backportRun.js} +21 -10
- package/dist/{entrypoint.module.private.test.d.ts → entrypoint.cli.e2e.private.test.d.ts} +0 -0
- package/dist/entrypoint.cli.e2e.private.test.js +277 -0
- package/dist/entrypoint.cli.js +3 -5
- package/dist/{options/getValidatedOptions.test.d.ts → entrypoint.cli.private.test.d.ts} +0 -0
- package/dist/{entrypoint.module.private.test.js → entrypoint.cli.private.test.js} +17 -8
- package/dist/entrypoint.module.d.ts +2 -2
- package/dist/entrypoint.module.js +4 -4
- package/dist/options/ConfigOptions.d.ts +5 -1
- package/dist/options/cliArgs.d.ts +16 -14
- package/dist/options/cliArgs.js +15 -5
- package/dist/options/cliArgs.test.js +28 -10
- package/dist/options/config/config.d.ts +10 -4
- package/dist/options/config/config.js +7 -6
- package/dist/options/config/config.test.js +11 -1
- package/dist/options/config/globalConfig.d.ts +1 -1
- package/dist/options/config/globalConfig.js +15 -9
- package/dist/options/config/globalConfig.test.js +19 -32
- package/dist/options/config/projectConfig.d.ts +3 -1
- package/dist/options/config/projectConfig.js +5 -2
- package/dist/options/config/projectConfig.test.js +41 -31
- package/dist/options/config/readConfigFile.d.ts +27 -23
- package/dist/options/config/readConfigFile.js +2 -2
- package/dist/options/options.d.ts +18 -39
- package/dist/options/options.js +40 -32
- package/dist/options/options.test.js +83 -47
- package/dist/runSequentially.d.ts +0 -1
- package/dist/runSequentially.js +0 -1
- package/dist/runSequentially.test.js +39 -20
- package/dist/scripts/postinstall.js +3 -3
- package/dist/services/HandledError.d.ts +6 -4
- package/dist/services/HandledError.js +18 -3
- package/dist/services/child-process-promisified.d.ts +3 -1
- package/dist/services/env.d.ts +3 -1
- package/dist/services/env.js +4 -1
- package/dist/services/env.test.js +2 -2
- package/dist/services/git.d.ts +22 -9
- package/dist/services/git.integration.test.js +123 -24
- package/dist/services/git.js +66 -54
- package/dist/services/git.test.js +35 -20
- package/dist/services/github/commitFormatters.d.ts +0 -1
- package/dist/services/github/commitFormatters.js +1 -8
- package/dist/services/github/v3/createPullRequest.js +16 -10
- package/dist/services/github/v3/createPullRequest.test.js +248 -33
- package/dist/services/github/v3/createStatusComment.d.ts +1 -1
- package/dist/services/github/v3/createStatusComment.js +26 -15
- package/dist/services/github/v3/createStatusComment.test.js +165 -70
- package/dist/services/github/v3/getGithubV3ErrorMessage.d.ts +2 -1
- package/dist/services/github/v4/FetchPullRequestId.d.ts +0 -7
- package/dist/services/github/v4/apiRequestV4.d.ts +21 -17
- package/dist/services/github/v4/apiRequestV4.js +38 -28
- package/dist/services/github/v4/apiRequestV4.test.js +4 -4
- package/dist/services/github/v4/disablePullRequestAutoMerge.d.ts +0 -7
- package/dist/services/github/v4/enablePullRequestAutoMerge.d.ts +0 -7
- package/dist/services/github/v4/fetchCommits/allFetchers.private.test.js +37 -19
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js +17 -8
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.js +3 -3
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.js +23 -14
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.js +2 -2
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +4 -4
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.js +41 -19
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.d.ts +1 -8
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js +31 -14
- package/dist/services/github/v4/fetchExistingPullRequest.d.ts +0 -4
- package/dist/services/github/v4/fetchExistingPullRequest.js +1 -2
- package/dist/services/github/v4/fetchPullRequestAutoMergeMethod.d.ts +0 -9
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +6 -2
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.js +41 -34
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.js +6 -0
- package/dist/services/github/v4/getOptionsFromGithub/query.d.ts +2 -1
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.d.ts +29 -0
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.js +56 -0
- package/dist/{options/parseRequiredOptions.test.d.ts → services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.d.ts} +0 -0
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js +71 -0
- package/dist/services/github/v4/mocks/commitsByAuthorMock.js +11 -11
- package/dist/services/github/v4/throwOnInvalidAccessToken.d.ts +4 -5
- package/dist/services/github/v4/throwOnInvalidAccessToken.js +10 -7
- package/dist/services/github/v4/throwOnInvalidAccessToken.test.js +5 -5
- package/dist/services/logger.d.ts +9 -3
- package/dist/services/logger.js +38 -35
- package/dist/services/prompt.test.js +66 -19
- package/dist/services/prompts.js +12 -10
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.js +1 -1
- package/dist/services/sourceCommit/getMockSourceCommit.js +6 -6
- package/dist/services/sourceCommit/parseSourceCommit.d.ts +18 -10
- package/dist/services/sourceCommit/parseSourceCommit.js +20 -14
- package/dist/services/sourceCommit/parseSourceCommit.test.js +18 -20
- package/dist/{runWithOptions.test.d.ts → test/backport-e2e.mutation.test.d.ts} +0 -0
- package/dist/test/{integration/integration.private.test.js → backport-e2e.mutation.test.js} +143 -123
- package/dist/{scripts/generate-gql.d.ts → test/handleUnbackportedPullRequests.private.test.d.ts} +0 -0
- package/dist/test/handleUnbackportedPullRequests.private.test.js +57 -0
- package/dist/test/mockConfigFiles.js +4 -20
- package/dist/test/mocks.d.ts +10 -0
- package/dist/test/mocks.js +23 -0
- package/dist/test/private/getDevAccessToken.js +5 -4
- package/dist/test/sandbox.d.ts +5 -0
- package/dist/test/sandbox.js +43 -0
- package/dist/test/setupFiles/automatic-mocks.d.ts +1 -0
- package/dist/test/setupFiles/automatic-mocks.js +27 -11
- package/dist/ui/cherrypickAndCreateTargetPullRequest.d.ts +0 -1
- package/dist/ui/cherrypickAndCreateTargetPullRequest.js +12 -13
- package/dist/ui/cherrypickAndCreateTargetPullRequest.test.js +50 -27
- package/dist/ui/getCommits.js +8 -14
- package/dist/ui/getCommitsWithoutBackports.js +6 -6
- package/dist/ui/getCommitsWithoutBackports.test.js +91 -39
- package/dist/ui/getTargetBranches.js +1 -1
- package/dist/ui/getTargetBranches.test.js +26 -8
- package/dist/ui/maybeSetupRepo.js +25 -5
- package/dist/ui/maybeSetupRepo.test.js +144 -14
- package/dist/utils/maybe.d.ts +1 -0
- package/dist/utils/maybe.js +7 -0
- package/dist/utils/packageVersion.d.ts +1 -0
- package/dist/{types/PromiseReturnType.js → utils/packageVersion.js} +2 -0
- package/package.json +24 -20
- package/yarn.lock +160 -237
- package/dist/index.d.ts +0 -783
- package/dist/index.js +0 -8001
- package/dist/ink.d.ts +0 -1
- package/dist/ink.js +0 -49
- package/dist/options/config/getOptionsFromGit.d.ts +0 -4
- package/dist/options/config/getOptionsFromGit.js +0 -8
- package/dist/options/getValidatedOptions.d.ts +0 -49
- package/dist/options/getValidatedOptions.js +0 -45
- package/dist/options/getValidatedOptions.test.js +0 -97
- package/dist/options/parseRequiredOptions.d.ts +0 -71
- package/dist/options/parseRequiredOptions.js +0 -68
- package/dist/options/parseRequiredOptions.test.js +0 -122
- package/dist/runWithOptions.d.ts +0 -9
- package/dist/runWithOptions.js +0 -43
- package/dist/runWithOptions.test.js +0 -304
- package/dist/scripts/generate-gql.js +0 -15
- package/dist/services/fs-promisified.d.ts +0 -6
- package/dist/services/fs-promisified.js +0 -12
- package/dist/services/getExpectedTarget.d.ts +0 -9
- package/dist/services/getExpectedTarget.js +0 -77
- package/dist/services/getExpectedTargetPullRequests.d.ts +0 -9
- package/dist/services/getExpectedTargetPullRequests.js +0 -77
- package/dist/services/github/v4/fetchCommitByPullNumber.d.ts +0 -5
- package/dist/services/github/v4/fetchCommitByPullNumber.js +0 -86
- package/dist/services/github/v4/fetchCommitByPullNumber.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommitByPullNumber.private.test.js +0 -57
- package/dist/services/github/v4/fetchCommitBySha.d.ts +0 -5
- package/dist/services/github/v4/fetchCommitBySha.js +0 -95
- package/dist/services/github/v4/fetchCommitBySha.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommitBySha.private.test.js +0 -50
- package/dist/services/github/v4/fetchCommits/fetchCommitsInDateRange.d.ts +0 -28
- package/dist/services/github/v4/fetchCommits/fetchCommitsInDateRange.js +0 -52
- package/dist/services/github/v4/fetchCommits/fetchProjectConfig.d.ts +0 -3
- package/dist/services/github/v4/fetchCommits/fetchProjectConfig.js +0 -55
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.test.js +0 -252
- package/dist/services/github/v4/fetchCommitsByAuthor.d.ts +0 -28
- package/dist/services/github/v4/fetchCommitsByAuthor.js +0 -161
- package/dist/services/github/v4/fetchCommitsByAuthor.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommitsByAuthor.private.test.js +0 -115
- package/dist/services/github/v4/fetchCommitsByAuthor.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommitsByAuthor.test.js +0 -272
- package/dist/services/github/v4/fetchDefaultBranch.d.ts +0 -9
- package/dist/services/github/v4/fetchDefaultBranch.js +0 -24
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/fetchDefaultRepoBranchAndPerformStartupChecks.d.ts +0 -4
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/fetchDefaultRepoBranchAndPerformStartupChecks.js +0 -52
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/fetchDefaultRepoBranchAndPerformStartupChecks.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/fetchDefaultRepoBranchAndPerformStartupChecks.private.test.js +0 -32
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/index.d.ts +0 -4
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/index.js +0 -72
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/index.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/index.private.test.js +0 -34
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/query.d.ts +0 -40
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks/query.js +0 -72
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks.d.ts +0 -17
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks.js +0 -69
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchDefaultRepoBranchAndPerformStartupChecks.private.test.js +0 -32
- package/dist/services/github/v4/fetchMergedPullRequests.d.ts +0 -37
- package/dist/services/github/v4/fetchMergedPullRequests.js +0 -37
- package/dist/services/github/v4/fetchMergedPullRequests.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchMergedPullRequests.private.test.js +0 -59
- package/dist/services/github/v4/fetchMergedPullRequests.test.d.ts +0 -1
- package/dist/services/github/v4/fetchMergedPullRequests.test.js +0 -22
- package/dist/services/github/v4/fetchProjectConfig.d.ts +0 -8
- package/dist/services/github/v4/fetchProjectConfig.js +0 -56
- package/dist/services/github/v4/fetchProjectConfig.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchProjectConfig.private.test.js +0 -52
- package/dist/services/github/v4/fetchProjectConfig.test.d.ts +0 -1
- package/dist/services/github/v4/fetchProjectConfig.test.js +0 -37
- package/dist/services/github/v4/fetchPullRequestBySearchQuery.d.ts +0 -9
- package/dist/services/github/v4/fetchPullRequestBySearchQuery.js +0 -92
- package/dist/services/github/v4/fetchPullRequestBySearchQuery.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchPullRequestBySearchQuery.private.test.js +0 -66
- package/dist/services/github/v4/fetchPullRequestBySearchQuery.test.d.ts +0 -1
- package/dist/services/github/v4/fetchPullRequestBySearchQuery.test.js +0 -242
- package/dist/services/github/v4/getExistingTargetPullRequests.d.ts +0 -7
- package/dist/services/github/v4/getExistingTargetPullRequests.js +0 -45
- package/dist/services/github/v4/getOptionsFromGithub/index.d.ts +0 -63
- package/dist/services/github/v4/getOptionsFromGithub/index.js +0 -139
- package/dist/services/github/v4/getOptionsFromGithub/index.private.test.d.ts +0 -1
- package/dist/services/github/v4/getOptionsFromGithub/index.private.test.js +0 -147
- package/dist/services/github/v4/getTargetBranchesFromLabels.d.ts +0 -5
- package/dist/services/github/v4/getTargetBranchesFromLabels.js +0 -20
- package/dist/services/github/v4/getTargetBranchesFromLabels.test.d.ts +0 -1
- package/dist/services/github/v4/getTargetBranchesFromLabels.test.js +0 -201
- package/dist/services/github/v4/mocks/fetchPullRequestBySearchQueryMock.d.ts +0 -2
- package/dist/services/github/v4/mocks/fetchPullRequestBySearchQueryMock.js +0 -843
- package/dist/services/github/v4/mocks/getCommitsByAuthorMock.d.ts +0 -2
- package/dist/services/github/v4/mocks/getCommitsByAuthorMock.js +0 -73
- package/dist/services/github/v4/mocks/getPullRequestNodeMock.d.ts +0 -12
- package/dist/services/github/v4/mocks/getPullRequestNodeMock.js +0 -44
- package/dist/services/sourceCommit/getTargetBranchesFromLabels.d.ts +0 -5
- package/dist/services/sourceCommit/getTargetBranchesFromLabels.js +0 -20
- package/dist/services/sourceCommit/getTargetBranchesFromLabels.test.d.ts +0 -1
- package/dist/services/sourceCommit/getTargetBranchesFromLabels.test.js +0 -201
- package/dist/services/sourceCommit/sourceCommit.d.ts +0 -78
- package/dist/services/sourceCommit/sourceCommit.js +0 -86
- package/dist/services/sourceCommit/sourceCommit.test.d.ts +0 -1
- package/dist/services/sourceCommit/sourceCommit.test.js +0 -287
- package/dist/services/sourceCommit.d.ts +0 -78
- package/dist/services/sourceCommit.js +0 -86
- package/dist/services/sourceCommit.test.d.ts +0 -1
- package/dist/services/sourceCommit.test.js +0 -280
- package/dist/test/inquirer.private.test.d.ts +0 -1
- package/dist/test/inquirer.private.test.js +0 -168
- package/dist/test/integration/createSpies.d.ts +0 -17
- package/dist/test/integration/createSpies.js +0 -85
- package/dist/test/integration/envConstants.d.ts +0 -5
- package/dist/test/integration/envConstants.js +0 -9
- package/dist/test/integration/helpers.d.ts +0 -7
- package/dist/test/integration/helpers.js +0 -31
- package/dist/test/integration/integration.private.test.d.ts +0 -1
- package/dist/test/integration/integration.test.d.ts +0 -1
- package/dist/test/integration/integration.test.js +0 -214
- package/dist/todo-delete.d.ts +0 -1
- package/dist/todo-delete.js +0 -17
- package/dist/types/Commit.d.ts +0 -85
- package/dist/types/Commit.js +0 -139
- package/dist/types/PromiseReturnType.d.ts +0 -1
- package/dist/types/commitNode.d.ts +0 -89
- package/dist/types/commitNode.js +0 -139
- package/dist/types/commitNode.test.d.ts +0 -1
- package/dist/types/commitNode.test.js +0 -255
- package/dist/types/commitWithAssociatedPullRequests.d.ts +0 -86
- package/dist/types/commitWithAssociatedPullRequests.js +0 -145
- package/dist/ui/cherrypickAndCreatePullRequest.test.d.ts +0 -1
- package/dist/ui/cherrypickAndCreatePullRequest.test.js +0 -617
- package/dist/ui/getTargetBranchesFromLabels.d.ts +0 -6
- package/dist/ui/getTargetBranchesFromLabels.js +0 -40
- package/dist/ui/getTargetBranchesFromLabels.test.d.ts +0 -1
- package/dist/ui/getTargetBranchesFromLabels.test.js +0 -288
|
@@ -1,95 +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.fetchCommitBySha = void 0;
|
|
7
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
-
const ora_1 = __importDefault(require("ora"));
|
|
9
|
-
const HandledError_1 = require("../../HandledError");
|
|
10
|
-
const commitFormatters_1 = require("../commitFormatters");
|
|
11
|
-
const apiRequestV4_1 = require("./apiRequestV4");
|
|
12
|
-
const getExistingTargetPullRequests_1 = require("./getExistingTargetPullRequests");
|
|
13
|
-
const getTargetBranchesFromLabels_1 = require("./getTargetBranchesFromLabels");
|
|
14
|
-
async function fetchCommitBySha(options) {
|
|
15
|
-
const { accessToken, githubApiBaseUrlV4, repoName, repoOwner } = options;
|
|
16
|
-
const query = /* GraphQL */ `
|
|
17
|
-
query CommitsBySha($repoOwner: String!, $repoName: String!, $oid: String!) {
|
|
18
|
-
repository(owner: $repoOwner, name: $repoName) {
|
|
19
|
-
object(expression: $oid) {
|
|
20
|
-
... on Commit {
|
|
21
|
-
committedDate
|
|
22
|
-
message
|
|
23
|
-
oid
|
|
24
|
-
associatedPullRequests(first: 1) {
|
|
25
|
-
edges {
|
|
26
|
-
node {
|
|
27
|
-
...${getExistingTargetPullRequests_1.pullRequestFragment.name}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
${getExistingTargetPullRequests_1.pullRequestFragment.source}
|
|
37
|
-
`;
|
|
38
|
-
const spinner = (0, ora_1.default)(`Loading commit "${(0, commitFormatters_1.getShortSha)(options.sha)}"`).start();
|
|
39
|
-
let res;
|
|
40
|
-
try {
|
|
41
|
-
res = await (0, apiRequestV4_1.apiRequestV4)({
|
|
42
|
-
githubApiBaseUrlV4,
|
|
43
|
-
accessToken,
|
|
44
|
-
query,
|
|
45
|
-
variables: {
|
|
46
|
-
repoOwner,
|
|
47
|
-
repoName,
|
|
48
|
-
oid: options.sha,
|
|
49
|
-
},
|
|
50
|
-
});
|
|
51
|
-
spinner.stop();
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
spinner.fail();
|
|
55
|
-
throw e;
|
|
56
|
-
}
|
|
57
|
-
if (!res.repository.object) {
|
|
58
|
-
throw new HandledError_1.HandledError(`No commit found on branch "${options.sourceBranch}" with sha "${options.sha}"`);
|
|
59
|
-
}
|
|
60
|
-
const committedDate = res.repository.object.committedDate;
|
|
61
|
-
const sha = res.repository.object.oid;
|
|
62
|
-
const commitMessage = res.repository.object.message;
|
|
63
|
-
const pullRequestNode = res.repository.object.associatedPullRequests.edges?.[0]?.node;
|
|
64
|
-
const pullNumber = pullRequestNode?.number || (0, commitFormatters_1.getPullNumberFromMessage)(commitMessage);
|
|
65
|
-
const sourceBranch = pullRequestNode?.baseRefName || options.sourceBranch;
|
|
66
|
-
const formattedMessage = (0, commitFormatters_1.getFormattedCommitMessage)({
|
|
67
|
-
message: commitMessage,
|
|
68
|
-
pullNumber,
|
|
69
|
-
sha,
|
|
70
|
-
});
|
|
71
|
-
spinner.stopAndPersist({
|
|
72
|
-
symbol: chalk_1.default.green('?'),
|
|
73
|
-
text: `${chalk_1.default.bold('Select commit')} ${chalk_1.default.cyan(formattedMessage)}`,
|
|
74
|
-
});
|
|
75
|
-
const existingTargetPullRequests = (0, getExistingTargetPullRequests_1.getExistingTargetPullRequests)(pullRequestNode);
|
|
76
|
-
const targetBranchesFromLabels = pullRequestNode
|
|
77
|
-
? (0, getTargetBranchesFromLabels_1.getTargetBranchesFromLabels)({
|
|
78
|
-
sourceBranch: pullRequestNode.baseRefName,
|
|
79
|
-
existingTargetPullRequests,
|
|
80
|
-
branchLabelMapping: options.branchLabelMapping,
|
|
81
|
-
labels: (0, getExistingTargetPullRequests_1.getPullRequestLabels)(pullRequestNode),
|
|
82
|
-
})
|
|
83
|
-
: [];
|
|
84
|
-
return {
|
|
85
|
-
committedDate,
|
|
86
|
-
sourceBranch,
|
|
87
|
-
targetBranchesFromLabels,
|
|
88
|
-
sha,
|
|
89
|
-
formattedMessage,
|
|
90
|
-
originalMessage: commitMessage,
|
|
91
|
-
pullNumber,
|
|
92
|
-
existingTargetPullRequests,
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
exports.fetchCommitBySha = fetchCommitBySha;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const getDevAccessToken_1 = require("../../../test/private/getDevAccessToken");
|
|
4
|
-
const fetchCommitBySha_1 = require("./fetchCommitBySha");
|
|
5
|
-
describe('fetchCommitBySha', () => {
|
|
6
|
-
let devAccessToken;
|
|
7
|
-
beforeEach(async () => {
|
|
8
|
-
devAccessToken = await (0, getDevAccessToken_1.getDevAccessToken)();
|
|
9
|
-
});
|
|
10
|
-
it('should return single commit with pull request', async () => {
|
|
11
|
-
await expect(await (0, fetchCommitBySha_1.fetchCommitBySha)({
|
|
12
|
-
repoOwner: 'elastic',
|
|
13
|
-
repoName: 'kibana',
|
|
14
|
-
accessToken: devAccessToken,
|
|
15
|
-
sha: 'cb6fbc0',
|
|
16
|
-
githubApiBaseUrlV4: 'https://api.github.com/graphql',
|
|
17
|
-
sourceBranch: 'master',
|
|
18
|
-
})).toEqual({
|
|
19
|
-
formattedMessage: '[APM] Add API tests (#70740)',
|
|
20
|
-
originalMessage: '[APM] Add API tests (#70740)',
|
|
21
|
-
pullNumber: 70740,
|
|
22
|
-
sha: 'cb6fbc0e1b406675724181a3e9f59459b5f8f892',
|
|
23
|
-
sourceBranch: 'master',
|
|
24
|
-
targetBranchesFromLabels: [],
|
|
25
|
-
existingTargetPullRequests: [
|
|
26
|
-
{ branch: '7.x', state: 'MERGED', number: 71014 },
|
|
27
|
-
],
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
it('throws if sha does not exist', async () => {
|
|
31
|
-
await expect((0, fetchCommitBySha_1.fetchCommitBySha)({
|
|
32
|
-
repoOwner: 'elastic',
|
|
33
|
-
repoName: 'kibana',
|
|
34
|
-
accessToken: devAccessToken,
|
|
35
|
-
sha: 'fc22f59',
|
|
36
|
-
githubApiBaseUrlV4: 'https://api.github.com/graphql',
|
|
37
|
-
sourceBranch: 'main',
|
|
38
|
-
})).rejects.toThrowError('No commit found on branch "main" with sha "fc22f59"');
|
|
39
|
-
});
|
|
40
|
-
it('throws if sha is invalid', async () => {
|
|
41
|
-
await expect((0, fetchCommitBySha_1.fetchCommitBySha)({
|
|
42
|
-
repoOwner: 'elastic',
|
|
43
|
-
repoName: 'kibana',
|
|
44
|
-
accessToken: devAccessToken,
|
|
45
|
-
sha: 'myCommitSha',
|
|
46
|
-
githubApiBaseUrlV4: 'https://api.github.com/graphql',
|
|
47
|
-
sourceBranch: 'main',
|
|
48
|
-
})).rejects.toThrowError('No commit found on branch "main" with sha "myCommitSha"');
|
|
49
|
-
});
|
|
50
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../../../../options/options';
|
|
2
|
-
import { Commit, CommitNode } from '../../../../types/commitNode';
|
|
3
|
-
export declare function fetchCommitsInDateRange({ accessToken, branchLabelMapping, commitsCount, dateRange, githubApiBaseUrlV4, repoName, repoOwner, sourceBranch, }: {
|
|
4
|
-
accessToken: string;
|
|
5
|
-
branchLabelMapping: ValidConfigOptions['branchLabelMapping'];
|
|
6
|
-
commitsCount: number;
|
|
7
|
-
dateRange: {
|
|
8
|
-
since: string;
|
|
9
|
-
until: string;
|
|
10
|
-
};
|
|
11
|
-
githubApiBaseUrlV4: string;
|
|
12
|
-
repoName: string;
|
|
13
|
-
repoOwner: string;
|
|
14
|
-
sourceBranch: string;
|
|
15
|
-
}): Promise<Commit[] | undefined>;
|
|
16
|
-
export interface CommitsSinceDateResponse {
|
|
17
|
-
repository: {
|
|
18
|
-
ref: {
|
|
19
|
-
target: {
|
|
20
|
-
history: {
|
|
21
|
-
edges: Array<{
|
|
22
|
-
node: CommitNode;
|
|
23
|
-
}>;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
} | null;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchCommitsInDateRange = void 0;
|
|
4
|
-
const commitNode_1 = require("../../../../types/commitNode");
|
|
5
|
-
const apiRequestV4_1 = require("../apiRequestV4");
|
|
6
|
-
async function fetchCommitsInDateRange({ accessToken, branchLabelMapping, commitsCount, dateRange, githubApiBaseUrlV4, repoName, repoOwner, sourceBranch, }) {
|
|
7
|
-
const query = /* GraphQL */ `
|
|
8
|
-
query CommitsSinceDate($repoOwner: String!, $repoName: String!, $commitsCount: Int!, $sourceBranch: String!, $since: GitTimestamp!, $until: GitTimestamp!) {
|
|
9
|
-
repository(owner: $repoOwner, name: $repoName) {
|
|
10
|
-
id
|
|
11
|
-
ref(qualifiedName: $sourceBranch) {
|
|
12
|
-
target {
|
|
13
|
-
... on Commit {
|
|
14
|
-
history(first: $commitsCount, since: $since, until: $until) {
|
|
15
|
-
totalCount
|
|
16
|
-
edges {
|
|
17
|
-
node {
|
|
18
|
-
...${commitNode_1.commitNodeFragment.name}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
${commitNode_1.commitNodeFragment.source}
|
|
29
|
-
`;
|
|
30
|
-
const res = await (0, apiRequestV4_1.apiRequestV4)({
|
|
31
|
-
githubApiBaseUrlV4,
|
|
32
|
-
accessToken,
|
|
33
|
-
query,
|
|
34
|
-
variables: {
|
|
35
|
-
repoOwner,
|
|
36
|
-
repoName,
|
|
37
|
-
commitsCount,
|
|
38
|
-
sourceBranch,
|
|
39
|
-
since: dateRange.since,
|
|
40
|
-
until: dateRange.until,
|
|
41
|
-
},
|
|
42
|
-
});
|
|
43
|
-
return res.repository.ref?.target.history.edges
|
|
44
|
-
.filter((commitEdge) => {
|
|
45
|
-
return commitEdge.node.associatedPullRequests.edges?.[0].node != null;
|
|
46
|
-
})
|
|
47
|
-
.map((commitEdge) => {
|
|
48
|
-
const commitNode = commitEdge.node;
|
|
49
|
-
return (0, commitNode_1.getCommit)({ sourceBranch, branchLabelMapping, commitNode });
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
exports.fetchCommitsInDateRange = fetchCommitsInDateRange;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchProjectConfig = void 0;
|
|
4
|
-
const apiRequestV4_1 = require("../apiRequestV4");
|
|
5
|
-
async function fetchProjectConfig(options) {
|
|
6
|
-
const { accessToken, githubApiBaseUrlV4, repoName, repoOwner, sourceBranch } = options;
|
|
7
|
-
const query = /* GraphQL */ `
|
|
8
|
-
query ProjectConfig(
|
|
9
|
-
$repoOwner: String!
|
|
10
|
-
$repoName: String!
|
|
11
|
-
$sourceBranch: String!
|
|
12
|
-
) {
|
|
13
|
-
repository(owner: $repoOwner, name: $repoName) {
|
|
14
|
-
ref(qualifiedName: $sourceBranch) {
|
|
15
|
-
target {
|
|
16
|
-
... on Commit {
|
|
17
|
-
history(first: 1, path: ".backportrc.json") {
|
|
18
|
-
edges {
|
|
19
|
-
remoteConfig: node {
|
|
20
|
-
file(path: ".backportrc.json") {
|
|
21
|
-
... on TreeEntry {
|
|
22
|
-
object {
|
|
23
|
-
... on Blob {
|
|
24
|
-
text
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
const res = await (0, apiRequestV4_1.apiRequestV4)({
|
|
39
|
-
githubApiBaseUrlV4,
|
|
40
|
-
accessToken,
|
|
41
|
-
query,
|
|
42
|
-
variables: {
|
|
43
|
-
repoOwner,
|
|
44
|
-
repoName,
|
|
45
|
-
sourceBranch,
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
try {
|
|
49
|
-
return JSON.parse(res.repository.ref.target.history.edges[0].remoteConfig.file.object.text);
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
throw new Error('Project config does not exist');
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.fetchProjectConfig = fetchProjectConfig;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,252 +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 nock_1 = __importDefault(require("nock"));
|
|
7
|
-
const nockHelpers_1 = require("../../../../test/nockHelpers");
|
|
8
|
-
const fetchPullRequestBySearchQueryMock_1 = require("../mocks/fetchPullRequestBySearchQueryMock");
|
|
9
|
-
const fetchPullRequestBySearchQuery_1 = require("./fetchPullRequestBySearchQuery");
|
|
10
|
-
describe('fetchPullRequestBySearchQuery', () => {
|
|
11
|
-
let res;
|
|
12
|
-
let mockCalls;
|
|
13
|
-
beforeEach(async () => {
|
|
14
|
-
mockCalls = (0, nockHelpers_1.mockGqlRequest)({
|
|
15
|
-
name: 'PullRequestBySearchQuery',
|
|
16
|
-
statusCode: 200,
|
|
17
|
-
body: { data: fetchPullRequestBySearchQueryMock_1.fetchPullRequestBySearchQueryMock },
|
|
18
|
-
});
|
|
19
|
-
res = await (0, fetchPullRequestBySearchQuery_1.fetchPullRequestBySearchQuery)({
|
|
20
|
-
accessToken: 'myAccessToken',
|
|
21
|
-
all: false,
|
|
22
|
-
author: 'sqren',
|
|
23
|
-
githubApiBaseUrlV4: 'http://localhost/graphql',
|
|
24
|
-
maxNumber: 10,
|
|
25
|
-
repoName: 'kibana',
|
|
26
|
-
repoOwner: 'elastic',
|
|
27
|
-
sourceBranch: 'master',
|
|
28
|
-
prFilter: 'label:Team:apm',
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
afterEach(() => {
|
|
32
|
-
nock_1.default.cleanAll();
|
|
33
|
-
});
|
|
34
|
-
it('should make request with correct variables', () => {
|
|
35
|
-
expect(mockCalls.length).toBe(1);
|
|
36
|
-
expect(mockCalls[0].variables).toEqual({
|
|
37
|
-
maxNumber: 10,
|
|
38
|
-
query: 'type:pr is:merged sort:updated-desc repo:elastic/kibana author:sqren label:Team:apm base:master',
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
it('should return correct response', async () => {
|
|
42
|
-
expect(res).toMatchInlineSnapshot(`
|
|
43
|
-
Array [
|
|
44
|
-
Object {
|
|
45
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
46
|
-
"existingTargetPullRequests": Array [
|
|
47
|
-
Object {
|
|
48
|
-
"branch": "7.x",
|
|
49
|
-
"number": 99,
|
|
50
|
-
"state": "MERGED",
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
"formattedMessage": "[APM] @ts-error -> @ts-expect-error (#76492)",
|
|
54
|
-
"originalMessage": "[APM] @ts-error -> @ts-expect-error (#76492)
|
|
55
|
-
|
|
56
|
-
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>",
|
|
57
|
-
"pullNumber": 76492,
|
|
58
|
-
"sha": "e0f4775b780aada005bdd1774edcceac0ffee006",
|
|
59
|
-
"sourceBranch": "master",
|
|
60
|
-
"targetBranchesFromLabels": Array [],
|
|
61
|
-
},
|
|
62
|
-
Object {
|
|
63
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
64
|
-
"existingTargetPullRequests": Array [
|
|
65
|
-
Object {
|
|
66
|
-
"branch": "7.x",
|
|
67
|
-
"number": 99,
|
|
68
|
-
"state": "MERGED",
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
"formattedMessage": "[APM] Avoid negative offset for error marker on timeline (#76638)",
|
|
72
|
-
"originalMessage": "[APM] Avoid negative offset for error marker on timeline (#76638)
|
|
73
|
-
|
|
74
|
-
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>",
|
|
75
|
-
"pullNumber": 76638,
|
|
76
|
-
"sha": "fae1e02e0f7a475bf92da05be52a817aa2a84959",
|
|
77
|
-
"sourceBranch": "master",
|
|
78
|
-
"targetBranchesFromLabels": Array [],
|
|
79
|
-
},
|
|
80
|
-
Object {
|
|
81
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
82
|
-
"existingTargetPullRequests": Array [
|
|
83
|
-
Object {
|
|
84
|
-
"branch": "7.x",
|
|
85
|
-
"number": 99,
|
|
86
|
-
"state": "MERGED",
|
|
87
|
-
},
|
|
88
|
-
Object {
|
|
89
|
-
"branch": "7.9",
|
|
90
|
-
"number": 99,
|
|
91
|
-
"state": "MERGED",
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
"formattedMessage": "[APM] Add anomaly detection API tests + fixes (#73120)",
|
|
95
|
-
"originalMessage": "[APM] Add anomaly detection API tests + fixes (#73120)
|
|
96
|
-
|
|
97
|
-
Co-authored-by: Nathan L Smith <nathan.smith@elastic.co>",
|
|
98
|
-
"pullNumber": 73120,
|
|
99
|
-
"sha": "aa68e3b63a4b513294dc58eaf4422e66a0beffb1",
|
|
100
|
-
"sourceBranch": "master",
|
|
101
|
-
"targetBranchesFromLabels": Array [],
|
|
102
|
-
},
|
|
103
|
-
Object {
|
|
104
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
105
|
-
"existingTargetPullRequests": Array [],
|
|
106
|
-
"formattedMessage": "[APM] Update script with new roles/users (#72599)",
|
|
107
|
-
"originalMessage": "[APM] Update script with new roles/users (#72599)
|
|
108
|
-
|
|
109
|
-
* [APM] Update script with new roles/users
|
|
110
|
-
|
|
111
|
-
* add log
|
|
112
|
-
|
|
113
|
-
* Add validation for http prefix",
|
|
114
|
-
"pullNumber": 72599,
|
|
115
|
-
"sha": "2fc7112ec27a9f8ded0e2f9e097613721f1179dd",
|
|
116
|
-
"sourceBranch": "master",
|
|
117
|
-
"targetBranchesFromLabels": Array [],
|
|
118
|
-
},
|
|
119
|
-
Object {
|
|
120
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
121
|
-
"existingTargetPullRequests": Array [
|
|
122
|
-
Object {
|
|
123
|
-
"branch": "7.x",
|
|
124
|
-
"number": 99,
|
|
125
|
-
"state": "MERGED",
|
|
126
|
-
},
|
|
127
|
-
Object {
|
|
128
|
-
"branch": "7.9",
|
|
129
|
-
"number": 99,
|
|
130
|
-
"state": "MERGED",
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
"formattedMessage": "Update jobs_list.tsx (#72797)",
|
|
134
|
-
"originalMessage": "Update jobs_list.tsx (#72797)",
|
|
135
|
-
"pullNumber": 72797,
|
|
136
|
-
"sha": "7e126bfab6a3bfc44f9fa50feecfe22b4634e1a0",
|
|
137
|
-
"sourceBranch": "master",
|
|
138
|
-
"targetBranchesFromLabels": Array [],
|
|
139
|
-
},
|
|
140
|
-
Object {
|
|
141
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
142
|
-
"existingTargetPullRequests": Array [
|
|
143
|
-
Object {
|
|
144
|
-
"branch": "7.x",
|
|
145
|
-
"number": 99,
|
|
146
|
-
"state": "MERGED",
|
|
147
|
-
},
|
|
148
|
-
],
|
|
149
|
-
"formattedMessage": "[APM] Fix confusing request/minute viz (#69143)",
|
|
150
|
-
"originalMessage": "[APM] Fix confusing request/minute viz (#69143)",
|
|
151
|
-
"pullNumber": 69143,
|
|
152
|
-
"sha": "d12208c7ea9513529ea1aff42d154db89e3573ff",
|
|
153
|
-
"sourceBranch": "master",
|
|
154
|
-
"targetBranchesFromLabels": Array [],
|
|
155
|
-
},
|
|
156
|
-
Object {
|
|
157
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
158
|
-
"existingTargetPullRequests": Array [
|
|
159
|
-
Object {
|
|
160
|
-
"branch": "7.x",
|
|
161
|
-
"number": 99,
|
|
162
|
-
"state": "MERGED",
|
|
163
|
-
},
|
|
164
|
-
],
|
|
165
|
-
"formattedMessage": "[APM] Remove watcher integration (#71655)",
|
|
166
|
-
"originalMessage": "[APM] Remove watcher integration (#71655)",
|
|
167
|
-
"pullNumber": 71655,
|
|
168
|
-
"sha": "f760d8513b0216a73e9a476661f0fb8fb0887a61",
|
|
169
|
-
"sourceBranch": "master",
|
|
170
|
-
"targetBranchesFromLabels": Array [],
|
|
171
|
-
},
|
|
172
|
-
Object {
|
|
173
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
174
|
-
"existingTargetPullRequests": Array [
|
|
175
|
-
Object {
|
|
176
|
-
"branch": "7.x",
|
|
177
|
-
"number": 99,
|
|
178
|
-
"state": "MERGED",
|
|
179
|
-
},
|
|
180
|
-
Object {
|
|
181
|
-
"branch": "7.9",
|
|
182
|
-
"number": 99,
|
|
183
|
-
"state": "MERGED",
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
"formattedMessage": "[APM] Disable flaky rum e2e’s (#72614)",
|
|
187
|
-
"originalMessage": "[APM] Disable flaky rum e2e’s (#72614)",
|
|
188
|
-
"pullNumber": 72614,
|
|
189
|
-
"sha": "05ee3da80db34ccf93e7424aa2704c098a1b49fa",
|
|
190
|
-
"sourceBranch": "master",
|
|
191
|
-
"targetBranchesFromLabels": Array [],
|
|
192
|
-
},
|
|
193
|
-
Object {
|
|
194
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
195
|
-
"existingTargetPullRequests": Array [
|
|
196
|
-
Object {
|
|
197
|
-
"branch": "7.x",
|
|
198
|
-
"number": 99,
|
|
199
|
-
"state": "MERGED",
|
|
200
|
-
},
|
|
201
|
-
Object {
|
|
202
|
-
"branch": "7.9",
|
|
203
|
-
"number": 99,
|
|
204
|
-
"state": "MERGED",
|
|
205
|
-
},
|
|
206
|
-
],
|
|
207
|
-
"formattedMessage": "[APM] Increase \`xpack.apm.ui.transactionGroupBucketSize\` (#71661)",
|
|
208
|
-
"originalMessage": "[APM] Increase \`xpack.apm.ui.transactionGroupBucketSize\` (#71661)",
|
|
209
|
-
"pullNumber": 71661,
|
|
210
|
-
"sha": "51a862988c344b34bd9da57dd57008df12e1b5e5",
|
|
211
|
-
"sourceBranch": "master",
|
|
212
|
-
"targetBranchesFromLabels": Array [],
|
|
213
|
-
},
|
|
214
|
-
Object {
|
|
215
|
-
"committedDate": "2021-01-01T00:00:00",
|
|
216
|
-
"existingTargetPullRequests": Array [
|
|
217
|
-
Object {
|
|
218
|
-
"branch": "7.9",
|
|
219
|
-
"number": 99,
|
|
220
|
-
"state": "MERGED",
|
|
221
|
-
},
|
|
222
|
-
Object {
|
|
223
|
-
"branch": "7.x",
|
|
224
|
-
"number": 99,
|
|
225
|
-
"state": "MERGED",
|
|
226
|
-
},
|
|
227
|
-
],
|
|
228
|
-
"formattedMessage": "[APM] Handle ML errors (#72316)",
|
|
229
|
-
"originalMessage": "[APM] Handle ML errors (#72316)
|
|
230
|
-
|
|
231
|
-
* [APM] Handle ML errors
|
|
232
|
-
|
|
233
|
-
* Add capability check
|
|
234
|
-
|
|
235
|
-
* Improve test
|
|
236
|
-
|
|
237
|
-
* Address Caue’s feedback
|
|
238
|
-
|
|
239
|
-
* Move getSeverity
|
|
240
|
-
|
|
241
|
-
* Fix tsc
|
|
242
|
-
|
|
243
|
-
* Fix copy",
|
|
244
|
-
"pullNumber": 72316,
|
|
245
|
-
"sha": "511e4543a7828cf0cdb157b88b01352947e0384f",
|
|
246
|
-
"sourceBranch": "master",
|
|
247
|
-
"targetBranchesFromLabels": Array [],
|
|
248
|
-
},
|
|
249
|
-
]
|
|
250
|
-
`);
|
|
251
|
-
});
|
|
252
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../../../options/options';
|
|
2
|
-
import { Commit } from '../../../types/Commit';
|
|
3
|
-
import { PullRequestNode } from './getExistingTargetPullRequests';
|
|
4
|
-
export declare function fetchCommitsByAuthor(options: ValidConfigOptions): Promise<Commit[]>;
|
|
5
|
-
export interface CommitByAuthorResponse {
|
|
6
|
-
repository: {
|
|
7
|
-
ref: {
|
|
8
|
-
target: {
|
|
9
|
-
[commitPath: string]: {
|
|
10
|
-
edges: HistoryEdge[];
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
} | null;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
interface HistoryEdge {
|
|
17
|
-
node: {
|
|
18
|
-
oid: string;
|
|
19
|
-
message: string;
|
|
20
|
-
committedDate: string;
|
|
21
|
-
associatedPullRequests: {
|
|
22
|
-
edges: {
|
|
23
|
-
node: PullRequestNode;
|
|
24
|
-
}[];
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export {};
|