backport 10.0.1 → 10.0.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 +1 -1
- package/dist/package.json +23 -26
- package/dist/src/{backportRun.d.ts → backport-run.d.ts} +5 -5
- package/dist/src/{backportRun.js → backport-run.js} +23 -24
- package/dist/src/backport-run.js.map +1 -0
- package/dist/src/entrypoint.api.d.ts +15 -15
- package/dist/src/entrypoint.api.js +27 -27
- package/dist/src/entrypoint.api.js.map +1 -1
- package/dist/src/entrypoint.cli.js +4 -5
- package/dist/src/entrypoint.cli.js.map +1 -1
- package/dist/src/entrypoint.module.private.test.js +5 -5
- package/dist/src/entrypoint.module.private.test.js.map +1 -1
- package/dist/src/graphql/generated/gql.d.ts +14 -14
- package/dist/src/graphql/generated/gql.js +22 -13
- package/dist/src/graphql/generated/gql.js.map +1 -1
- package/dist/src/graphql/generated/graphql.d.ts +96 -156
- package/dist/src/graphql/generated/graphql.js +6 -6
- package/dist/src/graphql/generated/graphql.js.map +1 -1
- package/dist/src/lib/apm.js +5 -6
- package/dist/src/lib/apm.js.map +1 -1
- package/dist/src/lib/author.d.ts +2 -2
- package/dist/src/lib/author.js +1 -2
- package/dist/src/lib/author.js.map +1 -1
- package/dist/src/lib/{BackportError.d.ts → backport-error.d.ts} +1 -1
- package/dist/src/lib/{BackportError.js → backport-error.js} +1 -1
- package/dist/src/lib/backport-error.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{autoMergeNowOrLater.d.ts → auto-merge-now-or-later.d.ts} +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{autoMergeNowOrLater.js → auto-merge-now-or-later.js} +9 -10
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/auto-merge-now-or-later.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{cherrypickAndCreateTargetPullRequest.d.ts → cherrypick-and-create-target-pull-request.d.ts} +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{cherrypickAndCreateTargetPullRequest.js → cherrypick-and-create-target-pull-request.js} +33 -34
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{cherrypickAndCreateTargetPullRequest.test.js → cherrypick-and-create-target-pull-request.test.js} +30 -20
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.test.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{copySourcePullRequestLabels.d.ts → copy-source-pull-request-labels.d.ts} +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{copySourcePullRequestLabels.js → copy-source-pull-request-labels.js} +4 -5
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copy-source-pull-request-labels.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{copySourcePullRequestReviewersToTargetPullRequest.d.ts → copy-source-pull-request-reviewers-to-target-pull-request.d.ts} +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copy-source-pull-request-reviewers-to-target-pull-request.js +19 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copy-source-pull-request-reviewers-to-target-pull-request.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getBackportBranchName.d.ts → get-backport-branch-name.d.ts} +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getBackportBranchName.js → get-backport-branch-name.js} +4 -5
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getBackportBranchName.test.js → get-backport-branch-name.test.js} +8 -8
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.test.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getCommitsWithoutBackports.d.ts → get-commits-without-backports.d.ts} +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getCommitsWithoutBackports.js → get-commits-without-backports.js} +7 -8
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getCommitsWithoutBackports.test.js → get-commits-without-backports.test.js} +24 -14
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.test.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-merge-commit.d.ts +3 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getMergeCommit.js → get-merge-commit.js} +4 -5
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-merge-commit.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getTargetPRLabels.d.ts → get-target-prlabels.d.ts} +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getTargetPRLabels.js → get-target-prlabels.js} +6 -7
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-target-prlabels.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getTargetPRLabels.test.js → get-target-prlabels.test.js} +12 -12
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-target-prlabels.test.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{waitForCherrypick.d.ts → wait-for-cherrypick.d.ts} +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{waitForCherrypick.js → wait-for-cherrypick.js} +6 -7
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/wait-for-cherrypick.js.map +1 -0
- package/dist/src/lib/child-process-promisified.d.ts +0 -1
- package/dist/src/lib/child-process-promisified.js +2 -2
- package/dist/src/lib/child-process-promisified.js.map +1 -1
- package/dist/src/lib/env.d.ts +2 -2
- package/dist/src/lib/env.js +4 -5
- package/dist/src/lib/env.js.map +1 -1
- package/dist/src/lib/get-commits.d.ts +2 -0
- package/dist/src/lib/{getCommits.js → get-commits.js} +16 -17
- package/dist/src/lib/get-commits.js.map +1 -0
- package/dist/src/lib/{getSourceBranchFromCommits.d.ts → get-source-branch-from-commits.d.ts} +1 -1
- package/dist/src/lib/{getSourceBranchFromCommits.js → get-source-branch-from-commits.js} +2 -3
- package/dist/src/lib/get-source-branch-from-commits.js.map +1 -0
- package/dist/src/lib/{getTargetBranches.d.ts → get-target-branches.d.ts} +3 -3
- package/dist/src/lib/{getTargetBranches.js → get-target-branches.js} +8 -9
- package/dist/src/lib/get-target-branches.js.map +1 -0
- package/dist/src/lib/{getTargetBranches.test.js → get-target-branches.test.js} +27 -17
- package/dist/src/lib/get-target-branches.test.js.map +1 -0
- package/dist/src/lib/git.d.ts +6 -6
- package/dist/src/lib/git.js +62 -49
- package/dist/src/lib/git.js.map +1 -1
- package/dist/src/lib/git.private.test.js +32 -27
- package/dist/src/lib/git.private.test.js.map +1 -1
- package/dist/src/lib/git.test.js +17 -7
- package/dist/src/lib/git.test.js.map +1 -1
- package/dist/src/lib/github/{commitFormatters.js → commit-formatters.js} +4 -5
- package/dist/src/lib/github/commit-formatters.js.map +1 -0
- package/dist/src/lib/github/commit-formatters.test.js +12 -0
- package/dist/src/lib/github/commit-formatters.test.js.map +1 -0
- package/dist/src/lib/github/v3/{addAssigneesToPullRequest.js → add-assignees-to-pull-request.js} +2 -3
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.js.map +1 -0
- package/dist/src/lib/github/v3/{addAssigneesToPullRequest.test.js → add-assignees-to-pull-request.test.js} +3 -3
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.test.js.map +1 -0
- package/dist/src/lib/github/v3/{addLabelsToPullRequest.js → add-labels-to-pull-request.js} +2 -3
- package/dist/src/lib/github/v3/add-labels-to-pull-request.js.map +1 -0
- package/dist/src/lib/github/v3/{addReviewersToPullRequest.d.ts → add-reviewers-to-pull-request.d.ts} +1 -1
- package/dist/src/lib/github/v3/{addReviewersToPullRequest.js → add-reviewers-to-pull-request.js} +9 -6
- package/dist/src/lib/github/v3/add-reviewers-to-pull-request.js.map +1 -0
- package/dist/src/lib/github/v3/{createStatusComment.d.ts → create-status-comment.d.ts} +2 -2
- package/dist/src/lib/github/v3/{createStatusComment.js → create-status-comment.js} +9 -10
- package/dist/src/lib/github/v3/create-status-comment.js.map +1 -0
- package/dist/src/lib/github/v3/{createStatusComment.test.js → create-status-comment.test.js} +34 -34
- package/dist/src/lib/github/v3/create-status-comment.test.js.map +1 -0
- package/dist/src/lib/github/v3/{getGithubV3ErrorMessage.js → get-github-v3-error-message.js} +2 -3
- package/dist/src/lib/github/v3/get-github-v3-error-message.js.map +1 -0
- package/dist/src/lib/github/v3/{getReviewersFromPullRequests.js → get-reviewers-from-pull-requests.js} +4 -6
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.js.map +1 -0
- package/dist/src/lib/github/v3/{getReviewersFromPullRequests.ts.private.test.js → get-reviewers-from-pull-requests.ts.private.test.js} +6 -6
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.ts.private.test.js.map +1 -0
- package/dist/src/lib/github/v3/getPullRequest/{createPullRequest.d.ts → create-pull-request.d.ts} +1 -1
- package/dist/src/lib/github/v3/getPullRequest/{createPullRequest.js → create-pull-request.js} +9 -10
- package/dist/src/lib/github/v3/getPullRequest/create-pull-request.js.map +1 -0
- package/dist/src/lib/github/v3/getPullRequest/{getPullRequestBody.d.ts → get-pull-request-body.d.ts} +2 -2
- package/dist/src/lib/github/v3/getPullRequest/{getPullRequestBody.js → get-pull-request-body.js} +9 -10
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.js.map +1 -0
- package/dist/src/lib/github/v3/getPullRequest/{getPullRequestBody.test.js → get-pull-request-body.test.js} +20 -20
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.test.js.map +1 -0
- package/dist/src/lib/github/v3/getPullRequest/{getTitle.d.ts → get-title.d.ts} +2 -2
- package/dist/src/lib/github/v3/getPullRequest/{getTitle.js → get-title.js} +6 -7
- package/dist/src/lib/github/v3/getPullRequest/get-title.js.map +1 -0
- package/dist/src/lib/github/v3/getPullRequest/{getTitle.test.js → get-title.test.js} +9 -9
- package/dist/src/lib/github/v3/getPullRequest/get-title.test.js.map +1 -0
- package/dist/src/lib/github/v3/{mergePullRequest.d.ts → merge-pull-request.d.ts} +1 -1
- package/dist/src/lib/github/v3/{mergePullRequest.js → merge-pull-request.js} +2 -3
- package/dist/src/lib/github/v3/merge-pull-request.js.map +1 -0
- package/dist/src/lib/github/v4/client/{graphqlClient.d.ts → graphql-client.d.ts} +3 -2
- package/dist/src/lib/github/v4/client/{graphqlClient.js → graphql-client.js} +5 -5
- package/dist/src/lib/github/v4/client/graphql-client.js.map +1 -0
- package/dist/src/lib/github/v4/client/{graphqlClient.private.test.js → graphql-client.private.test.js} +8 -8
- package/dist/src/lib/github/v4/client/graphql-client.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/client/{loggingExchange.d.ts → logging-exchange.d.ts} +1 -1
- package/dist/src/lib/github/v4/client/{loggingExchange.js → logging-exchange.js} +1 -1
- package/dist/src/lib/github/v4/client/logging-exchange.js.map +1 -0
- package/dist/src/lib/github/v4/client/{responseMetaInterceptorExchange.d.ts → response-meta-interceptor-exchange.d.ts} +1 -1
- package/dist/src/lib/github/v4/client/{responseMetaInterceptorExchange.js → response-meta-interceptor-exchange.js} +2 -2
- package/dist/src/lib/github/v4/client/response-meta-interceptor-exchange.js.map +1 -0
- package/dist/src/lib/github/v4/{disablePullRequestAutoMerge.d.ts → disable-pull-request-auto-merge.d.ts} +1 -1
- package/dist/src/lib/github/v4/{disablePullRequestAutoMerge.js → disable-pull-request-auto-merge.js} +7 -8
- package/dist/src/lib/github/v4/disable-pull-request-auto-merge.js.map +1 -0
- package/dist/src/lib/github/v4/{enablePullRequestAutoMerge.d.ts → enable-pull-request-auto-merge.d.ts} +2 -2
- package/dist/src/lib/github/v4/{enablePullRequestAutoMerge.js → enable-pull-request-auto-merge.js} +8 -9
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.js.map +1 -0
- package/dist/src/lib/github/v4/{enablePullRequestAutoMerge.mutation.test.js → enable-pull-request-auto-merge.mutation.test.js} +23 -25
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.mutation.test.js.map +1 -0
- package/dist/src/lib/github/v4/{fetchAuthorId.js → fetch-author-id.js} +5 -6
- package/dist/src/lib/github/v4/fetch-author-id.js.map +1 -0
- package/dist/src/lib/github/v4/{fetchAuthorId.private.test.js → fetch-author-id.private.test.js} +6 -6
- package/dist/src/lib/github/v4/fetch-author-id.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/{fetchExistingPullRequest.d.ts → fetch-existing-pull-request.d.ts} +2 -2
- package/dist/src/lib/github/v4/{fetchExistingPullRequest.js → fetch-existing-pull-request.js} +5 -6
- package/dist/src/lib/github/v4/fetch-existing-pull-request.js.map +1 -0
- package/dist/src/lib/github/v4/{fetchExistingPullRequest.private.test.js → fetch-existing-pull-request.private.test.js} +6 -6
- package/dist/src/lib/github/v4/fetch-existing-pull-request.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/{fetchPullRequestAutoMergeMethod.d.ts → fetch-pull-request-auto-merge-method.d.ts} +1 -1
- package/dist/src/lib/github/v4/{fetchPullRequestAutoMergeMethod.js → fetch-pull-request-auto-merge-method.js} +5 -6
- package/dist/src/lib/github/v4/fetch-pull-request-auto-merge-method.js.map +1 -0
- package/dist/src/lib/github/v4/{fetchPullRequestId2.d.ts → fetch-pull-request-id2.d.ts} +1 -1
- package/dist/src/lib/github/v4/{fetchPullRequestId2.js → fetch-pull-request-id2.js} +5 -6
- package/dist/src/lib/github/v4/fetch-pull-request-id2.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{allFetchers.private.test.js → all-fetchers.private.test.js} +12 -12
- package/dist/src/lib/github/v4/fetchCommits/all-fetchers.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitByPullNumber.d.ts → fetch-commit-by-pull-number.d.ts} +2 -2
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitByPullNumber.js → fetch-commit-by-pull-number.js} +14 -15
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitByPullNumber.private.test.js → fetch-commit-by-pull-number.private.test.js} +7 -7
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitBySha.d.ts → fetch-commit-by-sha.d.ts} +2 -2
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitBySha.js → fetch-commit-by-sha.js} +11 -12
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitBySha.private.test.js → fetch-commit-by-sha.private.test.js} +7 -7
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsByAuthor.d.ts → fetch-commits-by-author.d.ts} +2 -2
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsByAuthor.js → fetch-commits-by-author.js} +20 -21
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsByAuthor.private.test.js → fetch-commits-by-author.private.test.js} +9 -9
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsByAuthor.test.js → fetch-commits-by-author.test.js} +12 -12
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsForRebaseAndMergeStrategy.d.ts → fetch-commits-for-rebase-and-merge-strategy.d.ts} +1 -1
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsForRebaseAndMergeStrategy.js → fetch-commits-for-rebase-and-merge-strategy.js} +7 -8
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsForRebaseAndMergeStrategy.private.test.js → fetch-commits-for-rebase-and-merge-strategy.private.test.js} +6 -6
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchPullRequestBySearchQuery.private.test.js → fetch-pull-request-by-search-query.private.test.js} +6 -6
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-request-by-search-query.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/{fetchPullRequestsBySearchQuery.d.ts → fetch-pull-requests-by-search-query.d.ts} +1 -1
- package/dist/src/lib/github/v4/fetchCommits/{fetchPullRequestsBySearchQuery.js → fetch-pull-requests-by-search-query.js} +15 -16
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-requests-by-search-query.js.map +1 -0
- package/dist/src/lib/github/v4/{getInvalidAccessTokenMessage.d.ts → get-invalid-access-token-message.d.ts} +1 -1
- package/dist/src/lib/github/v4/{getInvalidAccessTokenMessage.js → get-invalid-access-token-message.js} +4 -5
- package/dist/src/lib/github/v4/get-invalid-access-token-message.js.map +1 -0
- package/dist/src/lib/github/v4/{getInvalidAccessTokenMessage.test.js → get-invalid-access-token-message.test.js} +7 -7
- package/dist/src/lib/github/v4/get-invalid-access-token-message.test.js.map +1 -0
- package/dist/src/lib/github/v4/{getRepoOwnerAndNameFromGitRemotes.js → get-repo-owner-and-name-from-git-remotes.js} +6 -7
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.js.map +1 -0
- package/dist/src/lib/github/v4/{getRepoOwnerAndNameFromGitRemotes.private.test.js → get-repo-owner-and-name-from-git-remotes.private.test.js} +14 -14
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/getOptionsFromGithub/{getOptionsFromGithub.d.ts → get-options-from-github.d.ts} +2 -2
- package/dist/src/lib/github/v4/getOptionsFromGithub/{getOptionsFromGithub.js → get-options-from-github.js} +15 -16
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.js.map +1 -0
- package/dist/src/lib/github/v4/getOptionsFromGithub/{getOptionsFromGithub.private.test.js → get-options-from-github.private.test.js} +10 -10
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.private.test.js.map +1 -0
- package/dist/src/lib/github/v4/mocks/commits-by-author-mock.d.ts +2 -0
- package/dist/src/lib/github/v4/mocks/{commitsByAuthorMock.js → commits-by-author-mock.js} +1 -1
- package/dist/src/lib/github/v4/mocks/commits-by-author-mock.js.map +1 -0
- package/dist/src/lib/github/v4/{validateTargetBranch.js → validate-target-branch.js} +7 -8
- package/dist/src/lib/github/v4/validate-target-branch.js.map +1 -0
- package/dist/src/lib/github/v4/validate-target-branch.private.test.js +24 -0
- package/dist/src/lib/github/v4/validate-target-branch.private.test.js.map +1 -0
- package/dist/src/lib/logger.js +23 -14
- package/dist/src/lib/logger.js.map +1 -1
- package/dist/src/lib/ora.js +2 -3
- package/dist/src/lib/ora.js.map +1 -1
- package/dist/src/lib/prompts.d.ts +2 -2
- package/dist/src/lib/prompts.js +9 -10
- package/dist/src/lib/prompts.js.map +1 -1
- package/dist/src/lib/{registerHandlebarsHelpers.js → register-handlebars-helpers.js} +4 -5
- package/dist/src/lib/register-handlebars-helpers.js.map +1 -0
- package/dist/src/lib/{remoteConfig.d.ts → remote-config.d.ts} +1 -1
- package/dist/src/lib/{remoteConfig.js → remote-config.js} +6 -6
- package/dist/src/lib/remote-config.js.map +1 -0
- package/dist/src/lib/{runSequentially.d.ts → run-sequentially.d.ts} +3 -3
- package/dist/src/lib/{runSequentially.js → run-sequentially.js} +6 -7
- package/dist/src/lib/run-sequentially.js.map +1 -0
- package/dist/src/lib/sequentially.js +1 -2
- package/dist/src/lib/sequentially.js.map +1 -1
- package/dist/src/lib/{setupRepo.d.ts → setup-repo.d.ts} +1 -1
- package/dist/src/lib/{setupRepo.js → setup-repo.js} +7 -6
- package/dist/src/lib/setup-repo.js.map +1 -0
- package/dist/src/lib/{setupRepo.test.js → setup-repo.test.js} +25 -15
- package/dist/src/lib/setup-repo.test.js.map +1 -0
- package/dist/src/lib/sourceCommit/{getMockSourceCommit.d.ts → get-mock-source-commit.d.ts} +1 -1
- package/dist/src/lib/sourceCommit/{getMockSourceCommit.js → get-mock-source-commit.js} +2 -3
- package/dist/src/lib/sourceCommit/get-mock-source-commit.js.map +1 -0
- package/dist/src/lib/sourceCommit/{getPullRequestStates.d.ts → get-pull-request-states.d.ts} +2 -2
- package/dist/src/lib/sourceCommit/{getPullRequestStates.js → get-pull-request-states.js} +19 -17
- package/dist/src/lib/sourceCommit/get-pull-request-states.js.map +1 -0
- package/dist/src/lib/sourceCommit/{getPullRequestStates.test.js → get-pull-request-states.test.js} +35 -35
- package/dist/src/lib/sourceCommit/get-pull-request-states.test.js.map +1 -0
- package/dist/src/lib/sourceCommit/get-source-pull-request.d.ts +221 -0
- package/dist/src/lib/sourceCommit/{getSourcePullRequest.js → get-source-pull-request.js} +2 -3
- package/dist/src/lib/sourceCommit/get-source-pull-request.js.map +1 -0
- package/dist/src/lib/sourceCommit/{isPullRequestCrossReferencedEvent.d.ts → is-pull-request-cross-referenced-event.d.ts} +1 -1
- package/dist/src/lib/sourceCommit/{isPullRequestCrossReferencedEvent.js → is-pull-request-cross-referenced-event.js} +2 -3
- package/dist/src/lib/sourceCommit/is-pull-request-cross-referenced-event.js.map +1 -0
- package/dist/src/lib/sourceCommit/{parseSourceCommit.d.ts → parse-source-commit.d.ts} +3 -3
- package/dist/src/lib/sourceCommit/{parseSourceCommit.js → parse-source-commit.js} +13 -13
- package/dist/src/lib/sourceCommit/parse-source-commit.js.map +1 -0
- package/dist/src/lib/sourceCommit/{parseSourceCommit.test.js → parse-source-commit.test.js} +15 -15
- package/dist/src/lib/sourceCommit/parse-source-commit.test.js.map +1 -0
- package/dist/src/options/{cliArgs.d.ts → cli-args.d.ts} +1 -1
- package/dist/src/options/{cliArgs.js → cli-args.js} +5 -7
- package/dist/src/options/cli-args.js.map +1 -0
- package/dist/src/options/{cliArgs.test.js → cli-args.test.js} +50 -50
- package/dist/src/options/cli-args.test.js.map +1 -0
- package/dist/src/options/config/config.d.ts +4 -4
- package/dist/src/options/config/config.js +5 -6
- package/dist/src/options/config/config.js.map +1 -1
- package/dist/src/options/config/config.test.js +2 -2
- package/dist/src/options/config/config.test.js.map +1 -1
- package/dist/src/options/config/{globalConfig.d.ts → global-config.d.ts} +1 -1
- package/dist/src/options/config/{globalConfig.js → global-config.js} +10 -11
- package/dist/src/options/config/global-config.js.map +1 -0
- package/dist/src/options/config/{globalConfig.test.js → global-config.test.js} +6 -6
- package/dist/src/options/config/global-config.test.js.map +1 -0
- package/dist/src/options/config/{projectConfig.d.ts → project-config.d.ts} +1 -1
- package/dist/src/options/config/{projectConfig.js → project-config.js} +4 -5
- package/dist/src/options/config/project-config.js.map +1 -0
- package/dist/src/options/config/{projectConfig.test.js → project-config.test.js} +9 -9
- package/dist/src/options/config/project-config.test.js.map +1 -0
- package/dist/src/options/config/{readConfigFile.d.ts → read-config-file.d.ts} +1 -1
- package/dist/src/options/config/{readConfigFile.js → read-config-file.js} +9 -8
- package/dist/src/options/config/read-config-file.js.map +1 -0
- package/dist/src/options/{ConfigOptions.d.ts → config-options.d.ts} +1 -1
- package/dist/src/options/{ConfigOptions.js → config-options.js} +1 -1
- package/dist/src/options/config-options.js.map +1 -0
- package/dist/src/options/options.d.ts +5 -5
- package/dist/src/options/options.js +12 -12
- package/dist/src/options/options.js.map +1 -1
- package/dist/src/options/options.test.js +24 -14
- package/dist/src/options/options.test.js.map +1 -1
- package/dist/src/scripts/postinstall.js +4 -5
- package/dist/src/scripts/postinstall.js.map +1 -1
- package/dist/src/scripts/postinstall.test.js +18 -8
- package/dist/src/scripts/postinstall.test.js.map +1 -1
- package/dist/src/scripts/{runPostinstall.js → run-postinstall.js} +2 -2
- package/dist/src/scripts/run-postinstall.js.map +1 -0
- package/dist/src/test/{childProcessHelper.d.ts → child-process-helper.d.ts} +0 -1
- package/dist/src/test/{childProcessHelper.js → child-process-helper.js} +2 -3
- package/dist/src/test/child-process-helper.js.map +1 -0
- package/dist/src/test/e2e/cli/binary.private.test.js +2 -2
- package/dist/src/test/e2e/cli/binary.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/commit-author.private.test.js +12 -12
- package/dist/src/test/e2e/cli/commit-author.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/copy-reviewers-to-target-pull-request.private.test.js +5 -5
- package/dist/src/test/e2e/cli/copy-reviewers-to-target-pull-request.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/date-filters.private.test.js +7 -7
- package/dist/src/test/e2e/cli/date-filters.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/different-merge-strategies.private.test.js +15 -15
- package/dist/src/test/e2e/cli/different-merge-strategies.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/entrypoint.cli.private.test.js +31 -21
- package/dist/src/test/e2e/cli/entrypoint.cli.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/error-handling-interactive-mode.private.test.js +12 -12
- package/dist/src/test/e2e/cli/error-handling-interactive-mode.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/error-handling-non-interactive-mode.private.test.js +16 -16
- package/dist/src/test/e2e/cli/error-handling-non-interactive-mode.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.js +9 -9
- package/dist/src/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/repo-with-backportrc-removed.private.test.js +6 -6
- package/dist/src/test/e2e/cli/repo-with-backportrc-removed.private.test.js.map +1 -1
- package/dist/src/test/e2e/cli/{repo-with-changing-branchLabelMapping.private.test.js → repo-with-changing-branch-label-mapping.private.test.js} +9 -9
- package/dist/src/test/e2e/cli/repo-with-changing-branch-label-mapping.private.test.js.map +1 -0
- package/dist/src/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.js +6 -7
- package/dist/src/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.js.map +1 -1
- package/dist/src/test/e2e/cli/{runBackportViaCli.d.ts → run-backport-via-cli.d.ts} +7 -1
- package/dist/src/test/e2e/cli/{runBackportViaCli.js → run-backport-via-cli.js} +5 -6
- package/dist/src/test/e2e/cli/run-backport-via-cli.js.map +1 -0
- package/dist/src/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js +8 -8
- package/dist/src/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js.map +1 -1
- package/dist/src/test/e2e/module/entrypoint.module.mutation.test.js +6 -6
- package/dist/src/test/e2e/module/entrypoint.module.mutation.test.js.map +1 -1
- package/dist/src/test/{handleUnbackportedPullRequests.private.test.js → handle-unbackported-pull-requests.private.test.js} +4 -4
- package/dist/src/test/handle-unbackported-pull-requests.private.test.js.map +1 -0
- package/dist/src/test/{mockConfigFiles.d.ts → mock-config-files.d.ts} +1 -1
- package/dist/src/test/{mockConfigFiles.js → mock-config-files.js} +2 -3
- package/dist/src/test/mock-config-files.js.map +1 -0
- package/dist/src/test/{nockHelpers.js → nock-helpers.js} +3 -5
- package/dist/src/test/nock-helpers.js.map +1 -0
- package/dist/src/test/private/{getDevAccessToken.js → get-dev-access-token.js} +2 -3
- package/dist/src/test/private/get-dev-access-token.js.map +1 -0
- package/dist/src/test/{replaceStringAndLinebreaks.js → replace-string-and-linebreaks.js} +3 -4
- package/dist/src/test/replace-string-and-linebreaks.js.map +1 -0
- package/dist/src/test/sandbox.js +20 -10
- package/dist/src/test/sandbox.js.map +1 -1
- package/dist/src/test/setupFiles/automatic-mocks.js +20 -11
- package/dist/src/test/setupFiles/automatic-mocks.js.map +1 -1
- package/dist/src/test/setupFiles/nock-cleanup.js +16 -0
- package/dist/src/test/setupFiles/nock-cleanup.js.map +1 -0
- package/dist/src/utils/{excludeUndefined.d.ts → exclude-undefined.d.ts} +1 -1
- package/dist/src/utils/{excludeUndefined.js → exclude-undefined.js} +2 -3
- package/dist/src/utils/exclude-undefined.js.map +1 -0
- package/dist/src/utils/exclude-undefined.test.d.ts +1 -0
- package/dist/src/utils/{excludeUndefined.test.js → exclude-undefined.test.js} +4 -4
- package/dist/src/utils/exclude-undefined.test.js.map +1 -0
- package/dist/src/utils/{filterEmpty.js → filter-empty.js} +2 -3
- package/dist/src/utils/filter-empty.js.map +1 -0
- package/dist/src/utils/{filterUnmergedCommits.d.ts → filter-unmerged-commits.d.ts} +1 -1
- package/dist/src/utils/{filterUnmergedCommits.js → filter-unmerged-commits.js} +2 -3
- package/dist/src/utils/filter-unmerged-commits.js.map +1 -0
- package/dist/src/utils/{isErrnoError.d.ts → is-errno-error.d.ts} +0 -1
- package/dist/src/utils/{isErrnoError.js → is-errno-error.js} +2 -3
- package/dist/src/utils/is-errno-error.js.map +1 -0
- package/dist/src/utils/maybe.js +1 -2
- package/dist/src/utils/maybe.js.map +1 -1
- package/dist/src/utils/{packageVersion.js → package-version.js} +2 -3
- package/dist/src/utils/package-version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -26
- package/CHANGELOG.md +0 -1
- package/dist/src/backportRun.js.map +0 -1
- package/dist/src/lib/BackportError.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/autoMergeNowOrLater.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypickAndCreateTargetPullRequest.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypickAndCreateTargetPullRequest.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copySourcePullRequestLabels.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copySourcePullRequestReviewersToTargetPullRequest.js +0 -20
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copySourcePullRequestReviewersToTargetPullRequest.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getBackportBranchName.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getBackportBranchName.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getCommitsWithoutBackports.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getCommitsWithoutBackports.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getMergeCommit.d.ts +0 -3
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getMergeCommit.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/waitForCherrypick.js.map +0 -1
- package/dist/src/lib/getCommits.d.ts +0 -2
- package/dist/src/lib/getCommits.js.map +0 -1
- package/dist/src/lib/getSourceBranchFromCommits.js.map +0 -1
- package/dist/src/lib/getTargetBranches.js.map +0 -1
- package/dist/src/lib/getTargetBranches.test.js.map +0 -1
- package/dist/src/lib/github/commitFormatters.js.map +0 -1
- package/dist/src/lib/github/commitFormatters.test.js +0 -12
- package/dist/src/lib/github/commitFormatters.test.js.map +0 -1
- package/dist/src/lib/github/v3/addAssigneesToPullRequest.js.map +0 -1
- package/dist/src/lib/github/v3/addAssigneesToPullRequest.test.js.map +0 -1
- package/dist/src/lib/github/v3/addLabelsToPullRequest.js.map +0 -1
- package/dist/src/lib/github/v3/addReviewersToPullRequest.js.map +0 -1
- package/dist/src/lib/github/v3/createStatusComment.js.map +0 -1
- package/dist/src/lib/github/v3/createStatusComment.test.js.map +0 -1
- package/dist/src/lib/github/v3/getGithubV3ErrorMessage.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/createPullRequest.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/getPullRequestBody.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/getPullRequestBody.test.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/getTitle.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/getTitle.test.js.map +0 -1
- package/dist/src/lib/github/v3/getReviewersFromPullRequests.js.map +0 -1
- package/dist/src/lib/github/v3/getReviewersFromPullRequests.ts.private.test.js.map +0 -1
- package/dist/src/lib/github/v3/mergePullRequest.js.map +0 -1
- package/dist/src/lib/github/v4/client/graphqlClient.js.map +0 -1
- package/dist/src/lib/github/v4/client/graphqlClient.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/client/loggingExchange.js.map +0 -1
- package/dist/src/lib/github/v4/client/responseMetaInterceptorExchange.js.map +0 -1
- package/dist/src/lib/github/v4/disablePullRequestAutoMerge.js.map +0 -1
- package/dist/src/lib/github/v4/enablePullRequestAutoMerge.js.map +0 -1
- package/dist/src/lib/github/v4/enablePullRequestAutoMerge.mutation.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchAuthorId.js.map +0 -1
- package/dist/src/lib/github/v4/fetchAuthorId.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/allFetchers.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitByPullNumber.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitBySha.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitBySha.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitsByAuthor.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitsByAuthor.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitsForRebaseAndMergeStrategy.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchCommitsForRebaseAndMergeStrategy.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetchPullRequestsBySearchQuery.js.map +0 -1
- package/dist/src/lib/github/v4/fetchExistingPullRequest.js.map +0 -1
- package/dist/src/lib/github/v4/fetchExistingPullRequest.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchPullRequestAutoMergeMethod.js.map +0 -1
- package/dist/src/lib/github/v4/fetchPullRequestId2.js.map +0 -1
- package/dist/src/lib/github/v4/getInvalidAccessTokenMessage.js.map +0 -1
- package/dist/src/lib/github/v4/getInvalidAccessTokenMessage.test.js.map +0 -1
- package/dist/src/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.js.map +0 -1
- package/dist/src/lib/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/getRepoOwnerAndNameFromGitRemotes.js.map +0 -1
- package/dist/src/lib/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/mocks/commitsByAuthorMock.d.ts +0 -2
- package/dist/src/lib/github/v4/mocks/commitsByAuthorMock.js.map +0 -1
- package/dist/src/lib/github/v4/validateTargetBranch.js.map +0 -1
- package/dist/src/lib/github/v4/validateTargetBranch.private.test.js +0 -24
- package/dist/src/lib/github/v4/validateTargetBranch.private.test.js.map +0 -1
- package/dist/src/lib/registerHandlebarsHelpers.js.map +0 -1
- package/dist/src/lib/remoteConfig.js.map +0 -1
- package/dist/src/lib/runSequentially.js.map +0 -1
- package/dist/src/lib/setupRepo.js.map +0 -1
- package/dist/src/lib/setupRepo.test.js.map +0 -1
- package/dist/src/lib/sourceCommit/getMockSourceCommit.js.map +0 -1
- package/dist/src/lib/sourceCommit/getPullRequestStates.js.map +0 -1
- package/dist/src/lib/sourceCommit/getPullRequestStates.test.js.map +0 -1
- package/dist/src/lib/sourceCommit/getSourcePullRequest.d.ts +0 -221
- package/dist/src/lib/sourceCommit/getSourcePullRequest.js.map +0 -1
- package/dist/src/lib/sourceCommit/isPullRequestCrossReferencedEvent.js.map +0 -1
- package/dist/src/lib/sourceCommit/parseSourceCommit.js.map +0 -1
- package/dist/src/lib/sourceCommit/parseSourceCommit.test.js.map +0 -1
- package/dist/src/options/ConfigOptions.js.map +0 -1
- package/dist/src/options/cliArgs.js.map +0 -1
- package/dist/src/options/cliArgs.test.js.map +0 -1
- package/dist/src/options/config/globalConfig.js.map +0 -1
- package/dist/src/options/config/globalConfig.test.js.map +0 -1
- package/dist/src/options/config/projectConfig.js.map +0 -1
- package/dist/src/options/config/projectConfig.test.js.map +0 -1
- package/dist/src/options/config/readConfigFile.js.map +0 -1
- package/dist/src/scripts/runPostinstall.js.map +0 -1
- package/dist/src/test/childProcessHelper.js.map +0 -1
- package/dist/src/test/e2e/cli/repo-with-changing-branchLabelMapping.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/runBackportViaCli.js.map +0 -1
- package/dist/src/test/handleUnbackportedPullRequests.private.test.js.map +0 -1
- package/dist/src/test/mockConfigFiles.js.map +0 -1
- package/dist/src/test/nockHelpers.js.map +0 -1
- package/dist/src/test/private/getDevAccessToken.js.map +0 -1
- package/dist/src/test/replaceStringAndLinebreaks.js.map +0 -1
- package/dist/src/utils/excludeUndefined.js.map +0 -1
- package/dist/src/utils/excludeUndefined.test.js.map +0 -1
- package/dist/src/utils/filterEmpty.js.map +0 -1
- package/dist/src/utils/filterUnmergedCommits.js.map +0 -1
- package/dist/src/utils/isErrnoError.js.map +0 -1
- package/dist/src/utils/packageVersion.js.map +0 -1
- package/yarn.lock +0 -7291
- /package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{cherrypickAndCreateTargetPullRequest.test.d.ts → cherrypick-and-create-target-pull-request.test.d.ts} +0 -0
- /package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getBackportBranchName.test.d.ts → get-backport-branch-name.test.d.ts} +0 -0
- /package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getCommitsWithoutBackports.test.d.ts → get-commits-without-backports.test.d.ts} +0 -0
- /package/dist/src/lib/cherrypickAndCreateTargetPullRequest/{getTargetPRLabels.test.d.ts → get-target-prlabels.test.d.ts} +0 -0
- /package/dist/src/lib/{getTargetBranches.test.d.ts → get-target-branches.test.d.ts} +0 -0
- /package/dist/src/lib/github/{commitFormatters.d.ts → commit-formatters.d.ts} +0 -0
- /package/dist/src/lib/github/{commitFormatters.test.d.ts → commit-formatters.test.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{addAssigneesToPullRequest.d.ts → add-assignees-to-pull-request.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{addAssigneesToPullRequest.test.d.ts → add-assignees-to-pull-request.test.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{addLabelsToPullRequest.d.ts → add-labels-to-pull-request.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{createStatusComment.test.d.ts → create-status-comment.test.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{getGithubV3ErrorMessage.d.ts → get-github-v3-error-message.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{getReviewersFromPullRequests.d.ts → get-reviewers-from-pull-requests.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{getPullRequest/getPullRequestBody.test.d.ts → get-reviewers-from-pull-requests.ts.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v3/getPullRequest/{getTitle.test.d.ts → get-pull-request-body.test.d.ts} +0 -0
- /package/dist/src/lib/github/v3/{getReviewersFromPullRequests.ts.private.test.d.ts → getPullRequest/get-title.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/client/{graphqlClient.private.test.d.ts → graphql-client.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{enablePullRequestAutoMerge.mutation.test.d.ts → enable-pull-request-auto-merge.mutation.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{fetchAuthorId.d.ts → fetch-author-id.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{fetchAuthorId.private.test.d.ts → fetch-author-id.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{fetchCommits/allFetchers.private.test.d.ts → fetch-existing-pull-request.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/fetchCommits/{fetchCommitByPullNumber.private.test.d.ts → all-fetchers.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/fetchCommits/{fetchCommitBySha.private.test.d.ts → fetch-commit-by-pull-number.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsByAuthor.private.test.d.ts → fetch-commit-by-sha.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsByAuthor.test.d.ts → fetch-commits-by-author.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/fetchCommits/{fetchCommitsForRebaseAndMergeStrategy.private.test.d.ts → fetch-commits-by-author.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/fetchCommits/{fetchPullRequestBySearchQuery.private.test.d.ts → fetch-commits-for-rebase-and-merge-strategy.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{fetchExistingPullRequest.private.test.d.ts → fetchCommits/fetch-pull-request-by-search-query.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{getInvalidAccessTokenMessage.test.d.ts → get-invalid-access-token-message.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{getRepoOwnerAndNameFromGitRemotes.d.ts → get-repo-owner-and-name-from-git-remotes.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{getOptionsFromGithub/getOptionsFromGithub.private.test.d.ts → get-repo-owner-and-name-from-git-remotes.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{getRepoOwnerAndNameFromGitRemotes.private.test.d.ts → getOptionsFromGithub/get-options-from-github.private.test.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{validateTargetBranch.d.ts → validate-target-branch.d.ts} +0 -0
- /package/dist/src/lib/github/v4/{validateTargetBranch.private.test.d.ts → validate-target-branch.private.test.d.ts} +0 -0
- /package/dist/src/lib/{registerHandlebarsHelpers.d.ts → register-handlebars-helpers.d.ts} +0 -0
- /package/dist/src/lib/{setupRepo.test.d.ts → setup-repo.test.d.ts} +0 -0
- /package/dist/src/lib/sourceCommit/{getPullRequestStates.test.d.ts → get-pull-request-states.test.d.ts} +0 -0
- /package/dist/src/lib/sourceCommit/{parseSourceCommit.test.d.ts → parse-source-commit.test.d.ts} +0 -0
- /package/dist/src/options/{cliArgs.test.d.ts → cli-args.test.d.ts} +0 -0
- /package/dist/src/options/config/{globalConfig.test.d.ts → global-config.test.d.ts} +0 -0
- /package/dist/src/options/config/{projectConfig.test.d.ts → project-config.test.d.ts} +0 -0
- /package/dist/src/scripts/{runPostinstall.d.ts → run-postinstall.d.ts} +0 -0
- /package/dist/src/test/e2e/cli/{repo-with-changing-branchLabelMapping.private.test.d.ts → repo-with-changing-branch-label-mapping.private.test.d.ts} +0 -0
- /package/dist/src/test/{handleUnbackportedPullRequests.private.test.d.ts → handle-unbackported-pull-requests.private.test.d.ts} +0 -0
- /package/dist/src/test/{nockHelpers.d.ts → nock-helpers.d.ts} +0 -0
- /package/dist/src/test/private/{getDevAccessToken.d.ts → get-dev-access-token.d.ts} +0 -0
- /package/dist/src/test/{replaceStringAndLinebreaks.d.ts → replace-string-and-linebreaks.d.ts} +0 -0
- /package/dist/src/{utils/excludeUndefined.test.d.ts → test/setupFiles/nock-cleanup.d.ts} +0 -0
- /package/dist/src/utils/{filterEmpty.d.ts → filter-empty.d.ts} +0 -0
- /package/dist/src/utils/{packageVersion.d.ts → package-version.d.ts} +0 -0
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
7
|
-
const
|
|
7
|
+
const get_pull_request_body_1 = require("./get-pull-request-body");
|
|
8
8
|
const commits = [
|
|
9
9
|
{
|
|
10
10
|
sourcePullRequest: {
|
|
@@ -34,7 +34,7 @@ describe('getPullRequestBody', () => {
|
|
|
34
34
|
const options = {
|
|
35
35
|
prDescription: '{{defaultPrDescription}}\n\ntext to append',
|
|
36
36
|
};
|
|
37
|
-
expect((0,
|
|
37
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
38
38
|
.toMatchInlineSnapshot(`
|
|
39
39
|
"# Backport
|
|
40
40
|
|
|
@@ -54,7 +54,7 @@ text to append"
|
|
|
54
54
|
const options = {
|
|
55
55
|
prDescription: '{defaultPrDescription}\n\ntext to append',
|
|
56
56
|
};
|
|
57
|
-
expect((0,
|
|
57
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
58
58
|
.toMatchInlineSnapshot(`
|
|
59
59
|
"# Backport
|
|
60
60
|
|
|
@@ -76,13 +76,13 @@ text to append"
|
|
|
76
76
|
const options = {
|
|
77
77
|
prDescription: 'Just output the commits: {{commitsStringified}}',
|
|
78
78
|
};
|
|
79
|
-
expect((0,
|
|
79
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' })).toMatchInlineSnapshot(`"Just output the commits: [{"sourcePullRequest":{"url":"https://github.com/backport-org/different-merge-strategies/pull/55"},"sourceCommit":{"sha":"acbcdef","message":"My commit message (#55)"},"sourceBranch":"main"},{"sourcePullRequest":{"url":"https://github.com/backport-org/different-merge-strategies/pull/56"},"sourceCommit":{"sha":"hijklmn","message":"Another commit message (#56)"},"sourceBranch":"main"}]"`);
|
|
80
80
|
});
|
|
81
81
|
it('replaces {commits} for legacy reasons', () => {
|
|
82
82
|
const options = {
|
|
83
83
|
prDescription: 'Just output the commits: {commits}',
|
|
84
84
|
};
|
|
85
|
-
expect((0,
|
|
85
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' })).toMatchInlineSnapshot(`"Just output the commits: [{"sourcePullRequest":{"url":"https://github.com/backport-org/different-merge-strategies/pull/55"},"sourceCommit":{"sha":"acbcdef","message":"My commit message (#55)"},"sourceBranch":"main"},{"sourcePullRequest":{"url":"https://github.com/backport-org/different-merge-strategies/pull/56"},"sourceCommit":{"sha":"hijklmn","message":"Another commit message (#56)"},"sourceBranch":"main"}]"`);
|
|
86
86
|
});
|
|
87
87
|
it('strips markdown comments', () => {
|
|
88
88
|
const commits = [
|
|
@@ -100,7 +100,7 @@ text to append"
|
|
|
100
100
|
const options = {
|
|
101
101
|
prDescription: 'Just output the commits: {commits}',
|
|
102
102
|
};
|
|
103
|
-
const res = (0,
|
|
103
|
+
const res = (0, get_pull_request_body_1.getPullRequestBody)({
|
|
104
104
|
options,
|
|
105
105
|
commits,
|
|
106
106
|
targetBranch: '7.x',
|
|
@@ -123,7 +123,7 @@ text to append"
|
|
|
123
123
|
const options = {
|
|
124
124
|
prDescription: '{defaultPrDescription}\n\n<!--BACKPORT {commits} BACKPORT-->',
|
|
125
125
|
};
|
|
126
|
-
expect((0,
|
|
126
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '9.0' }))
|
|
127
127
|
.toMatchInlineSnapshot(`
|
|
128
128
|
"# Backport
|
|
129
129
|
|
|
@@ -144,7 +144,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
144
144
|
const options = {
|
|
145
145
|
prDescription: '{{commitMessages}}',
|
|
146
146
|
};
|
|
147
|
-
expect((0,
|
|
147
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
148
148
|
.toMatchInlineSnapshot(`
|
|
149
149
|
" - [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
150
150
|
- [Another commit message (#56)](https://github.com/backport-org/different-merge-strategies/pull/56)"
|
|
@@ -152,7 +152,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
152
152
|
});
|
|
153
153
|
it('replaces {{commitMessages}} in default PR description', () => {
|
|
154
154
|
const options = {};
|
|
155
|
-
expect((0,
|
|
155
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
156
156
|
.toMatchInlineSnapshot(`
|
|
157
157
|
"# Backport
|
|
158
158
|
|
|
@@ -179,7 +179,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
179
179
|
const options = {
|
|
180
180
|
prDescription: '{defaultPrDescription}\n\n<!--BACKPORT {commits} BACKPORT-->',
|
|
181
181
|
};
|
|
182
|
-
expect((0,
|
|
182
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '9.0' }))
|
|
183
183
|
.toMatchInlineSnapshot(`
|
|
184
184
|
"# Backport
|
|
185
185
|
|
|
@@ -198,7 +198,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
198
198
|
});
|
|
199
199
|
describe('{{packageVersion}}', () => {
|
|
200
200
|
it('replaces {{PACKAGE_VERSION}}', () => {
|
|
201
|
-
const body = (0,
|
|
201
|
+
const body = (0, get_pull_request_body_1.getPullRequestBody)({
|
|
202
202
|
options: {},
|
|
203
203
|
commits,
|
|
204
204
|
targetBranch: 'release',
|
|
@@ -211,7 +211,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
211
211
|
const options = {
|
|
212
212
|
prDescription: '{{#each commits}} - {{shortSha this.sourceCommit.sha}} {{this.sourceCommit.message}}\n{{/each}}',
|
|
213
213
|
};
|
|
214
|
-
expect((0,
|
|
214
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
215
215
|
.toMatchInlineSnapshot(`
|
|
216
216
|
" - acbcdef My commit message (#55)
|
|
217
217
|
- hijklmn Another commit message (#56)
|
|
@@ -231,7 +231,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
231
231
|
const options = {
|
|
232
232
|
prDescription: '{{#each commits}} - {{shortSha this.sourceCommit.sha}} {{this.sourceCommit.message}}\n{{/each}}',
|
|
233
233
|
};
|
|
234
|
-
expect((0,
|
|
234
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
235
235
|
.toMatchInlineSnapshot(`
|
|
236
236
|
" - mySha This is a commit message
|
|
237
237
|
This is a description with illegal brackets \`\`\`
|
|
@@ -269,7 +269,7 @@ metadata={{
|
|
|
269
269
|
|
|
270
270
|
{{#each commits}}{{shortSha this.sourceCommit.sha}} {{this.sourceCommit.message}}\n{{/each}}`,
|
|
271
271
|
};
|
|
272
|
-
expect((0,
|
|
272
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
273
273
|
.toMatchInlineSnapshot(`
|
|
274
274
|
"Backport #123: Original PR title
|
|
275
275
|
|
|
@@ -281,7 +281,7 @@ metadata={{
|
|
|
281
281
|
});
|
|
282
282
|
describe('commit message formatting', () => {
|
|
283
283
|
it('when single pull request is backported', () => {
|
|
284
|
-
expect((0,
|
|
284
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
285
285
|
options: {},
|
|
286
286
|
commits: [
|
|
287
287
|
{
|
|
@@ -310,7 +310,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
310
310
|
`);
|
|
311
311
|
});
|
|
312
312
|
it('when a single commit (non pull request) is backported', () => {
|
|
313
|
-
expect((0,
|
|
313
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
314
314
|
options: {},
|
|
315
315
|
commits: [
|
|
316
316
|
{
|
|
@@ -335,7 +335,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
335
335
|
`);
|
|
336
336
|
});
|
|
337
337
|
it('when multiple commits are backported', () => {
|
|
338
|
-
expect((0,
|
|
338
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
339
339
|
options: {},
|
|
340
340
|
commits: [
|
|
341
341
|
{
|
|
@@ -373,7 +373,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
373
373
|
`);
|
|
374
374
|
});
|
|
375
375
|
it('when a PR is merged (instead of squashed) and the individual commits are selected', () => {
|
|
376
|
-
expect((0,
|
|
376
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
377
377
|
options: {},
|
|
378
378
|
commits: [
|
|
379
379
|
{
|
|
@@ -426,7 +426,7 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
426
426
|
throw compileError;
|
|
427
427
|
});
|
|
428
428
|
const options = {};
|
|
429
|
-
expect((0,
|
|
429
|
+
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
430
430
|
.toMatchInlineSnapshot(`
|
|
431
431
|
"# Backport
|
|
432
432
|
|
|
@@ -444,4 +444,4 @@ Please refer to the [Backport tool documentation](https://github.com/sorenlouv/b
|
|
|
444
444
|
});
|
|
445
445
|
});
|
|
446
446
|
});
|
|
447
|
-
//# sourceMappingURL=
|
|
447
|
+
//# sourceMappingURL=get-pull-request-body.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pull-request-body.test.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v3/getPullRequest/get-pull-request-body.test.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AAGpC,mEAA6D;AAE7D,MAAM,OAAO,GAAG;IACd;QACE,iBAAiB,EAAE;YACjB,GAAG,EAAE,oEAAoE;SAC1E;QACD,YAAY,EAAE;YACZ,GAAG,EAAE,SAAS;YACd,OAAO,EAAE,yBAAyB;SACnC;QACD,YAAY,EAAE,MAAM;KACrB;IACD;QACE,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mE;yBACzE;wBACD,YAAY,EAAE,MAAM;qBACrB;oBACD;wBACE,YAAY,EAAE;4BACZ,OAAO,EAAE,8BAA8B;4BACvC,GAAG,EAAE,0CAA0C;yBAChD;wBACD,iBAAiB,EAAE;4BACjB,MAAM,EAAE,CAAC;4BACT,KAAK,EAAE,aAAa;4BACpB,GAAG,EAAE,mEAAmE;yBACzE;wBACD,YAAY,EAAE,MAAM;qBACrB;iBACU;gBAEb,YAAY,EAAE,KAAK;aACpB,CAAC,CACH,CAAC,qBAAqB,CAAC;;;;;;;;;;;CAW7B,CAAC,CAAC;QACC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QAC1B,EAAE,CAAC,mEAAmE,EAAE,GAAG,EAAE;YAC3E,MAAM,YAAY,GAAG,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;YAE1D,6CAA6C;YAC7C,MAAM,UAAU,GAAG,IAAI;iBACpB,KAAK,CAAC,oBAAU,EAAE,SAAS,CAAC;iBAC5B,kBAAkB,CAAC,GAAG,EAAE;gBACvB,MAAM,YAAY,CAAC;YACrB,CAAC,CAAC,CAAC;YAEL,MAAM,OAAO,GAAG,EAAwB,CAAC;YAEzC,MAAM,CAAC,IAAA,0CAAkB,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CAAC;iBAClE,qBAAqB,CAAC;;;;;;;;;;;CAW9B,CAAC,CAAC;YAEG,qBAAqB;YACrB,UAAU,CAAC,WAAW,EAAE,CAAC;QAC3B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../../../../options/options';
|
|
2
|
-
import { Commit } from '../../../sourceCommit/
|
|
1
|
+
import type { ValidConfigOptions } from '../../../../options/options';
|
|
2
|
+
import type { Commit } from '../../../sourceCommit/parse-source-commit';
|
|
3
3
|
export declare function getTitle({ options, commits, targetBranch, }: {
|
|
4
4
|
options: ValidConfigOptions;
|
|
5
5
|
commits: Commit[];
|
|
@@ -3,15 +3,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTitle =
|
|
6
|
+
exports.getTitle = getTitle;
|
|
7
7
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
8
|
-
const
|
|
8
|
+
const get_source_branch_from_commits_1 = require("../../../get-source-branch-from-commits");
|
|
9
9
|
const logger_1 = require("../../../logger");
|
|
10
|
-
const
|
|
10
|
+
const commit_formatters_1 = require("../../commit-formatters");
|
|
11
11
|
function getTitle({ options, commits, targetBranch, }) {
|
|
12
|
-
const sourceBranch = (0,
|
|
12
|
+
const sourceBranch = (0, get_source_branch_from_commits_1.getSourceBranchFromCommits)(commits);
|
|
13
13
|
const commitMessages = commits
|
|
14
|
-
.map((c) => (0,
|
|
14
|
+
.map((c) => (0, commit_formatters_1.getFirstLine)(c.sourceCommit.message))
|
|
15
15
|
.join(' | ');
|
|
16
16
|
const defaultPrTitle = '[{{targetBranch}}] {{commitMessages}}';
|
|
17
17
|
const prTitle = (options.prTitle ?? defaultPrTitle)
|
|
@@ -30,5 +30,4 @@ function getTitle({ options, commits, targetBranch, }) {
|
|
|
30
30
|
return prTitle.replaceAll('{{{{raw}}}}', '').replaceAll('{{{{/raw}}}}', '');
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=getTitle.js.map
|
|
33
|
+
//# sourceMappingURL=get-title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-title.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v3/getPullRequest/get-title.ts"],"names":[],"mappings":";;;;;AAOA,4BAkCC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6
6
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
7
|
-
const
|
|
7
|
+
const get_title_1 = require("./get-title");
|
|
8
8
|
describe('getTitle', () => {
|
|
9
9
|
const commits = [
|
|
10
10
|
{
|
|
@@ -34,25 +34,25 @@ describe('getTitle', () => {
|
|
|
34
34
|
];
|
|
35
35
|
it('has the default title', () => {
|
|
36
36
|
const options = {};
|
|
37
|
-
expect((0,
|
|
37
|
+
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My commit message (#55) | Another commit message (#56)');
|
|
38
38
|
});
|
|
39
39
|
it('renders title with the original PR title', () => {
|
|
40
40
|
const options = {
|
|
41
41
|
prTitle: '[{{targetBranch}}] {{sourcePullRequest.title}}',
|
|
42
42
|
};
|
|
43
|
-
expect((0,
|
|
43
|
+
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My PR Title');
|
|
44
44
|
});
|
|
45
45
|
it('renders title using a specific commit', () => {
|
|
46
46
|
const options = {
|
|
47
47
|
prTitle: '[{{targetBranch}}] {{commits.0.sourcePullRequest.title}}',
|
|
48
48
|
};
|
|
49
|
-
expect((0,
|
|
49
|
+
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My PR Title');
|
|
50
50
|
});
|
|
51
51
|
it('renders title using {{commitMessages}}', () => {
|
|
52
52
|
const options = {
|
|
53
53
|
prTitle: 'Branch: "{{targetBranch}}". Messages: {{commitMessages}}',
|
|
54
54
|
};
|
|
55
|
-
expect((0,
|
|
55
|
+
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('Branch: "7.x". Messages: My commit message (#55) | Another commit message (#56)');
|
|
56
56
|
});
|
|
57
57
|
it('support backticks', () => {
|
|
58
58
|
const options = {
|
|
@@ -72,7 +72,7 @@ describe('getTitle', () => {
|
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
74
|
];
|
|
75
|
-
expect((0,
|
|
75
|
+
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My commit message with `backticks` (#55)');
|
|
76
76
|
});
|
|
77
77
|
it('does not break on curly brackets', () => {
|
|
78
78
|
const options = {
|
|
@@ -92,7 +92,7 @@ describe('getTitle', () => {
|
|
|
92
92
|
},
|
|
93
93
|
},
|
|
94
94
|
];
|
|
95
|
-
expect(() => (0,
|
|
95
|
+
expect(() => (0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).not.toThrow();
|
|
96
96
|
});
|
|
97
97
|
it('should return default description if handlebars compilation fails', () => {
|
|
98
98
|
const compileError = new Error('Simulated compile error');
|
|
@@ -103,9 +103,9 @@ describe('getTitle', () => {
|
|
|
103
103
|
throw compileError;
|
|
104
104
|
});
|
|
105
105
|
const options = {};
|
|
106
|
-
expect((0,
|
|
106
|
+
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toMatchInlineSnapshot(`"[7.x] My commit message (#55) | Another commit message (#56)"`);
|
|
107
107
|
// Restore the stubs.
|
|
108
108
|
compileSpy.mockRestore();
|
|
109
109
|
});
|
|
110
110
|
});
|
|
111
|
-
//# sourceMappingURL=
|
|
111
|
+
//# sourceMappingURL=get-title.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-title.test.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v3/getPullRequest/get-title.test.ts"],"names":[],"mappings":";;;;;AAAA,4DAAoC;AAGpC,2CAAuC;AAEvC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;IACxB,MAAM,OAAO,GAAG;QACd;YACE,YAAY,EAAE,MAAM;YACpB,iBAAiB,EAAE;gBACjB,KAAK,EAAE,aAAa;gBACpB,MAAM,EAAE,EAAE;gBACV,GAAG,EAAE,oEAAoE;aAC1E;YACD,YAAY,EAAE;gBACZ,GAAG,EAAE,WAAW;gBAChB,OAAO,EAAE,yBAAyB;aACnC;SACF;QACD;YACE,iBAAi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QAE1D,6CAA6C;QAC7C,MAAM,UAAU,GAAG,IAAI;aACpB,KAAK,CAAC,oBAAU,EAAE,SAAS,CAAC;aAC5B,kBAAkB,CAAC,GAAG,EAAE;YACvB,MAAM,YAAY,CAAC;QACrB,CAAC,CAAC,CAAC;QAEL,MAAM,OAAO,GAAG,EAAwB,CAAC;QAEzC,MAAM,CACJ,IAAA,oBAAQ,EAAC,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,CACpD,CAAC,qBAAqB,CACrB,gEAAgE,CACjE,CAAC;QAEF,qBAAqB;QACrB,UAAU,CAAC,WAAW,EAAE,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../../../options/options';
|
|
1
|
+
import type { ValidConfigOptions } from '../../../options/options';
|
|
2
2
|
export declare function mergePullRequest(options: ValidConfigOptions, pullNumber: number): Promise<import("@octokit/types").OctokitResponse<{
|
|
3
3
|
sha: string;
|
|
4
4
|
merged: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mergePullRequest =
|
|
3
|
+
exports.mergePullRequest = mergePullRequest;
|
|
4
4
|
const rest_1 = require("@octokit/rest");
|
|
5
5
|
const logger_1 = require("../../logger");
|
|
6
6
|
function mergePullRequest(options, pullNumber) {
|
|
@@ -16,5 +16,4 @@ function mergePullRequest(options, pullNumber) {
|
|
|
16
16
|
pull_number: pullNumber,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=mergePullRequest.js.map
|
|
19
|
+
//# sourceMappingURL=merge-pull-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-pull-request.js","sourceRoot":"","sources":["../../../../../src/lib/github/v3/merge-pull-request.ts"],"names":[],"mappings":";;AAIA,4CAmBC;AAvBD,wCAAwC;AAExC,yCAAsC;AAEtC,SAAgB,gBAAgB,CAC9B,OAA2B,EAC3B,UAAkB;IAElB,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC;IACpD,MAAM,OAAO,GAAG,IAAI,cAAO,CAAC;QAC1B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,kBAAkB;QAC3B,GAAG,EAAE,eAAM;KACZ,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,OAAO,CACpB,qDAAqD,EACrD;QACE,KAAK,EAAE,OAAO,CAAC,SAAS;QACxB,IAAI,EAAE,OAAO,CAAC,QAAQ;QACtB,WAAW,EAAE,UAAU;KACxB,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { GraphQLError } from '@0no-co/graphql.web';
|
|
2
|
-
import {
|
|
1
|
+
import type { GraphQLError } from '@0no-co/graphql.web';
|
|
2
|
+
import type { OperationResult } from '@urql/core';
|
|
3
|
+
import { Client } from '@urql/core';
|
|
3
4
|
import type { ValidConfigOptions } from '../../../../options/options';
|
|
4
5
|
export interface GitHubGraphQLError extends GraphQLError {
|
|
5
6
|
type?: 'FORBIDDEN';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GithubV4Exception =
|
|
3
|
+
exports.GithubV4Exception = void 0;
|
|
4
|
+
exports.getGraphQLClient = getGraphQLClient;
|
|
4
5
|
const core_1 = require("@urql/core");
|
|
5
|
-
const
|
|
6
|
+
const response_meta_interceptor_exchange_1 = require("./response-meta-interceptor-exchange");
|
|
6
7
|
function getGraphQLClient({ githubApiBaseUrlV4 = 'https://api.github.com/graphql', accessToken, }) {
|
|
7
8
|
return new core_1.Client({
|
|
8
9
|
url: githubApiBaseUrlV4,
|
|
9
|
-
exchanges: [
|
|
10
|
+
exchanges: [response_meta_interceptor_exchange_1.responseMetaInterceptorExchange, core_1.fetchExchange],
|
|
10
11
|
fetchOptions: () => {
|
|
11
12
|
return {
|
|
12
13
|
'Content-Type': 'application/json',
|
|
@@ -15,7 +16,6 @@ function getGraphQLClient({ githubApiBaseUrlV4 = 'https://api.github.com/graphql
|
|
|
15
16
|
},
|
|
16
17
|
});
|
|
17
18
|
}
|
|
18
|
-
exports.getGraphQLClient = getGraphQLClient;
|
|
19
19
|
class GithubV4Exception extends Error {
|
|
20
20
|
constructor(result) {
|
|
21
21
|
const message = `${result.error?.message} (Github API v4)`;
|
|
@@ -26,4 +26,4 @@ class GithubV4Exception extends Error {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
exports.GithubV4Exception = GithubV4Exception;
|
|
29
|
-
//# sourceMappingURL=
|
|
29
|
+
//# sourceMappingURL=graphql-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-client.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v4/client/graphql-client.ts"],"names":[],"mappings":";;;AAsBA,4CAcC;AAlCD,qCAAmD;AAEnD,6FAAuF;AAkBvF,SAAgB,gBAAgB,CAAC,EAC/B,kBAAkB,GAAG,gCAAgC,EACrD,WAAW,GACoD;IAC/D,OAAO,IAAI,aAAM,CAAC;QAChB,GAAG,EAAE,kBAAkB;QACvB,SAAS,EAAE,CAAC,oEAA+B,EAAE,oBAAa,CAAC;QAC3D,YAAY,EAAE,GAAG,EAAE;YACjB,OAAO;gBACL,cAAc,EAAE,kBAAkB;gBAClC,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,WAAW,EAAE,EAAE;aACpD,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,MAAa,iBAAqB,SAAQ,KAAK;IAC7C,YAAmB,MAAkC;QACnD,MAAM,OAAO,GAAG,GAAG,MAAM,CAAC,KAAK,EAAE,OAAO,kBAAkB,CAAC;QAE3D,KAAK,CAAC,OAAO,CAAC,CAAC;QAHE,WAAM,GAAN,MAAM,CAA4B;QAInD,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF;AARD,8CAQC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const generated_1 = require("../../../../graphql/generated");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const get_dev_access_token_1 = require("../../../../test/private/get-dev-access-token");
|
|
5
|
+
const graphql_client_1 = require("./graphql-client");
|
|
6
6
|
const getViewerQuery = (0, generated_1.graphql)(`
|
|
7
7
|
query GetViewer {
|
|
8
8
|
viewer {
|
|
@@ -21,7 +21,7 @@ describe('graphqlClient', () => {
|
|
|
21
21
|
let result;
|
|
22
22
|
describe('when the access token is invalid', () => {
|
|
23
23
|
beforeAll(async () => {
|
|
24
|
-
const client = (0,
|
|
24
|
+
const client = (0, graphql_client_1.getGraphQLClient)({
|
|
25
25
|
accessToken: 'foobar',
|
|
26
26
|
githubApiBaseUrlV4: 'https://api.github.com/graphql',
|
|
27
27
|
});
|
|
@@ -38,9 +38,9 @@ describe('graphqlClient', () => {
|
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
describe('when the access token is valid', () => {
|
|
41
|
-
const accessToken = (0,
|
|
41
|
+
const accessToken = (0, get_dev_access_token_1.getDevAccessToken)();
|
|
42
42
|
beforeAll(async () => {
|
|
43
|
-
const client = (0,
|
|
43
|
+
const client = (0, graphql_client_1.getGraphQLClient)({
|
|
44
44
|
accessToken: accessToken,
|
|
45
45
|
githubApiBaseUrlV4: 'https://api.github.com/graphql',
|
|
46
46
|
});
|
|
@@ -54,9 +54,9 @@ describe('graphqlClient', () => {
|
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
describe('when repo is not found', () => {
|
|
57
|
-
const accessToken = (0,
|
|
57
|
+
const accessToken = (0, get_dev_access_token_1.getDevAccessToken)();
|
|
58
58
|
beforeAll(async () => {
|
|
59
|
-
const client = (0,
|
|
59
|
+
const client = (0, graphql_client_1.getGraphQLClient)({
|
|
60
60
|
accessToken: accessToken,
|
|
61
61
|
githubApiBaseUrlV4: 'https://api.github.com/graphql',
|
|
62
62
|
});
|
|
@@ -90,4 +90,4 @@ describe('graphqlClient', () => {
|
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
});
|
|
93
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=graphql-client.private.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-client.private.test.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v4/client/graphql-client.private.test.ts"],"names":[],"mappings":";;AAAA,6DAAwD;AACxD,wFAAkF;AAKlF,qDAAoD;AAEpD,MAAM,cAAc,GAAG,IAAA,mBAAO,EAAC;;;;;;CAM9B,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,IAAA,mBAAO,EAAC;;;;;;CAM5B,CAAC,CAAC;AAEH,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,IAAI,MAA+B,CAAC;IAEpC,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAChD,SAAS,CAAC,KAAK,IAAI,EAAE;YACnB,MAAM,MAAM,GAAG,IAAA,iCAAgB,EAAC;gBAC9B,WAAW,EAAE,QAAQ;gBACrB,kBAAkB,EAAE,gCAAgC;aACrD,CAAC,CAAC;YACH,MAAM,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;QAClD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;YACpC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACtC,CAAC,CAA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;YAC/C,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Exchange } from '@urql/core';
|
|
1
|
+
import type { Exchange } from '@urql/core';
|
|
2
2
|
export declare const loggingExchange: Exchange;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging-exchange.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v4/client/logging-exchange.ts"],"names":[],"mappings":";;;AACA,sDAAiD;AACjD,iCAAkC;AAClC,4CAAyC;AAElC,MAAM,eAAe,GAC1B,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAChB,CAAC,IAAI,EAAE,EAAE;IACP,OAAO,IAAA,YAAI,EACT,IAAI,EACJ,IAAA,WAAG,EAAC,CAAC,SAAoB,EAAE,EAAE;QAC3B,eAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAA,eAAK,EAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACjD,eAAM,CAAC,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC,CAAC,EACF,OAAO,EACP,IAAA,WAAG,EAAC,CAAC,MAAuB,EAAE,EAAE;QAC9B,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACjB,eAAM,CAAC,KAAK,CAAC,gBAAgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,eAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC;AAlBS,QAAA,eAAe,mBAkBxB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Exchange } from '@urql/core';
|
|
1
|
+
import type { Exchange } from '@urql/core';
|
|
2
2
|
export declare const responseMetaInterceptorExchange: Exchange;
|
|
@@ -9,7 +9,7 @@ const responseMetaInterceptorExchange = ({ client, forward, }) => {
|
|
|
9
9
|
return (operations$) => {
|
|
10
10
|
// 1. Modify outgoing operations to use a wrapped fetch
|
|
11
11
|
const operationsWithWrappedFetch$ = (0, wonka_1.pipe)(operations$, (0, wonka_1.map)((operation) => {
|
|
12
|
-
const originalFetch = operation.context.fetch
|
|
12
|
+
const originalFetch = operation.context.fetch ?? client.fetch ?? fetch;
|
|
13
13
|
const newContext = {
|
|
14
14
|
...operation.context,
|
|
15
15
|
fetch: async (input, init) => {
|
|
@@ -42,4 +42,4 @@ const responseMetaInterceptorExchange = ({ client, forward, }) => {
|
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
44
|
exports.responseMetaInterceptorExchange = responseMetaInterceptorExchange;
|
|
45
|
-
//# sourceMappingURL=
|
|
45
|
+
//# sourceMappingURL=response-meta-interceptor-exchange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-meta-interceptor-exchange.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v4/client/response-meta-interceptor-exchange.ts"],"names":[],"mappings":";;;AAEA,iCAAkC;AAQlC,qDAAqD;AACrD,MAAM,0BAA0B,GAAG,IAAI,GAAG,EAA8B,CAAC;AAElE,MAAM,+BAA+B,GAAa,CAAC,EACxD,MAAM,EACN,OAAO,GACR,EAAE,EAAE;IACH,sBAAsB;IACtB,OAAO,CAAC,WAAW,EAAE,EAAE;QACrB,uDAAuD;QACvD,MAAM,2BAA2B,GAAG,IAAA,YAAI,EACtC,WAAW,EACX,IAAA,WAAG,EAAC,CAAC,SAAS,EAAE,EAAE;YAChB,MAAM,aAAa,GACjB,SAAS,CAAC,OAAO,CAAC,KAAK,IAAK,MAAc,CAAC,KAAK,IAAI,KAAK,CAAC;YAE5D,MAAM,UAA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ConfigOptions } from '../../../options/options';
|
|
1
|
+
import type { ValidConfigOptions } from '../../../options/options';
|
|
2
2
|
export declare function disablePullRequestAutoMerge(options: ValidConfigOptions, pullNumber: number): Promise<number | undefined>;
|
package/dist/src/lib/github/v4/{disablePullRequestAutoMerge.js → disable-pull-request-auto-merge.js}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.disablePullRequestAutoMerge =
|
|
3
|
+
exports.disablePullRequestAutoMerge = disablePullRequestAutoMerge;
|
|
4
4
|
const generated_1 = require("../../../graphql/generated");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const graphql_client_1 = require("./client/graphql-client");
|
|
6
|
+
const fetch_pull_request_id2_1 = require("./fetch-pull-request-id2");
|
|
7
7
|
async function disablePullRequestAutoMerge(options, pullNumber) {
|
|
8
8
|
const { accessToken, githubApiBaseUrlV4 } = options;
|
|
9
|
-
const pullRequestId = await (0,
|
|
9
|
+
const pullRequestId = await (0, fetch_pull_request_id2_1.fetchPullRequestId)(options, pullNumber);
|
|
10
10
|
const query = (0, generated_1.graphql)(`
|
|
11
11
|
mutation DisablePullRequestAutoMerge($pullRequestId: ID!) {
|
|
12
12
|
disablePullRequestAutoMerge(input: { pullRequestId: $pullRequestId }) {
|
|
@@ -16,14 +16,13 @@ async function disablePullRequestAutoMerge(options, pullNumber) {
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
`);
|
|
19
|
-
const client = (0,
|
|
19
|
+
const client = (0, graphql_client_1.getGraphQLClient)({ accessToken, githubApiBaseUrlV4 });
|
|
20
20
|
const result = await client.mutation(query, {
|
|
21
21
|
pullRequestId,
|
|
22
22
|
});
|
|
23
23
|
if (result.error) {
|
|
24
|
-
throw new
|
|
24
|
+
throw new graphql_client_1.GithubV4Exception(result);
|
|
25
25
|
}
|
|
26
26
|
return result.data?.disablePullRequestAutoMerge?.pullRequest?.number;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=disablePullRequestAutoMerge.js.map
|
|
28
|
+
//# sourceMappingURL=disable-pull-request-auto-merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disable-pull-request-auto-merge.js","sourceRoot":"","sources":["../../../../../src/lib/github/v4/disable-pull-request-auto-merge.ts"],"names":[],"mappings":";;AAKA,kEA2BC;AAhCD,0DAAqD;AAErD,4DAA8E;AAC9E,qEAA8D;AAEvD,KAAK,UAAU,2BAA2B,CAC/C,OAA2B,EAC3B,UAAkB;IAElB,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC;IACpD,MAAM,aAAa,GAAG,MAAM,IAAA,2CAAkB,EAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAEpE,MAAM,KAAK,GAAG,IAAA,mBAAO,EAAC;;;;;;;;GAQrB,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAA,iCAAgB,EAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE;QAC1C,aAAa;KACd,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,MAAM,IAAI,kCAAiB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,EAAE,2BAA2B,EAAE,WAAW,EAAE,MAAM,CAAC;AACvE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidConfigOptions } from '../../../options/options';
|
|
2
|
-
import { GithubV4Exception } from './client/
|
|
1
|
+
import type { ValidConfigOptions } from '../../../options/options';
|
|
2
|
+
import { GithubV4Exception } from './client/graphql-client';
|
|
3
3
|
export declare function enablePullRequestAutoMerge(options: ValidConfigOptions, targetPullRequestNumber: number): Promise<number | undefined>;
|
|
4
4
|
export declare function isMissingStatusChecksError(e: GithubV4Exception<unknown>): boolean | undefined;
|
package/dist/src/lib/github/v4/{enablePullRequestAutoMerge.js → enable-pull-request-auto-merge.js}
RENAMED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.enablePullRequestAutoMerge = enablePullRequestAutoMerge;
|
|
4
|
+
exports.isMissingStatusChecksError = isMissingStatusChecksError;
|
|
4
5
|
const generated_1 = require("../../../graphql/generated");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
6
|
+
const graphql_client_1 = require("./client/graphql-client");
|
|
7
|
+
const fetch_pull_request_id2_1 = require("./fetch-pull-request-id2");
|
|
7
8
|
async function enablePullRequestAutoMerge(options, targetPullRequestNumber) {
|
|
8
9
|
const { accessToken, githubApiBaseUrlV4, autoMergeMethod = 'merge', } = options;
|
|
9
|
-
const pullRequestId = await (0,
|
|
10
|
+
const pullRequestId = await (0, fetch_pull_request_id2_1.fetchPullRequestId)(options, targetPullRequestNumber);
|
|
10
11
|
const query = (0, generated_1.graphql)(`
|
|
11
12
|
mutation EnablePullRequestAutoMerge(
|
|
12
13
|
$pullRequestId: ID!
|
|
@@ -25,18 +26,16 @@ async function enablePullRequestAutoMerge(options, targetPullRequestNumber) {
|
|
|
25
26
|
pullRequestId,
|
|
26
27
|
mergeMethod: autoMergeMethod.toUpperCase(),
|
|
27
28
|
};
|
|
28
|
-
const client = (0,
|
|
29
|
+
const client = (0, graphql_client_1.getGraphQLClient)({ accessToken, githubApiBaseUrlV4 });
|
|
29
30
|
const result = await client.mutation(query, variables);
|
|
30
31
|
if (result.error) {
|
|
31
|
-
throw new
|
|
32
|
+
throw new graphql_client_1.GithubV4Exception(result);
|
|
32
33
|
}
|
|
33
34
|
return result.data?.enablePullRequestAutoMerge?.pullRequest?.number;
|
|
34
35
|
}
|
|
35
|
-
exports.enablePullRequestAutoMerge = enablePullRequestAutoMerge;
|
|
36
36
|
function isMissingStatusChecksError(e) {
|
|
37
37
|
return e.result.error?.graphQLErrors.some((e) => e.extensions.type === 'UNPROCESSABLE' &&
|
|
38
38
|
(e.message.includes('Branch does not have required protected branch rules') ||
|
|
39
39
|
e.message.includes('Pull request is in clean status')));
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
//# sourceMappingURL=enablePullRequestAutoMerge.js.map
|
|
41
|
+
//# sourceMappingURL=enable-pull-request-auto-merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-pull-request-auto-merge.js","sourceRoot":"","sources":["../../../../../src/lib/github/v4/enable-pull-request-auto-merge.ts"],"names":[],"mappings":";;AAKA,gEA2CC;AAED,gEASC;AA3DD,0DAAqD;AAErD,4DAA8E;AAC9E,qEAA8D;AAEvD,KAAK,UAAU,0BAA0B,CAC9C,OAA2B,EAC3B,uBAA+B;IAE/B,MAAM,EACJ,WAAW,EACX,kBAAkB,EAClB,eAAe,GAAG,OAAO,GAC1B,GAAG,OAAO,CAAC;IAEZ,MAAM,aAAa,GAAG,MAAM,IAAA,2CAAkB,EAC5C,OAAO,EACP,uBAAuB,CACxB,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,mBAAO,EAAC;;;;;;;;;;;;;GAarB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG;QAChB,aAAa;QACb,WAAW,EAAE,eAAe,CAAC,WAAW,EAAS;KAClD,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,iCAAgB,EAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAEvD,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,MAAM,IAAI,kCAAiB,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,EAAE,0BA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