backport 10.2.0 → 11.0.0-beta.0
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/bin/backport +1 -1
- package/dist/src/backport-run.d.ts +5 -22
- package/dist/src/backport-run.js +76 -130
- package/dist/src/backport-run.js.map +1 -1
- package/dist/src/entrypoint.api.d.ts +18 -22
- package/dist/src/entrypoint.api.js +55 -88
- package/dist/src/entrypoint.api.js.map +1 -1
- package/dist/src/entrypoint.cli.d.ts +1 -1
- package/dist/src/entrypoint.cli.js +17 -13
- package/dist/src/entrypoint.cli.js.map +1 -1
- package/dist/src/graphql/generated/gql.d.ts +1 -1
- package/dist/src/graphql/generated/gql.js +4 -38
- package/dist/src/graphql/generated/gql.js.map +1 -1
- package/dist/src/graphql/generated/graphql.d.ts +2000 -1619
- package/dist/src/graphql/generated/graphql.js +659 -581
- package/dist/src/graphql/generated/graphql.js.map +1 -1
- package/dist/src/graphql/generated/index.d.ts +1 -1
- package/dist/src/graphql/generated/index.js +1 -17
- package/dist/src/graphql/generated/index.js.map +1 -1
- package/dist/src/lib/author.d.ts +2 -2
- package/dist/src/lib/author.js +1 -4
- package/dist/src/lib/author.js.map +1 -1
- package/dist/src/lib/backport-error.d.ts +53 -7
- package/dist/src/lib/backport-error.js +39 -15
- package/dist/src/lib/backport-error.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/auto-merge-now-or-later.d.ts +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/auto-merge-now-or-later.js +19 -23
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/auto-merge-now-or-later.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.d.ts +2 -3
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.js +60 -57
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/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 +7 -10
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/copy-source-pull-request-reviewers-to-target-pull-request.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.d.ts +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.js +6 -12
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.d.ts +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.js +10 -16
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-merge-commit.d.ts +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-merge-commit.js +6 -9
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-merge-commit.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-configured-target-pr-labels.d.ts +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-configured-target-pr-labels.js +7 -10
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-configured-target-pr-labels.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-source-pr-labels-to-copy.d.ts +2 -2
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-source-pr-labels-to-copy.js +3 -6
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-source-pr-labels-to-copy.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-target-prlabels.d.ts +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-target-prlabels.js +7 -10
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-target-prlabels.js.map +1 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/list-conflicting-and-unstaged-files.d.ts +7 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/list-conflicting-and-unstaged-files.js +44 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/list-conflicting-and-unstaged-files.js.map +1 -0
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/wait-for-cherrypick.d.ts +6 -4
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/wait-for-cherrypick.js +63 -86
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/wait-for-cherrypick.js.map +1 -1
- package/dist/src/lib/child-process-promisified.d.ts +1 -1
- package/dist/src/lib/child-process-promisified.js +27 -48
- package/dist/src/lib/child-process-promisified.js.map +1 -1
- package/dist/src/lib/env.d.ts +3 -3
- package/dist/src/lib/env.js +12 -21
- package/dist/src/lib/env.js.map +1 -1
- package/dist/src/lib/get-commits.d.ts +2 -2
- package/dist/src/lib/get-commits.js +30 -32
- package/dist/src/lib/get-commits.js.map +1 -1
- package/dist/src/lib/get-source-branch-from-commits.d.ts +1 -1
- package/dist/src/lib/get-source-branch-from-commits.js +6 -6
- package/dist/src/lib/get-source-branch-from-commits.js.map +1 -1
- package/dist/src/lib/get-target-branches.d.ts +3 -3
- package/dist/src/lib/get-target-branches.js +20 -20
- package/dist/src/lib/get-target-branches.js.map +1 -1
- package/dist/src/lib/git/branch.d.ts +12 -0
- package/dist/src/lib/git/branch.js +83 -0
- package/dist/src/lib/git/branch.js.map +1 -0
- package/dist/src/lib/git/cherrypick.d.ts +27 -0
- package/dist/src/lib/git/cherrypick.js +106 -0
- package/dist/src/lib/git/cherrypick.js.map +1 -0
- package/dist/src/lib/git/clone.d.ts +4 -0
- package/dist/src/lib/git/clone.js +47 -0
- package/dist/src/lib/git/clone.js.map +1 -0
- package/dist/src/lib/git/commit.d.ts +19 -0
- package/dist/src/lib/git/commit.js +86 -0
- package/dist/src/lib/git/commit.js.map +1 -0
- package/dist/src/lib/git/config-file-status.d.ts +9 -0
- package/dist/src/lib/git/config-file-status.js +37 -0
- package/dist/src/lib/git/config-file-status.js.map +1 -0
- package/dist/src/lib/git/diff.d.ts +12 -0
- package/dist/src/lib/git/diff.js +73 -0
- package/dist/src/lib/git/diff.js.map +1 -0
- package/dist/src/lib/git/index.d.ts +8 -0
- package/dist/src/lib/git/index.js +9 -0
- package/dist/src/lib/git/index.js.map +1 -0
- package/dist/src/lib/git/push.d.ts +10 -0
- package/dist/src/lib/git/push.js +36 -0
- package/dist/src/lib/git/push.js.map +1 -0
- package/dist/src/lib/git/remote.d.ts +13 -0
- package/dist/src/lib/git/remote.js +85 -0
- package/dist/src/lib/git/remote.js.map +1 -0
- package/dist/src/lib/github/commit-formatters.js +4 -9
- package/dist/src/lib/github/commit-formatters.js.map +1 -1
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.js +11 -26
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.js.map +1 -1
- package/dist/src/lib/github/v3/add-labels-to-pull-request.js +11 -26
- package/dist/src/lib/github/v3/add-labels-to-pull-request.js.map +1 -1
- package/dist/src/lib/github/v3/add-reviewers-to-pull-request.d.ts +10 -2
- package/dist/src/lib/github/v3/add-reviewers-to-pull-request.js +12 -32
- package/dist/src/lib/github/v3/add-reviewers-to-pull-request.js.map +1 -1
- package/dist/src/lib/github/v3/{getPullRequest → create-pull-request}/create-pull-request.d.ts +1 -2
- package/dist/src/lib/github/v3/create-pull-request/create-pull-request.js +57 -0
- package/dist/src/lib/github/v3/create-pull-request/create-pull-request.js.map +1 -0
- package/dist/src/lib/github/v3/{getPullRequest → create-pull-request}/get-pull-request-body.d.ts +5 -3
- package/dist/src/lib/github/v3/create-pull-request/get-pull-request-body.js +72 -0
- package/dist/src/lib/github/v3/create-pull-request/get-pull-request-body.js.map +1 -0
- package/dist/src/lib/github/v3/{getPullRequest → create-pull-request}/get-title.d.ts +2 -2
- package/dist/src/lib/github/v3/create-pull-request/get-title.js +27 -0
- package/dist/src/lib/github/v3/create-pull-request/get-title.js.map +1 -0
- package/dist/src/lib/github/v3/create-status-comment.d.ts +2 -2
- package/dist/src/lib/github/v3/create-status-comment.js +54 -84
- package/dist/src/lib/github/v3/create-status-comment.js.map +1 -1
- package/dist/src/lib/github/v3/get-github-v3-error-message.d.ts +2 -14
- package/dist/src/lib/github/v3/get-github-v3-error-message.js +4 -6
- package/dist/src/lib/github/v3/get-github-v3-error-message.js.map +1 -1
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.js +14 -21
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.js.map +1 -1
- package/dist/src/lib/github/v3/index.d.ts +13 -0
- package/dist/src/lib/github/v3/index.js +13 -0
- package/dist/src/lib/github/v3/index.js.map +1 -0
- package/dist/src/lib/github/v3/merge-pull-request.d.ts +1 -1
- package/dist/src/lib/github/v3/merge-pull-request.js +5 -13
- package/dist/src/lib/github/v3/merge-pull-request.js.map +1 -1
- package/dist/src/lib/github/v3/octokit-client.d.ts +10 -0
- package/dist/src/lib/github/v3/octokit-client.js +30 -0
- package/dist/src/lib/github/v3/octokit-client.js.map +1 -0
- package/dist/src/lib/github/v4/client/graphql-client.d.ts +17 -12
- package/dist/src/lib/github/v4/client/graphql-client.js +69 -23
- package/dist/src/lib/github/v4/client/graphql-client.js.map +1 -1
- package/dist/src/lib/github/v4/disable-pull-request-auto-merge.d.ts +1 -1
- package/dist/src/lib/github/v4/disable-pull-request-auto-merge.js +12 -12
- package/dist/src/lib/github/v4/disable-pull-request-auto-merge.js.map +1 -1
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.d.ts +1 -3
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.js +27 -16
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.js.map +1 -1
- package/dist/src/lib/github/v4/fetch-author-id.js +10 -10
- package/dist/src/lib/github/v4/fetch-author-id.js.map +1 -1
- package/dist/src/lib/github/v4/fetch-existing-pull-request.d.ts +2 -2
- package/dist/src/lib/github/v4/fetch-existing-pull-request.js +12 -12
- package/dist/src/lib/github/v4/fetch-existing-pull-request.js.map +1 -1
- package/dist/src/lib/github/v4/fetch-pull-request-auto-merge-method.d.ts +2 -2
- package/dist/src/lib/github/v4/fetch-pull-request-auto-merge-method.js +10 -10
- package/dist/src/lib/github/v4/fetch-pull-request-auto-merge-method.js.map +1 -1
- package/dist/src/lib/github/v4/{fetch-pull-request-id2.d.ts → fetch-pull-request-id.d.ts} +1 -1
- package/dist/src/lib/github/v4/fetch-pull-request-id.js +36 -0
- package/dist/src/lib/github/v4/fetch-pull-request-id.js.map +1 -0
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.d.ts +2 -2
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.js +26 -21
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.js.map +1 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.d.ts +2 -2
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.js +19 -16
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.js.map +1 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.d.ts +2 -2
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.js +41 -33
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.js.map +1 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.d.ts +1 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.js +16 -16
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.js.map +1 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-requests-by-search-query.d.ts +1 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-requests-by-search-query.js +24 -22
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-requests-by-search-query.js.map +1 -1
- package/dist/src/lib/github/v4/get-invalid-access-token-message.d.ts +1 -1
- package/dist/src/lib/github/v4/get-invalid-access-token-message.js +18 -17
- package/dist/src/lib/github/v4/get-invalid-access-token-message.js.map +1 -1
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.js +18 -19
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.js.map +1 -1
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.d.ts +4 -8
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.js +48 -42
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.js.map +1 -1
- package/dist/src/lib/github/v4/index.d.ts +20 -0
- package/dist/src/lib/github/v4/index.js +23 -0
- package/dist/src/lib/github/v4/index.js.map +1 -0
- package/dist/src/lib/github/v4/mocks/commits-by-author-mock.d.ts +1 -1
- package/dist/src/lib/github/v4/mocks/commits-by-author-mock.js +3 -6
- package/dist/src/lib/github/v4/mocks/commits-by-author-mock.js.map +1 -1
- package/dist/src/lib/github/v4/validate-target-branch.js +13 -14
- package/dist/src/lib/github/v4/validate-target-branch.js.map +1 -1
- package/dist/src/lib/logger.js +15 -56
- package/dist/src/lib/logger.js.map +1 -1
- package/dist/src/lib/ora.d.ts +4 -4
- package/dist/src/lib/ora.js +5 -12
- package/dist/src/lib/ora.js.map +1 -1
- package/dist/src/lib/prompts.d.ts +2 -2
- package/dist/src/lib/prompts.js +56 -59
- package/dist/src/lib/prompts.js.map +1 -1
- package/dist/src/lib/register-handlebars-helpers.js +5 -11
- package/dist/src/lib/register-handlebars-helpers.js.map +1 -1
- package/dist/src/lib/remote-config.d.ts +6 -3
- package/dist/src/lib/remote-config.js +14 -14
- package/dist/src/lib/remote-config.js.map +1 -1
- package/dist/src/lib/run-sequentially.d.ts +11 -14
- package/dist/src/lib/run-sequentially.js +27 -52
- package/dist/src/lib/run-sequentially.js.map +1 -1
- package/dist/src/lib/sequential-helper.d.ts +2 -0
- package/dist/src/lib/sequential-helper.js +9 -0
- package/dist/src/lib/sequential-helper.js.map +1 -0
- package/dist/src/lib/setup-repo.d.ts +1 -1
- package/dist/src/lib/setup-repo.js +31 -37
- package/dist/src/lib/setup-repo.js.map +1 -1
- package/dist/src/lib/sourceCommit/get-mock-source-commit.d.ts +1 -1
- package/dist/src/lib/sourceCommit/get-mock-source-commit.js +2 -5
- package/dist/src/lib/sourceCommit/get-mock-source-commit.js.map +1 -1
- package/dist/src/lib/sourceCommit/get-pull-request-states.d.ts +2 -2
- package/dist/src/lib/sourceCommit/get-pull-request-states.js +18 -22
- package/dist/src/lib/sourceCommit/get-pull-request-states.js.map +1 -1
- package/dist/src/lib/sourceCommit/get-source-pull-request.d.ts +22 -2
- package/dist/src/lib/sourceCommit/get-source-pull-request.js +2 -5
- package/dist/src/lib/sourceCommit/get-source-pull-request.js.map +1 -1
- package/dist/src/lib/sourceCommit/is-pull-request-cross-referenced-event.d.ts +1 -1
- package/dist/src/lib/sourceCommit/is-pull-request-cross-referenced-event.js +1 -4
- package/dist/src/lib/sourceCommit/is-pull-request-cross-referenced-event.js.map +1 -1
- package/dist/src/lib/sourceCommit/parse-source-commit.d.ts +3 -3
- package/dist/src/lib/sourceCommit/parse-source-commit.js +17 -21
- package/dist/src/lib/sourceCommit/parse-source-commit.js.map +1 -1
- package/dist/src/options/cli-args.d.ts +19 -19
- package/dist/src/options/cli-args.js +29 -25
- package/dist/src/options/cli-args.js.map +1 -1
- package/dist/src/options/config/config.d.ts +6 -10
- package/dist/src/options/config/config.js +5 -8
- package/dist/src/options/config/config.js.map +1 -1
- package/dist/src/options/config/global-config.d.ts +1 -1
- package/dist/src/options/config/global-config.js +22 -28
- package/dist/src/options/config/global-config.js.map +1 -1
- package/dist/src/options/config/project-config.d.ts +1 -1
- package/dist/src/options/config/project-config.js +7 -13
- package/dist/src/options/config/project-config.js.map +1 -1
- package/dist/src/options/config/read-config-file.d.ts +1 -1
- package/dist/src/options/config/read-config-file.js +16 -20
- package/dist/src/options/config/read-config-file.js.map +1 -1
- package/dist/src/options/config-options.d.ts +3 -1
- package/dist/src/options/config-options.js +1 -2
- package/dist/src/options/option-schema.d.ts +189 -0
- package/dist/src/options/option-schema.js +123 -0
- package/dist/src/options/option-schema.js.map +1 -0
- package/dist/src/options/options.d.ts +6 -119
- package/dist/src/options/options.js +65 -108
- package/dist/src/options/options.js.map +1 -1
- package/dist/src/scripts/postinstall.js +10 -13
- package/dist/src/scripts/postinstall.js.map +1 -1
- package/dist/src/scripts/run-postinstall.js +2 -4
- package/dist/src/scripts/run-postinstall.js.map +1 -1
- package/dist/src/types/index.d.ts +10 -0
- package/dist/src/types/index.js +6 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/utils/exclude-undefined.js +1 -4
- package/dist/src/utils/exclude-undefined.js.map +1 -1
- package/dist/src/utils/filter-empty.js +1 -4
- package/dist/src/utils/filter-empty.js.map +1 -1
- package/dist/src/utils/filter-unmerged-commits.d.ts +1 -1
- package/dist/src/utils/filter-unmerged-commits.js +1 -4
- package/dist/src/utils/filter-unmerged-commits.js.map +1 -1
- package/dist/src/utils/is-errno-error.js +1 -4
- package/dist/src/utils/is-errno-error.js.map +1 -1
- package/dist/src/utils/package-version.d.ts +1 -1
- package/dist/src/utils/package-version.js +20 -9
- package/dist/src/utils/package-version.js.map +1 -1
- package/package.json +66 -71
- package/dist/package.json +0 -125
- package/dist/src/entrypoint.module.private.test.d.ts +0 -1
- package/dist/src/entrypoint.module.private.test.js +0 -501
- package/dist/src/entrypoint.module.private.test.js.map +0 -1
- package/dist/src/lib/apm.d.ts +0 -1
- package/dist/src/lib/apm.js +0 -33
- package/dist/src/lib/apm.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.test.d.ts +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.test.js +0 -371
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/cherrypick-and-create-target-pull-request.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.test.d.ts +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.test.js +0 -74
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-backport-branch-name.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.test.d.ts +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.test.js +0 -382
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/get-commits-without-backports.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-configured-target-pr-labels.test.d.ts +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-configured-target-pr-labels.test.js +0 -126
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-configured-target-pr-labels.test.js.map +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-source-pr-labels-to-copy.test.d.ts +0 -1
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-source-pr-labels-to-copy.test.js +0 -85
- package/dist/src/lib/cherrypickAndCreateTargetPullRequest/getTargetPRLabels/get-source-pr-labels-to-copy.test.js.map +0 -1
- package/dist/src/lib/env.test.d.ts +0 -1
- package/dist/src/lib/env.test.js +0 -27
- package/dist/src/lib/env.test.js.map +0 -1
- package/dist/src/lib/get-target-branches.test.d.ts +0 -1
- package/dist/src/lib/get-target-branches.test.js +0 -263
- package/dist/src/lib/get-target-branches.test.js.map +0 -1
- package/dist/src/lib/git.d.ts +0 -89
- package/dist/src/lib/git.js +0 -537
- package/dist/src/lib/git.js.map +0 -1
- package/dist/src/lib/git.private.test.d.ts +0 -1
- package/dist/src/lib/git.private.test.js +0 -619
- package/dist/src/lib/git.private.test.js.map +0 -1
- package/dist/src/lib/git.test.d.ts +0 -1
- package/dist/src/lib/git.test.js +0 -1053
- package/dist/src/lib/git.test.js.map +0 -1
- package/dist/src/lib/github/commit-formatters.test.d.ts +0 -1
- package/dist/src/lib/github/commit-formatters.test.js +0 -12
- package/dist/src/lib/github/commit-formatters.test.js.map +0 -1
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.test.d.ts +0 -1
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.test.js +0 -31
- package/dist/src/lib/github/v3/add-assignees-to-pull-request.test.js.map +0 -1
- package/dist/src/lib/github/v3/create-status-comment.test.d.ts +0 -1
- package/dist/src/lib/github/v3/create-status-comment.test.js +0 -664
- package/dist/src/lib/github/v3/create-status-comment.test.js.map +0 -1
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.ts.private.test.d.ts +0 -1
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.ts.private.test.js +0 -34
- package/dist/src/lib/github/v3/get-reviewers-from-pull-requests.ts.private.test.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/create-pull-request.js +0 -67
- package/dist/src/lib/github/v3/getPullRequest/create-pull-request.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.js +0 -63
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.test.d.ts +0 -1
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.test.js +0 -447
- package/dist/src/lib/github/v3/getPullRequest/get-pull-request-body.test.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/get-title.js +0 -33
- package/dist/src/lib/github/v3/getPullRequest/get-title.js.map +0 -1
- package/dist/src/lib/github/v3/getPullRequest/get-title.test.d.ts +0 -1
- package/dist/src/lib/github/v3/getPullRequest/get-title.test.js +0 -111
- package/dist/src/lib/github/v3/getPullRequest/get-title.test.js.map +0 -1
- package/dist/src/lib/github/v4/client/graphql-client.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/client/graphql-client.private.test.js +0 -93
- package/dist/src/lib/github/v4/client/graphql-client.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/client/logging-exchange.d.ts +0 -2
- package/dist/src/lib/github/v4/client/logging-exchange.js +0 -21
- package/dist/src/lib/github/v4/client/logging-exchange.js.map +0 -1
- package/dist/src/lib/github/v4/client/response-meta-interceptor-exchange.d.ts +0 -2
- package/dist/src/lib/github/v4/client/response-meta-interceptor-exchange.js +0 -45
- package/dist/src/lib/github/v4/client/response-meta-interceptor-exchange.js.map +0 -1
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.mutation.test.d.ts +0 -1
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.mutation.test.js +0 -245
- package/dist/src/lib/github/v4/enable-pull-request-auto-merge.mutation.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetch-author-id.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetch-author-id.private.test.js +0 -26
- package/dist/src/lib/github/v4/fetch-author-id.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetch-existing-pull-request.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetch-existing-pull-request.private.test.js +0 -47
- package/dist/src/lib/github/v4/fetch-existing-pull-request.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetch-pull-request-id2.js +0 -33
- package/dist/src/lib/github/v4/fetch-pull-request-id2.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/all-fetchers.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/all-fetchers.private.test.js +0 -126
- package/dist/src/lib/github/v4/fetchCommits/all-fetchers.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.private.test.js +0 -110
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-pull-number.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.private.test.js +0 -76
- package/dist/src/lib/github/v4/fetchCommits/fetch-commit-by-sha.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.private.test.js +0 -179
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.test.js +0 -168
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-by-author.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.private.test.js +0 -30
- package/dist/src/lib/github/v4/fetchCommits/fetch-commits-for-rebase-and-merge-strategy.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-request-by-search-query.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-request-by-search-query.private.test.js +0 -150
- package/dist/src/lib/github/v4/fetchCommits/fetch-pull-request-by-search-query.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/get-invalid-access-token-message.test.d.ts +0 -1
- package/dist/src/lib/github/v4/get-invalid-access-token-message.test.js +0 -99
- package/dist/src/lib/github/v4/get-invalid-access-token-message.test.js.map +0 -1
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.private.test.js +0 -50
- package/dist/src/lib/github/v4/get-repo-owner-and-name-from-git-remotes.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.private.test.js +0 -119
- package/dist/src/lib/github/v4/getOptionsFromGithub/get-options-from-github.private.test.js.map +0 -1
- package/dist/src/lib/github/v4/validate-target-branch.private.test.d.ts +0 -1
- package/dist/src/lib/github/v4/validate-target-branch.private.test.js +0 -24
- package/dist/src/lib/github/v4/validate-target-branch.private.test.js.map +0 -1
- package/dist/src/lib/prompt.test.d.ts +0 -1
- package/dist/src/lib/prompt.test.js +0 -181
- package/dist/src/lib/prompt.test.js.map +0 -1
- package/dist/src/lib/sequentially.d.ts +0 -1
- package/dist/src/lib/sequentially.js +0 -11
- package/dist/src/lib/sequentially.js.map +0 -1
- package/dist/src/lib/setup-repo.test.d.ts +0 -1
- package/dist/src/lib/setup-repo.test.js +0 -283
- package/dist/src/lib/setup-repo.test.js.map +0 -1
- package/dist/src/lib/sourceCommit/get-pull-request-states.test.d.ts +0 -1
- package/dist/src/lib/sourceCommit/get-pull-request-states.test.js +0 -706
- package/dist/src/lib/sourceCommit/get-pull-request-states.test.js.map +0 -1
- package/dist/src/lib/sourceCommit/parse-source-commit.test.d.ts +0 -1
- package/dist/src/lib/sourceCommit/parse-source-commit.test.js +0 -295
- package/dist/src/lib/sourceCommit/parse-source-commit.test.js.map +0 -1
- package/dist/src/options/cli-args.test.d.ts +0 -1
- package/dist/src/options/cli-args.test.js +0 -307
- package/dist/src/options/cli-args.test.js.map +0 -1
- package/dist/src/options/config/config.test.d.ts +0 -1
- package/dist/src/options/config/config.test.js +0 -32
- package/dist/src/options/config/config.test.js.map +0 -1
- package/dist/src/options/config/global-config.test.d.ts +0 -1
- package/dist/src/options/config/global-config.test.js +0 -62
- package/dist/src/options/config/global-config.test.js.map +0 -1
- package/dist/src/options/config/project-config.test.d.ts +0 -1
- package/dist/src/options/config/project-config.test.js +0 -110
- package/dist/src/options/config/project-config.test.js.map +0 -1
- package/dist/src/options/options.test.d.ts +0 -1
- package/dist/src/options/options.test.js +0 -505
- package/dist/src/options/options.test.js.map +0 -1
- package/dist/src/scripts/binary.integration.test.d.ts +0 -1
- package/dist/src/scripts/binary.integration.test.js +0 -87
- package/dist/src/scripts/binary.integration.test.js.map +0 -1
- package/dist/src/scripts/postinstall.integration.test.d.ts +0 -1
- package/dist/src/scripts/postinstall.integration.test.js +0 -92
- package/dist/src/scripts/postinstall.integration.test.js.map +0 -1
- package/dist/src/scripts/postinstall.test.d.ts +0 -1
- package/dist/src/scripts/postinstall.test.js +0 -68
- package/dist/src/scripts/postinstall.test.js.map +0 -1
- package/dist/src/test/child-process-helper.d.ts +0 -7
- package/dist/src/test/child-process-helper.js +0 -19
- package/dist/src/test/child-process-helper.js.map +0 -1
- package/dist/src/test/e2e/cli/binary.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/binary.private.test.js +0 -53
- package/dist/src/test/e2e/cli/binary.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/commit-author.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/commit-author.private.test.js +0 -79
- package/dist/src/test/e2e/cli/commit-author.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/copy-reviewers-to-target-pull-request.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/copy-reviewers-to-target-pull-request.private.test.js +0 -63
- package/dist/src/test/e2e/cli/copy-reviewers-to-target-pull-request.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/date-filters.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/date-filters.private.test.js +0 -56
- package/dist/src/test/e2e/cli/date-filters.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/different-merge-strategies.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/different-merge-strategies.private.test.js +0 -260
- package/dist/src/test/e2e/cli/different-merge-strategies.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/entrypoint.cli.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/entrypoint.cli.private.test.js +0 -228
- package/dist/src/test/e2e/cli/entrypoint.cli.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/error-handling-interactive-mode.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/error-handling-interactive-mode.private.test.js +0 -91
- package/dist/src/test/e2e/cli/error-handling-interactive-mode.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/error-handling-non-interactive-mode.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/error-handling-non-interactive-mode.private.test.js +0 -203
- package/dist/src/test/e2e/cli/error-handling-non-interactive-mode.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.js +0 -57
- package/dist/src/test/e2e/cli/gracefully-handles-corrupt-repo.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/repo-with-backportrc-removed.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/repo-with-backportrc-removed.private.test.js +0 -51
- package/dist/src/test/e2e/cli/repo-with-backportrc-removed.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/repo-with-changing-branch-label-mapping.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/repo-with-changing-branch-label-mapping.private.test.js +0 -98
- package/dist/src/test/e2e/cli/repo-with-changing-branch-label-mapping.private.test.js.map +0 -1
- package/dist/src/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.js +0 -114
- package/dist/src/test/e2e/cli/repo-with-programatically-added-commits.mutation.test.js.map +0 -1
- package/dist/src/test/e2e/cli/run-backport-via-cli.d.ts +0 -21
- package/dist/src/test/e2e/cli/run-backport-via-cli.js +0 -104
- package/dist/src/test/e2e/cli/run-backport-via-cli.js.map +0 -1
- package/dist/src/test/e2e/cli/test-that-repo-can-be-cloned.private.test.d.ts +0 -1
- package/dist/src/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js +0 -91
- package/dist/src/test/e2e/cli/test-that-repo-can-be-cloned.private.test.js.map +0 -1
- package/dist/src/test/e2e/module/entrypoint.module.mutation.test.d.ts +0 -1
- package/dist/src/test/e2e/module/entrypoint.module.mutation.test.js +0 -378
- package/dist/src/test/e2e/module/entrypoint.module.mutation.test.js.map +0 -1
- package/dist/src/test/handle-unbackported-pull-requests.private.test.d.ts +0 -1
- package/dist/src/test/handle-unbackported-pull-requests.private.test.js +0 -71
- package/dist/src/test/handle-unbackported-pull-requests.private.test.js.map +0 -1
- package/dist/src/test/mock-config-files.d.ts +0 -5
- package/dist/src/test/mock-config-files.js +0 -21
- package/dist/src/test/mock-config-files.js.map +0 -1
- package/dist/src/test/nock-helpers.d.ts +0 -18
- package/dist/src/test/nock-helpers.js +0 -33
- package/dist/src/test/nock-helpers.js.map +0 -1
- package/dist/src/test/private/get-dev-access-token.d.ts +0 -2
- package/dist/src/test/private/get-dev-access-token.js +0 -12
- package/dist/src/test/private/get-dev-access-token.js.map +0 -1
- package/dist/src/test/replace-string-and-linebreaks.d.ts +0 -6
- package/dist/src/test/replace-string-and-linebreaks.js +0 -14
- package/dist/src/test/replace-string-and-linebreaks.js.map +0 -1
- package/dist/src/test/sandbox.d.ts +0 -6
- package/dist/src/test/sandbox.js +0 -63
- package/dist/src/test/sandbox.js.map +0 -1
- package/dist/src/test/setupFiles/automatic-mocks.d.ts +0 -1
- package/dist/src/test/setupFiles/automatic-mocks.js +0 -79
- package/dist/src/test/setupFiles/automatic-mocks.js.map +0 -1
- package/dist/src/test/setupFiles/jest-retry.d.ts +0 -0
- package/dist/src/test/setupFiles/jest-retry.js +0 -3
- package/dist/src/test/setupFiles/jest-retry.js.map +0 -1
- package/dist/src/test/setupFiles/nock-cleanup.d.ts +0 -1
- package/dist/src/test/setupFiles/nock-cleanup.js +0 -16
- package/dist/src/test/setupFiles/nock-cleanup.js.map +0 -1
- package/dist/src/utils/exclude-undefined.test.d.ts +0 -1
- package/dist/src/utils/exclude-undefined.test.js +0 -25
- package/dist/src/utils/exclude-undefined.test.js.map +0 -1
- package/dist/src/utils/maybe.d.ts +0 -1
- package/dist/src/utils/maybe.js +0 -7
- package/dist/src/utils/maybe.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,447 +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 handlebars_1 = __importDefault(require("handlebars"));
|
|
7
|
-
const get_pull_request_body_1 = require("./get-pull-request-body");
|
|
8
|
-
const commits = [
|
|
9
|
-
{
|
|
10
|
-
sourcePullRequest: {
|
|
11
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
12
|
-
},
|
|
13
|
-
sourceCommit: {
|
|
14
|
-
sha: 'acbcdef',
|
|
15
|
-
message: 'My commit message (#55)',
|
|
16
|
-
},
|
|
17
|
-
sourceBranch: 'main',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
sourcePullRequest: {
|
|
21
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/56',
|
|
22
|
-
},
|
|
23
|
-
sourceCommit: {
|
|
24
|
-
sha: 'hijklmn',
|
|
25
|
-
message: 'Another commit message (#56)',
|
|
26
|
-
},
|
|
27
|
-
sourceBranch: 'main',
|
|
28
|
-
},
|
|
29
|
-
];
|
|
30
|
-
describe('getPullRequestBody', () => {
|
|
31
|
-
describe('template variables should be replaced', () => {
|
|
32
|
-
describe('{{defaultPrDescription}}', () => {
|
|
33
|
-
it('replaces {{defaultPrDescription}}', () => {
|
|
34
|
-
const options = {
|
|
35
|
-
prDescription: '{{defaultPrDescription}}\n\ntext to append',
|
|
36
|
-
};
|
|
37
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
38
|
-
.toMatchInlineSnapshot(`
|
|
39
|
-
"# Backport
|
|
40
|
-
|
|
41
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
42
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
43
|
-
- [Another commit message (#56)](https://github.com/backport-org/different-merge-strategies/pull/56)
|
|
44
|
-
|
|
45
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
46
|
-
|
|
47
|
-
### Questions ?
|
|
48
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)
|
|
49
|
-
|
|
50
|
-
text to append"
|
|
51
|
-
`);
|
|
52
|
-
});
|
|
53
|
-
it('replaces {defaultPrDescription} for legacy reasons', () => {
|
|
54
|
-
const options = {
|
|
55
|
-
prDescription: '{defaultPrDescription}\n\ntext to append',
|
|
56
|
-
};
|
|
57
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
58
|
-
.toMatchInlineSnapshot(`
|
|
59
|
-
"# Backport
|
|
60
|
-
|
|
61
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
62
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
63
|
-
- [Another commit message (#56)](https://github.com/backport-org/different-merge-strategies/pull/56)
|
|
64
|
-
|
|
65
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
66
|
-
|
|
67
|
-
### Questions ?
|
|
68
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)
|
|
69
|
-
|
|
70
|
-
text to append"
|
|
71
|
-
`);
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe('{{commitsStringified}}', () => {
|
|
75
|
-
it('replaces {{commitsStringified}} with a stringifid JSON', () => {
|
|
76
|
-
const options = {
|
|
77
|
-
prDescription: 'Just output the commits: {{commitsStringified}}',
|
|
78
|
-
};
|
|
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
|
-
});
|
|
81
|
-
it('replaces {commits} for legacy reasons', () => {
|
|
82
|
-
const options = {
|
|
83
|
-
prDescription: 'Just output the commits: {commits}',
|
|
84
|
-
};
|
|
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
|
-
});
|
|
87
|
-
it('strips markdown comments', () => {
|
|
88
|
-
const commits = [
|
|
89
|
-
{
|
|
90
|
-
sourcePullRequest: {
|
|
91
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
92
|
-
},
|
|
93
|
-
sourceCommit: {
|
|
94
|
-
sha: 'acbcdef',
|
|
95
|
-
message: 'My commit message (#55) <!-- markdown-comment --> And then some more text',
|
|
96
|
-
},
|
|
97
|
-
sourceBranch: 'main',
|
|
98
|
-
},
|
|
99
|
-
];
|
|
100
|
-
const options = {
|
|
101
|
-
prDescription: 'Just output the commits: {commits}',
|
|
102
|
-
};
|
|
103
|
-
const res = (0, get_pull_request_body_1.getPullRequestBody)({
|
|
104
|
-
options,
|
|
105
|
-
commits,
|
|
106
|
-
targetBranch: '7.x',
|
|
107
|
-
});
|
|
108
|
-
expect(res).not.toContain('markdown-comment');
|
|
109
|
-
expect(res).not.toContain('<!--');
|
|
110
|
-
expect(res).not.toContain('-->');
|
|
111
|
-
expect(res).toContain('My commit message (#55) And then some more text');
|
|
112
|
-
});
|
|
113
|
-
it('handles curly brackets in commit messages without error', () => {
|
|
114
|
-
const commits = [
|
|
115
|
-
{
|
|
116
|
-
sourceCommit: {
|
|
117
|
-
message: "This is a commit message\nThis is a description with illegal brackets ```\r\nmetadata={{\r\n extraActionsColor: 'text',\r\n }}\r\n```",
|
|
118
|
-
sha: 'mySha',
|
|
119
|
-
},
|
|
120
|
-
sourceBranch: 'main',
|
|
121
|
-
},
|
|
122
|
-
];
|
|
123
|
-
const options = {
|
|
124
|
-
prDescription: '{defaultPrDescription}\n\n<!--BACKPORT {commits} BACKPORT-->',
|
|
125
|
-
};
|
|
126
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '9.0' }))
|
|
127
|
-
.toMatchInlineSnapshot(`
|
|
128
|
-
"# Backport
|
|
129
|
-
|
|
130
|
-
This will backport the following commits from \`main\` to \`9.0\`:
|
|
131
|
-
- This is a commit message (mySha)
|
|
132
|
-
|
|
133
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
134
|
-
|
|
135
|
-
### Questions ?
|
|
136
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)
|
|
137
|
-
|
|
138
|
-
<!--BACKPORT [{"sourceCommit":{"message":"This is a commit message\\nThis is a description with illegal brackets \`\`\`\\r\\nmetadata={{\\r\\n extraActionsColor: 'text',\\r\\n }}\\r\\n\`\`\`","sha":"mySha"},"sourceBranch":"main"}] BACKPORT-->"
|
|
139
|
-
`);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
describe('{{commitMessages}}', () => {
|
|
143
|
-
it('replaces {{commitMessages}}', () => {
|
|
144
|
-
const options = {
|
|
145
|
-
prDescription: '{{commitMessages}}',
|
|
146
|
-
};
|
|
147
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
148
|
-
.toMatchInlineSnapshot(`
|
|
149
|
-
" - [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
150
|
-
- [Another commit message (#56)](https://github.com/backport-org/different-merge-strategies/pull/56)"
|
|
151
|
-
`);
|
|
152
|
-
});
|
|
153
|
-
it('replaces {{commitMessages}} in default PR description', () => {
|
|
154
|
-
const options = {};
|
|
155
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
156
|
-
.toMatchInlineSnapshot(`
|
|
157
|
-
"# Backport
|
|
158
|
-
|
|
159
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
160
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
161
|
-
- [Another commit message (#56)](https://github.com/backport-org/different-merge-strategies/pull/56)
|
|
162
|
-
|
|
163
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
164
|
-
|
|
165
|
-
### Questions ?
|
|
166
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)"
|
|
167
|
-
`);
|
|
168
|
-
});
|
|
169
|
-
it('handles curly brackets in commit message without error', () => {
|
|
170
|
-
const commits = [
|
|
171
|
-
{
|
|
172
|
-
sourceCommit: {
|
|
173
|
-
message: "```metadata={{ extraActionsColor: 'text',\r\n }}\r\n```",
|
|
174
|
-
sha: 'mySha',
|
|
175
|
-
},
|
|
176
|
-
sourceBranch: 'main',
|
|
177
|
-
},
|
|
178
|
-
];
|
|
179
|
-
const options = {
|
|
180
|
-
prDescription: '{defaultPrDescription}\n\n<!--BACKPORT {commits} BACKPORT-->',
|
|
181
|
-
};
|
|
182
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '9.0' }))
|
|
183
|
-
.toMatchInlineSnapshot(`
|
|
184
|
-
"# Backport
|
|
185
|
-
|
|
186
|
-
This will backport the following commits from \`main\` to \`9.0\`:
|
|
187
|
-
- \`\`\`metadata={{ extraActionsColor: 'text',
|
|
188
|
-
(mySha)
|
|
189
|
-
|
|
190
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
191
|
-
|
|
192
|
-
### Questions ?
|
|
193
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)
|
|
194
|
-
|
|
195
|
-
<!--BACKPORT [{"sourceCommit":{"message":"\`\`\`metadata={{ extraActionsColor: 'text',\\r\\n }}\\r\\n\`\`\`","sha":"mySha"},"sourceBranch":"main"}] BACKPORT-->"
|
|
196
|
-
`);
|
|
197
|
-
});
|
|
198
|
-
});
|
|
199
|
-
describe('{{packageVersion}}', () => {
|
|
200
|
-
it('replaces {{PACKAGE_VERSION}}', () => {
|
|
201
|
-
const body = (0, get_pull_request_body_1.getPullRequestBody)({
|
|
202
|
-
options: {},
|
|
203
|
-
commits,
|
|
204
|
-
targetBranch: 'release',
|
|
205
|
-
});
|
|
206
|
-
expect(body).toContain('Backport version: 1.2.3-mocked');
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
describe('{{commits}}', () => {
|
|
210
|
-
it('should render commits using Handlebars #each helper', () => {
|
|
211
|
-
const options = {
|
|
212
|
-
prDescription: '{{#each commits}} - {{shortSha this.sourceCommit.sha}} {{this.sourceCommit.message}}\n{{/each}}',
|
|
213
|
-
};
|
|
214
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
215
|
-
.toMatchInlineSnapshot(`
|
|
216
|
-
" - acbcdef My commit message (#55)
|
|
217
|
-
- hijklmn Another commit message (#56)
|
|
218
|
-
"
|
|
219
|
-
`);
|
|
220
|
-
});
|
|
221
|
-
it('should handle curly brackets in commits message', () => {
|
|
222
|
-
const commits = [
|
|
223
|
-
{
|
|
224
|
-
sourceCommit: {
|
|
225
|
-
message: "This is a commit message\nThis is a description with illegal brackets ```\r\nmetadata={{\r\n extraActionsColor: 'text',\r\n }}\r\n```",
|
|
226
|
-
sha: 'mySha',
|
|
227
|
-
},
|
|
228
|
-
sourceBranch: 'main',
|
|
229
|
-
},
|
|
230
|
-
];
|
|
231
|
-
const options = {
|
|
232
|
-
prDescription: '{{#each commits}} - {{shortSha this.sourceCommit.sha}} {{this.sourceCommit.message}}\n{{/each}}',
|
|
233
|
-
};
|
|
234
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
235
|
-
.toMatchInlineSnapshot(`
|
|
236
|
-
" - mySha This is a commit message
|
|
237
|
-
This is a description with illegal brackets \`\`\`
|
|
238
|
-
metadata={{
|
|
239
|
-
extraActionsColor: 'text',
|
|
240
|
-
}}
|
|
241
|
-
\`\`\`
|
|
242
|
-
"
|
|
243
|
-
`);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
describe('custom templates', () => {
|
|
248
|
-
it('should support prodfiler team format', () => {
|
|
249
|
-
const commits = [
|
|
250
|
-
{
|
|
251
|
-
sourceCommit: {
|
|
252
|
-
sha: '9e42503a7d0e06e60c575ed2c3b7dc3e5df0dd5c',
|
|
253
|
-
message: 'My commit message (#55)',
|
|
254
|
-
},
|
|
255
|
-
sourcePullRequest: {
|
|
256
|
-
number: 123,
|
|
257
|
-
title: 'Original PR title',
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
sourceCommit: {
|
|
262
|
-
sha: '5ce6c3fb9525426d66a85eba057e1214f5f52995',
|
|
263
|
-
message: 'Another commit message',
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
];
|
|
267
|
-
const options = {
|
|
268
|
-
prDescription: `Backport #{{commits.0.sourcePullRequest.number}}: {{commits.0.sourcePullRequest.title}}
|
|
269
|
-
|
|
270
|
-
{{#each commits}}{{shortSha this.sourceCommit.sha}} {{this.sourceCommit.message}}\n{{/each}}`,
|
|
271
|
-
};
|
|
272
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
273
|
-
.toMatchInlineSnapshot(`
|
|
274
|
-
"Backport #123: Original PR title
|
|
275
|
-
|
|
276
|
-
9e42503a My commit message (#55)
|
|
277
|
-
5ce6c3fb Another commit message
|
|
278
|
-
"
|
|
279
|
-
`);
|
|
280
|
-
});
|
|
281
|
-
});
|
|
282
|
-
describe('commit message formatting', () => {
|
|
283
|
-
it('when single pull request is backported', () => {
|
|
284
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
285
|
-
options: {},
|
|
286
|
-
commits: [
|
|
287
|
-
{
|
|
288
|
-
sourcePullRequest: {
|
|
289
|
-
title: 'My PR Title',
|
|
290
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
291
|
-
},
|
|
292
|
-
sourceCommit: {
|
|
293
|
-
sha: 'abcdefghi',
|
|
294
|
-
message: 'My commit message (#55)',
|
|
295
|
-
},
|
|
296
|
-
sourceBranch: 'master',
|
|
297
|
-
},
|
|
298
|
-
],
|
|
299
|
-
targetBranch: '7.x',
|
|
300
|
-
})).toMatchInlineSnapshot(`
|
|
301
|
-
"# Backport
|
|
302
|
-
|
|
303
|
-
This will backport the following commits from \`master\` to \`7.x\`:
|
|
304
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
305
|
-
|
|
306
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
307
|
-
|
|
308
|
-
### Questions ?
|
|
309
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)"
|
|
310
|
-
`);
|
|
311
|
-
});
|
|
312
|
-
it('when a single commit (non pull request) is backported', () => {
|
|
313
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
314
|
-
options: {},
|
|
315
|
-
commits: [
|
|
316
|
-
{
|
|
317
|
-
sourceCommit: {
|
|
318
|
-
sha: 'abcdefghijklmw',
|
|
319
|
-
message: 'My commit message',
|
|
320
|
-
},
|
|
321
|
-
sourceBranch: 'main',
|
|
322
|
-
},
|
|
323
|
-
],
|
|
324
|
-
targetBranch: '7.x',
|
|
325
|
-
})).toMatchInlineSnapshot(`
|
|
326
|
-
"# Backport
|
|
327
|
-
|
|
328
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
329
|
-
- My commit message (abcdefgh)
|
|
330
|
-
|
|
331
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
332
|
-
|
|
333
|
-
### Questions ?
|
|
334
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)"
|
|
335
|
-
`);
|
|
336
|
-
});
|
|
337
|
-
it('when multiple commits are backported', () => {
|
|
338
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
339
|
-
options: {},
|
|
340
|
-
commits: [
|
|
341
|
-
{
|
|
342
|
-
sourcePullRequest: {
|
|
343
|
-
number: 55,
|
|
344
|
-
title: 'My PR Title',
|
|
345
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
346
|
-
},
|
|
347
|
-
sourceCommit: {
|
|
348
|
-
sha: 'abcdefghijklm',
|
|
349
|
-
message: 'My commit message (#55)',
|
|
350
|
-
},
|
|
351
|
-
sourceBranch: 'main',
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
sourceCommit: {
|
|
355
|
-
sha: 'qwertyuiop',
|
|
356
|
-
message: 'Another commit message',
|
|
357
|
-
},
|
|
358
|
-
sourceBranch: 'main',
|
|
359
|
-
},
|
|
360
|
-
],
|
|
361
|
-
targetBranch: '7.x',
|
|
362
|
-
})).toMatchInlineSnapshot(`
|
|
363
|
-
"# Backport
|
|
364
|
-
|
|
365
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
366
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
367
|
-
- Another commit message (qwertyui)
|
|
368
|
-
|
|
369
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
370
|
-
|
|
371
|
-
### Questions ?
|
|
372
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)"
|
|
373
|
-
`);
|
|
374
|
-
});
|
|
375
|
-
it('when a PR is merged (instead of squashed) and the individual commits are selected', () => {
|
|
376
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({
|
|
377
|
-
options: {},
|
|
378
|
-
commits: [
|
|
379
|
-
{
|
|
380
|
-
sourceCommit: {
|
|
381
|
-
message: 'Merge strategy: Second commit',
|
|
382
|
-
sha: 'e8df5eaa4db7b94474b48e2320b02d33a830d9fb',
|
|
383
|
-
},
|
|
384
|
-
sourcePullRequest: {
|
|
385
|
-
number: 1,
|
|
386
|
-
title: 'My PR Title',
|
|
387
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/1',
|
|
388
|
-
},
|
|
389
|
-
sourceBranch: 'main',
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
sourceCommit: {
|
|
393
|
-
message: 'Merge strategy: First commit',
|
|
394
|
-
sha: '5411b1c1144093e422220008f23f2c2b909ed113',
|
|
395
|
-
},
|
|
396
|
-
sourcePullRequest: {
|
|
397
|
-
number: 1,
|
|
398
|
-
title: 'My PR Title',
|
|
399
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/1',
|
|
400
|
-
},
|
|
401
|
-
sourceBranch: 'main',
|
|
402
|
-
},
|
|
403
|
-
],
|
|
404
|
-
targetBranch: '7.x',
|
|
405
|
-
})).toMatchInlineSnapshot(`
|
|
406
|
-
"# Backport
|
|
407
|
-
|
|
408
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
409
|
-
- [Merge strategy: Second commit](https://github.com/backport-org/different-merge-strategies/pull/1)
|
|
410
|
-
- [Merge strategy: First commit](https://github.com/backport-org/different-merge-strategies/pull/1)
|
|
411
|
-
|
|
412
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
413
|
-
|
|
414
|
-
### Questions ?
|
|
415
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)"
|
|
416
|
-
`);
|
|
417
|
-
});
|
|
418
|
-
});
|
|
419
|
-
describe('handlebars', () => {
|
|
420
|
-
it('should return default description if handlebars compilation fails', () => {
|
|
421
|
-
const compileError = new Error('Simulated compile error');
|
|
422
|
-
// Stub Handlebars.compile to throw an error.
|
|
423
|
-
const compileSpy = jest
|
|
424
|
-
.spyOn(handlebars_1.default, 'compile')
|
|
425
|
-
.mockImplementation(() => {
|
|
426
|
-
throw compileError;
|
|
427
|
-
});
|
|
428
|
-
const options = {};
|
|
429
|
-
expect((0, get_pull_request_body_1.getPullRequestBody)({ options, commits, targetBranch: '7.x' }))
|
|
430
|
-
.toMatchInlineSnapshot(`
|
|
431
|
-
"# Backport
|
|
432
|
-
|
|
433
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
434
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
435
|
-
- [Another commit message (#56)](https://github.com/backport-org/different-merge-strategies/pull/56)
|
|
436
|
-
|
|
437
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
438
|
-
|
|
439
|
-
### Questions ?
|
|
440
|
-
Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport)"
|
|
441
|
-
`);
|
|
442
|
-
// Restore the stubs.
|
|
443
|
-
compileSpy.mockRestore();
|
|
444
|
-
});
|
|
445
|
-
});
|
|
446
|
-
});
|
|
447
|
-
//# sourceMappingURL=get-pull-request-body.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,YA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this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getTitle = getTitle;
|
|
7
|
-
const handlebars_1 = __importDefault(require("handlebars"));
|
|
8
|
-
const get_source_branch_from_commits_1 = require("../../../get-source-branch-from-commits");
|
|
9
|
-
const logger_1 = require("../../../logger");
|
|
10
|
-
const commit_formatters_1 = require("../../commit-formatters");
|
|
11
|
-
function getTitle({ options, commits, targetBranch, }) {
|
|
12
|
-
const sourceBranch = (0, get_source_branch_from_commits_1.getSourceBranchFromCommits)(commits);
|
|
13
|
-
const commitMessages = commits
|
|
14
|
-
.map((c) => (0, commit_formatters_1.getFirstLine)(c.sourceCommit.message))
|
|
15
|
-
.join(' | ');
|
|
16
|
-
const defaultPrTitle = '[{{targetBranch}}] {{commitMessages}}';
|
|
17
|
-
const prTitle = (options.prTitle ?? defaultPrTitle)
|
|
18
|
-
.replaceAll('{{commitMessages}}', `{{{{raw}}}}${commitMessages}{{{{/raw}}}}`)
|
|
19
|
-
.replaceAll('{{targetBranch}}', targetBranch)
|
|
20
|
-
.replaceAll('{{sourceBranch}}', sourceBranch);
|
|
21
|
-
try {
|
|
22
|
-
const template = handlebars_1.default.compile(prTitle, { noEscape: true });
|
|
23
|
-
return template({
|
|
24
|
-
sourcePullRequest: commits[0].sourcePullRequest, // assume that all commits are from the same PR
|
|
25
|
-
commits,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
logger_1.logger.error('Error while compiling PR title template', error);
|
|
30
|
-
return prTitle.replaceAll('{{{{raw}}}}', '').replaceAll('{{{{/raw}}}}', '');
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=get-title.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-title.js","sourceRoot":"","sources":["../../../../../../src/lib/github/v3/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
|
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 handlebars_1 = __importDefault(require("handlebars"));
|
|
7
|
-
const get_title_1 = require("./get-title");
|
|
8
|
-
describe('getTitle', () => {
|
|
9
|
-
const commits = [
|
|
10
|
-
{
|
|
11
|
-
sourceBranch: 'main',
|
|
12
|
-
sourcePullRequest: {
|
|
13
|
-
title: 'My PR Title',
|
|
14
|
-
number: 55,
|
|
15
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
16
|
-
},
|
|
17
|
-
sourceCommit: {
|
|
18
|
-
sha: 'abcdefghi',
|
|
19
|
-
message: 'My commit message (#55)',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
sourcePullRequest: {
|
|
24
|
-
number: 56,
|
|
25
|
-
title: 'My PR Title',
|
|
26
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/56',
|
|
27
|
-
},
|
|
28
|
-
sourceCommit: {
|
|
29
|
-
sha: 'jklmnopqr',
|
|
30
|
-
message: 'Another commit message (#56)',
|
|
31
|
-
},
|
|
32
|
-
sourceBranch: 'main',
|
|
33
|
-
},
|
|
34
|
-
];
|
|
35
|
-
it('has the default title', () => {
|
|
36
|
-
const options = {};
|
|
37
|
-
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My commit message (#55) | Another commit message (#56)');
|
|
38
|
-
});
|
|
39
|
-
it('renders title with the original PR title', () => {
|
|
40
|
-
const options = {
|
|
41
|
-
prTitle: '[{{targetBranch}}] {{sourcePullRequest.title}}',
|
|
42
|
-
};
|
|
43
|
-
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My PR Title');
|
|
44
|
-
});
|
|
45
|
-
it('renders title using a specific commit', () => {
|
|
46
|
-
const options = {
|
|
47
|
-
prTitle: '[{{targetBranch}}] {{commits.0.sourcePullRequest.title}}',
|
|
48
|
-
};
|
|
49
|
-
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My PR Title');
|
|
50
|
-
});
|
|
51
|
-
it('renders title using {{commitMessages}}', () => {
|
|
52
|
-
const options = {
|
|
53
|
-
prTitle: 'Branch: "{{targetBranch}}". Messages: {{commitMessages}}',
|
|
54
|
-
};
|
|
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
|
-
});
|
|
57
|
-
it('support backticks', () => {
|
|
58
|
-
const options = {
|
|
59
|
-
prTitle: '[{{targetBranch}}] {{commitMessages}}',
|
|
60
|
-
};
|
|
61
|
-
const commits = [
|
|
62
|
-
{
|
|
63
|
-
sourceBranch: 'main',
|
|
64
|
-
sourcePullRequest: {
|
|
65
|
-
title: 'My PR Title',
|
|
66
|
-
number: 55,
|
|
67
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
68
|
-
},
|
|
69
|
-
sourceCommit: {
|
|
70
|
-
sha: 'abcdefghi',
|
|
71
|
-
message: 'My commit message with `backticks` (#55)',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
];
|
|
75
|
-
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toEqual('[7.x] My commit message with `backticks` (#55)');
|
|
76
|
-
});
|
|
77
|
-
it('does not break on curly brackets', () => {
|
|
78
|
-
const options = {
|
|
79
|
-
prTitle: '[{{targetBranch}}] {{commitMessages}}',
|
|
80
|
-
};
|
|
81
|
-
const commits = [
|
|
82
|
-
{
|
|
83
|
-
sourceBranch: 'main',
|
|
84
|
-
sourcePullRequest: {
|
|
85
|
-
title: 'My PR Title',
|
|
86
|
-
number: 55,
|
|
87
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
88
|
-
},
|
|
89
|
-
sourceCommit: {
|
|
90
|
-
sha: 'abcdefghi',
|
|
91
|
-
message: "```metadata={{ extraActionsColor: 'text',\r\n }}\r\n```",
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
];
|
|
95
|
-
expect(() => (0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).not.toThrow();
|
|
96
|
-
});
|
|
97
|
-
it('should return default description if handlebars compilation fails', () => {
|
|
98
|
-
const compileError = new Error('Simulated compile error');
|
|
99
|
-
// Stub Handlebars.compile to throw an error.
|
|
100
|
-
const compileSpy = jest
|
|
101
|
-
.spyOn(handlebars_1.default, 'compile')
|
|
102
|
-
.mockImplementation(() => {
|
|
103
|
-
throw compileError;
|
|
104
|
-
});
|
|
105
|
-
const options = {};
|
|
106
|
-
expect((0, get_title_1.getTitle)({ options, commits, targetBranch: '7.x' })).toMatchInlineSnapshot(`"[7.x] My commit message (#55) | Another commit message (#56)"`);
|
|
107
|
-
// Restore the stubs.
|
|
108
|
-
compileSpy.mockRestore();
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
//# sourceMappingURL=get-title.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,iBAAiB,EAAE;gBACjB,MAAM,EAAE,EAAE;gBACV,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