backport 7.2.0-beta.1 → 7.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entrypoint.cli.js +0 -0
- package/dist/entrypoint.module.d.ts +4 -3
- package/dist/entrypoint.module.js +2 -7
- package/dist/options/ConfigOptions.d.ts +1 -1
- package/dist/options/cliArgs.d.ts +1 -0
- package/dist/options/cliArgs.js +4 -0
- package/dist/options/config/config.d.ts +1 -1
- package/dist/options/config/readConfigFile.d.ts +1 -1
- package/dist/options/options.d.ts +2 -1
- package/dist/services/github/v3/createStatusComment.js +1 -1
- package/dist/services/github/v4/apiRequestV4.d.ts +2 -3
- package/dist/services/github/v4/apiRequestV4.js +15 -14
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.js +2 -2
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.js +2 -2
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.js +2 -2
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.js +2 -2
- package/dist/services/github/v4/fetchRemoteProjectConfig.js +1 -1
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.d.ts +1 -1
- package/dist/services/github/v4/getOptionsFromGithub/query.js +1 -1
- package/dist/services/github/v4/throwOnInvalidAccessToken.js +6 -6
- package/dist/services/remoteConfig.js +2 -2
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.d.ts +4 -1
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.js +5 -1
- package/dist/services/sourceCommit/getMockSourceCommit.js +19 -18
- package/dist/services/sourceCommit/parseSourceCommit.d.ts +2 -2
- package/dist/services/sourceCommit/parseSourceCommit.js +9 -15
- package/dist/ui/cherrypickAndCreateTargetPullRequest.js +12 -18
- package/dist/ui/getCommits.js +6 -4
- package/dist/ui/maybeSetupRepo.js +7 -14
- package/dist/utils/packageVersion.d.ts +1 -1
- package/dist/utils/packageVersion.js +1 -1
- package/package.json +9 -9
- package/yarn.lock +121 -114
- package/dist/entrypoint.cli.e2e.private.test.d.ts +0 -1
- package/dist/entrypoint.cli.e2e.private.test.js +0 -386
- package/dist/entrypoint.cli.private.test.d.ts +0 -1
- package/dist/entrypoint.cli.private.test.js +0 -46
- package/dist/options/cliArgs.test.d.ts +0 -1
- package/dist/options/cliArgs.test.js +0 -182
- package/dist/options/config/config.test.d.ts +0 -1
- package/dist/options/config/config.test.js +0 -32
- package/dist/options/config/globalConfig.test.d.ts +0 -1
- package/dist/options/config/globalConfig.test.js +0 -61
- package/dist/options/config/projectConfig.test.d.ts +0 -1
- package/dist/options/config/projectConfig.test.js +0 -109
- package/dist/options/options.test.d.ts +0 -1
- package/dist/options/options.test.js +0 -384
- package/dist/runSequentially.test.d.ts +0 -1
- package/dist/runSequentially.test.js +0 -219
- package/dist/scripts/postinstall.test.d.ts +0 -1
- package/dist/scripts/postinstall.test.js +0 -53
- package/dist/services/env.test.d.ts +0 -1
- package/dist/services/env.test.js +0 -21
- package/dist/services/git.integration.test.d.ts +0 -1
- package/dist/services/git.integration.test.js +0 -320
- package/dist/services/git.test.d.ts +0 -1
- package/dist/services/git.test.js +0 -532
- package/dist/services/github/commitFormatters.test.d.ts +0 -1
- package/dist/services/github/commitFormatters.test.js +0 -11
- package/dist/services/github/v3/addAssigneesToPullRequest.test.d.ts +0 -1
- package/dist/services/github/v3/addAssigneesToPullRequest.test.js +0 -27
- package/dist/services/github/v3/createPullRequest.test.d.ts +0 -1
- package/dist/services/github/v3/createPullRequest.test.js +0 -325
- package/dist/services/github/v3/createStatusComment.test.d.ts +0 -1
- package/dist/services/github/v3/createStatusComment.test.js +0 -386
- package/dist/services/github/v4/apiRequestV4.test.d.ts +0 -1
- package/dist/services/github/v4/apiRequestV4.test.js +0 -109
- package/dist/services/github/v4/enablePullRequestAutoMerge.private.test.d.ts +0 -1
- package/dist/services/github/v4/enablePullRequestAutoMerge.private.test.js +0 -112
- package/dist/services/github/v4/fetchAuthorId.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchAuthorId.private.test.js +0 -28
- package/dist/services/github/v4/fetchCommits/allFetchers.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/allFetchers.private.test.js +0 -93
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitByPullNumber.private.test.js +0 -134
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitBySha.private.test.js +0 -116
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.private.test.js +0 -195
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchCommitsByAuthor.test.js +0 -152
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchCommits/fetchPullRequestBySearchQuery.private.test.js +0 -102
- package/dist/services/github/v4/fetchExistingPullRequest.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchExistingPullRequest.private.test.js +0 -47
- package/dist/services/github/v4/fetchRemoteProjectConfig.private.test.d.ts +0 -1
- package/dist/services/github/v4/fetchRemoteProjectConfig.private.test.js +0 -52
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.d.ts +0 -1
- package/dist/services/github/v4/getOptionsFromGithub/getOptionsFromGithub.private.test.js +0 -117
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.d.ts +0 -1
- package/dist/services/github/v4/getRepoOwnerAndNameFromGitRemotes.private.test.js +0 -71
- package/dist/services/github/v4/mocks/commitsByAuthorMock.d.ts +0 -2
- package/dist/services/github/v4/mocks/commitsByAuthorMock.js +0 -159
- package/dist/services/github/v4/throwOnInvalidAccessToken.test.d.ts +0 -1
- package/dist/services/github/v4/throwOnInvalidAccessToken.test.js +0 -87
- package/dist/services/prompt.test.d.ts +0 -1
- package/dist/services/prompt.test.js +0 -134
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.d.ts +0 -1
- package/dist/services/sourceCommit/getExpectedTargetPullRequests.test.js +0 -433
- package/dist/services/sourceCommit/parseSourceCommit.test.d.ts +0 -1
- package/dist/services/sourceCommit/parseSourceCommit.test.js +0 -225
- package/dist/test/ExecError.d.ts +0 -16
- package/dist/test/ExecError.js +0 -15
- package/dist/test/backport-e2e.mutation.test.d.ts +0 -1
- package/dist/test/backport-e2e.mutation.test.js +0 -347
- package/dist/test/handleUnbackportedPullRequests.private.test.d.ts +0 -1
- package/dist/test/handleUnbackportedPullRequests.private.test.js +0 -57
- package/dist/test/mockConfigFiles.d.ts +0 -5
- package/dist/test/mockConfigFiles.js +0 -21
- package/dist/test/mocks.d.ts +0 -10
- package/dist/test/mocks.js +0 -23
- package/dist/test/nockHelpers.d.ts +0 -16
- package/dist/test/nockHelpers.js +0 -36
- package/dist/test/private/getDevAccessToken.d.ts +0 -2
- package/dist/test/private/getDevAccessToken.js +0 -12
- package/dist/test/sandbox.d.ts +0 -5
- package/dist/test/sandbox.js +0 -43
- package/dist/test/setupFiles/automatic-mocks.d.ts +0 -1
- package/dist/test/setupFiles/automatic-mocks.js +0 -63
- package/dist/ui/cherrypickAndCreateTargetPullRequest.test.d.ts +0 -1
- package/dist/ui/cherrypickAndCreateTargetPullRequest.test.js +0 -459
- package/dist/ui/getCommitsWithoutBackports.test.d.ts +0 -1
- package/dist/ui/getCommitsWithoutBackports.test.js +0 -311
- package/dist/ui/getTargetBranches.test.d.ts +0 -1
- package/dist/ui/getTargetBranches.test.js +0 -198
- package/dist/ui/maybeSetupRepo.test.d.ts +0 -1
- package/dist/ui/maybeSetupRepo.test.js +0 -204
- package/dist/utils/excludeUndefined.test.d.ts +0 -1
- package/dist/utils/excludeUndefined.test.js +0 -24
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const createPullRequest_1 = require("./createPullRequest");
|
|
4
|
-
describe('getPullRequestBody', () => {
|
|
5
|
-
it('when single pull request is backported', () => {
|
|
6
|
-
expect((0, createPullRequest_1.getPullRequestBody)({
|
|
7
|
-
options: {},
|
|
8
|
-
commits: [
|
|
9
|
-
{
|
|
10
|
-
sourcePullRequest: {
|
|
11
|
-
number: 55,
|
|
12
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
13
|
-
mergeCommit: {
|
|
14
|
-
sha: 'abcdefghi',
|
|
15
|
-
message: 'My commit message (#55)',
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
sourceCommit: {
|
|
19
|
-
committedDate: '2020',
|
|
20
|
-
sha: 'abcdefghi',
|
|
21
|
-
message: 'My commit message (#55)',
|
|
22
|
-
},
|
|
23
|
-
expectedTargetPullRequests: [],
|
|
24
|
-
sourceBranch: 'master',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
targetBranch: '7.x',
|
|
28
|
-
})).toMatchInlineSnapshot(`
|
|
29
|
-
"# Backport
|
|
30
|
-
|
|
31
|
-
This will backport the following commits from \`master\` to \`7.x\`:
|
|
32
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
33
|
-
|
|
34
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
35
|
-
|
|
36
|
-
### Questions ?
|
|
37
|
-
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)"
|
|
38
|
-
`);
|
|
39
|
-
});
|
|
40
|
-
it('when a single commit (non pull request) is backported', () => {
|
|
41
|
-
expect((0, createPullRequest_1.getPullRequestBody)({
|
|
42
|
-
options: {},
|
|
43
|
-
commits: [
|
|
44
|
-
{
|
|
45
|
-
sourceCommit: {
|
|
46
|
-
committedDate: '',
|
|
47
|
-
sha: 'abcdefghijklmw',
|
|
48
|
-
message: 'My commit message',
|
|
49
|
-
},
|
|
50
|
-
sourceBranch: 'main',
|
|
51
|
-
expectedTargetPullRequests: [],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
targetBranch: '7.x',
|
|
55
|
-
})).toMatchInlineSnapshot(`
|
|
56
|
-
"# Backport
|
|
57
|
-
|
|
58
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
59
|
-
- My commit message (abcdefgh)
|
|
60
|
-
|
|
61
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
62
|
-
|
|
63
|
-
### Questions ?
|
|
64
|
-
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)"
|
|
65
|
-
`);
|
|
66
|
-
});
|
|
67
|
-
it('when multiple commits are backported', () => {
|
|
68
|
-
expect((0, createPullRequest_1.getPullRequestBody)({
|
|
69
|
-
options: {},
|
|
70
|
-
commits: [
|
|
71
|
-
{
|
|
72
|
-
sourcePullRequest: {
|
|
73
|
-
number: 55,
|
|
74
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
75
|
-
mergeCommit: {
|
|
76
|
-
sha: 'abcdefghijklm',
|
|
77
|
-
message: 'My commit message (#55)',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
sourceCommit: {
|
|
81
|
-
committedDate: '',
|
|
82
|
-
sha: 'abcdefghijklm',
|
|
83
|
-
message: 'My commit message (#55)',
|
|
84
|
-
},
|
|
85
|
-
sourceBranch: 'main',
|
|
86
|
-
expectedTargetPullRequests: [],
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
sourceCommit: {
|
|
90
|
-
committedDate: '',
|
|
91
|
-
sha: 'qwertyuiop',
|
|
92
|
-
message: 'Another commit message',
|
|
93
|
-
},
|
|
94
|
-
sourceBranch: 'main',
|
|
95
|
-
expectedTargetPullRequests: [],
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
targetBranch: '7.x',
|
|
99
|
-
})).toMatchInlineSnapshot(`
|
|
100
|
-
"# Backport
|
|
101
|
-
|
|
102
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
103
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
104
|
-
- Another commit message (qwertyui)
|
|
105
|
-
|
|
106
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
107
|
-
|
|
108
|
-
### Questions ?
|
|
109
|
-
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)"
|
|
110
|
-
`);
|
|
111
|
-
});
|
|
112
|
-
it('when a PR is merged (instead of squashed) and the individual commits are selected', () => {
|
|
113
|
-
expect((0, createPullRequest_1.getPullRequestBody)({
|
|
114
|
-
options: {},
|
|
115
|
-
commits: [
|
|
116
|
-
{
|
|
117
|
-
sourceCommit: {
|
|
118
|
-
committedDate: '2022-02-07T23:53:14Z',
|
|
119
|
-
message: 'Merge strategy: Second commit',
|
|
120
|
-
sha: 'e8df5eaa4db7b94474b48e2320b02d33a830d9fb',
|
|
121
|
-
},
|
|
122
|
-
sourcePullRequest: {
|
|
123
|
-
number: 1,
|
|
124
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/1',
|
|
125
|
-
mergeCommit: {
|
|
126
|
-
message: 'Merge pull request #1 from backport-org/merge-strategy\n\nMerge commits to `main`',
|
|
127
|
-
sha: '0db7f1ac1233461563d8708511d1c14adbab46da',
|
|
128
|
-
},
|
|
129
|
-
},
|
|
130
|
-
sourceBranch: 'main',
|
|
131
|
-
expectedTargetPullRequests: [],
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
sourceCommit: {
|
|
135
|
-
committedDate: '2022-02-07T23:51:59Z',
|
|
136
|
-
message: 'Merge strategy: First commit',
|
|
137
|
-
sha: '5411b1c1144093e422220008f23f2c2b909ed113',
|
|
138
|
-
},
|
|
139
|
-
sourcePullRequest: {
|
|
140
|
-
number: 1,
|
|
141
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/1',
|
|
142
|
-
mergeCommit: {
|
|
143
|
-
message: 'Merge pull request #1 from backport-org/merge-strategy\n\nMerge commits to `main`',
|
|
144
|
-
sha: '0db7f1ac1233461563d8708511d1c14adbab46da',
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
sourceBranch: 'main',
|
|
148
|
-
expectedTargetPullRequests: [],
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
targetBranch: '7.x',
|
|
152
|
-
})).toMatchInlineSnapshot(`
|
|
153
|
-
"# Backport
|
|
154
|
-
|
|
155
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
156
|
-
- [Merge strategy: Second commit](https://github.com/backport-org/different-merge-strategies/pull/1)
|
|
157
|
-
- [Merge strategy: First commit](https://github.com/backport-org/different-merge-strategies/pull/1)
|
|
158
|
-
|
|
159
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
160
|
-
|
|
161
|
-
### Questions ?
|
|
162
|
-
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)"
|
|
163
|
-
`);
|
|
164
|
-
});
|
|
165
|
-
it('replaces template variables in PR description', () => {
|
|
166
|
-
expect((0, createPullRequest_1.getPullRequestBody)({
|
|
167
|
-
options: {
|
|
168
|
-
prDescription: 'Backporting the following to {targetBranch}:\n{commitMessages}',
|
|
169
|
-
},
|
|
170
|
-
commits: [
|
|
171
|
-
{
|
|
172
|
-
sourcePullRequest: {
|
|
173
|
-
number: 55,
|
|
174
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
175
|
-
mergeCommit: {
|
|
176
|
-
sha: 'abcdefghijklm',
|
|
177
|
-
message: 'My commit message (#55)',
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
sourceCommit: {
|
|
181
|
-
committedDate: '',
|
|
182
|
-
sha: 'abcdefghijklm',
|
|
183
|
-
message: 'My commit message (#55)',
|
|
184
|
-
},
|
|
185
|
-
sourceBranch: 'main',
|
|
186
|
-
expectedTargetPullRequests: [],
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
sourceCommit: {
|
|
190
|
-
committedDate: '',
|
|
191
|
-
sha: 'qwertyuiop',
|
|
192
|
-
message: 'Another commit message',
|
|
193
|
-
},
|
|
194
|
-
sourceBranch: 'main',
|
|
195
|
-
expectedTargetPullRequests: [],
|
|
196
|
-
},
|
|
197
|
-
],
|
|
198
|
-
targetBranch: '7.x',
|
|
199
|
-
})).toMatchInlineSnapshot(`
|
|
200
|
-
"Backporting the following to 7.x:
|
|
201
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
202
|
-
- Another commit message (qwertyui)"
|
|
203
|
-
`);
|
|
204
|
-
});
|
|
205
|
-
it('appends text to the default descriptions', () => {
|
|
206
|
-
expect((0, createPullRequest_1.getPullRequestBody)({
|
|
207
|
-
options: {
|
|
208
|
-
prDescription: '{defaultPrDescription}\n\ntext to append',
|
|
209
|
-
},
|
|
210
|
-
commits: [
|
|
211
|
-
{
|
|
212
|
-
sourcePullRequest: {
|
|
213
|
-
number: 55,
|
|
214
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
215
|
-
mergeCommit: {
|
|
216
|
-
sha: 'abcdefghijklm',
|
|
217
|
-
message: 'My commit message (#55)',
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
sourceCommit: {
|
|
221
|
-
committedDate: '',
|
|
222
|
-
sha: 'abcdefghijklm',
|
|
223
|
-
message: 'My commit message (#55)',
|
|
224
|
-
},
|
|
225
|
-
sourceBranch: 'main',
|
|
226
|
-
expectedTargetPullRequests: [],
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
sourceCommit: {
|
|
230
|
-
committedDate: '',
|
|
231
|
-
sha: 'qwertyuiop',
|
|
232
|
-
message: 'Another commit message',
|
|
233
|
-
},
|
|
234
|
-
sourceBranch: 'main',
|
|
235
|
-
expectedTargetPullRequests: [],
|
|
236
|
-
},
|
|
237
|
-
],
|
|
238
|
-
targetBranch: '7.x',
|
|
239
|
-
})).toMatchInlineSnapshot(`
|
|
240
|
-
"# Backport
|
|
241
|
-
|
|
242
|
-
This will backport the following commits from \`main\` to \`7.x\`:
|
|
243
|
-
- [My commit message (#55)](https://github.com/backport-org/different-merge-strategies/pull/55)
|
|
244
|
-
- Another commit message (qwertyui)
|
|
245
|
-
|
|
246
|
-
<!--- Backport version: 1.2.3-mocked -->
|
|
247
|
-
|
|
248
|
-
### Questions ?
|
|
249
|
-
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)
|
|
250
|
-
|
|
251
|
-
text to append"
|
|
252
|
-
`);
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
describe('getTitle', () => {
|
|
256
|
-
it('has the default title', () => {
|
|
257
|
-
expect((0, createPullRequest_1.getTitle)({
|
|
258
|
-
options: {},
|
|
259
|
-
commits: [
|
|
260
|
-
{
|
|
261
|
-
sourceBranch: 'main',
|
|
262
|
-
sourcePullRequest: {
|
|
263
|
-
number: 55,
|
|
264
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
265
|
-
mergeCommit: {
|
|
266
|
-
sha: 'abcdefghi',
|
|
267
|
-
message: 'My commit message (#55)',
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
sourceCommit: {
|
|
271
|
-
committedDate: '2020',
|
|
272
|
-
sha: 'abcdefghi',
|
|
273
|
-
message: 'My commit message (#55)',
|
|
274
|
-
},
|
|
275
|
-
expectedTargetPullRequests: [],
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
sourcePullRequest: {
|
|
279
|
-
number: 56,
|
|
280
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/56',
|
|
281
|
-
mergeCommit: {
|
|
282
|
-
sha: 'jklmnopqr',
|
|
283
|
-
message: 'Another commit message (#56)',
|
|
284
|
-
},
|
|
285
|
-
},
|
|
286
|
-
sourceCommit: {
|
|
287
|
-
committedDate: '2020',
|
|
288
|
-
sha: 'jklmnopqr',
|
|
289
|
-
message: 'Another commit message (#56)',
|
|
290
|
-
},
|
|
291
|
-
sourceBranch: 'main',
|
|
292
|
-
expectedTargetPullRequests: [],
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
targetBranch: '7.x',
|
|
296
|
-
})).toEqual('[7.x] My commit message (#55) | Another commit message (#56)');
|
|
297
|
-
});
|
|
298
|
-
it('replaces template variables in PR title', () => {
|
|
299
|
-
expect((0, createPullRequest_1.getTitle)({
|
|
300
|
-
options: {
|
|
301
|
-
prTitle: 'Branch: "{targetBranch}". Messages: {commitMessages}',
|
|
302
|
-
},
|
|
303
|
-
commits: [
|
|
304
|
-
{
|
|
305
|
-
sourcePullRequest: {
|
|
306
|
-
number: 55,
|
|
307
|
-
url: 'https://github.com/backport-org/different-merge-strategies/pull/55',
|
|
308
|
-
mergeCommit: {
|
|
309
|
-
sha: 'abcdefghi',
|
|
310
|
-
message: 'My commit message (#55)',
|
|
311
|
-
},
|
|
312
|
-
},
|
|
313
|
-
sourceCommit: {
|
|
314
|
-
committedDate: '',
|
|
315
|
-
sha: 'abcdefghi',
|
|
316
|
-
message: 'My commit message (#55)',
|
|
317
|
-
},
|
|
318
|
-
sourceBranch: 'main',
|
|
319
|
-
expectedTargetPullRequests: [],
|
|
320
|
-
},
|
|
321
|
-
],
|
|
322
|
-
targetBranch: '7.x',
|
|
323
|
-
})).toEqual('Branch: "7.x". Messages: My commit message (#55)');
|
|
324
|
-
});
|
|
325
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|