Skip to content

Commit 1b235b6

Browse files
authored
chore: add v3 backport to PR checklist (#8508)
* update PR template to mention v3 backports * add v3 backport to pr checklist
1 parent 2b37abe commit 1b235b6

File tree

3 files changed

+82
-20
lines changed

3 files changed

+82
-20
lines changed

.github/pull_request_template.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ The following selections do not need to be completed if this PR only contains ch
2121
- [ ] TODO (before merge)
2222
- [ ] Cloudflare docs PR(s): <!--e.g. <https://github.com/cloudflare/cloudflare-docs/pull/>...-->
2323
- [ ] Documentation not necessary because:
24+
- Wrangler V3 Backport
25+
- [ ] TODO (before merge)
26+
- [ ] PR: <!--e.g. <https://github.com/cloudflare/workers-sdk/pull/>...-->
27+
- [ ] Not necessary because: <!--e.g. not a patch change, not a Wrangler change...-->
2428

2529
<!--
2630
Have you read our [Contributing guide](https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md)?

tools/deployments/__tests__/validate-pr-description.test.ts

Lines changed: 66 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ Fixes #[insert GH or internal issue number(s)].
3030
- [x] TODO (before merge)
3131
- [ ] Cloudflare docs PR(s): <!--e.g. <https://github.com/cloudflare/cloudflare-docs/pull/>...-->
3232
- [ ] Documentation not necessary because:
33+
- Wrangler V3 Backport
34+
- [x] TODO (before merge)
35+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
36+
- [ ] Not necessary because:
3337
`,
3438
"[]",
3539
"[]"
@@ -41,6 +45,7 @@ Fixes #[insert GH or internal issue number(s)].
4145
"Your PR must run E2E tests, or provide justification for why running them is not required",
4246
"Your PR doesn't include a changeset. Either include one (following the instructions in CONTRIBUTING.md) or add the 'no-changeset-required' label to bypass this check. Most PRs should have a changeset, so only bypass this check if you're sure that your change doesn't need one: see https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#changesets for more details.",
4347
"Your PR must include documentation (in the form of a link to a Cloudflare Docs issue or PR), or provide justification for why no documentation is required",
48+
"Your PR must include a v3 back-port (in the form of a link to a workers-sdk PR), or provide justification for why this is not required. A PR should automatically be opened up for you if this is required - this is only needed for patch changes to Wrangler (excluding experimental features labelled as \`patch\`).",
4449
]
4550
`);
4651
});
@@ -67,6 +72,10 @@ Fixes #[insert GH or internal issue number(s)].
6772
- [ ] TODO (before merge)
6873
- [ ] Cloudflare docs PR(s): <!--e.g. <https://github.com/cloudflare/cloudflare-docs/pull/>...-->
6974
- [x] Documentation not necessary because: test
75+
- Wrangler V3 Backport
76+
- [ ] TODO (before merge)
77+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
78+
- [x] Not necessary because: test
7079
`,
7180
'["no-changeset-required"]',
7281
"[]"
@@ -92,14 +101,14 @@ Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
92101
- [ ] I don't know
93102
- [ ] Required
94103
- [x] Not required because: test
95-
- Changeset ([Changeset guidelines](https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#changesets))
96-
- [ ] TODO (before merge)
97-
- [x] Changeset included
98-
- [ ] Changeset not necessary because:
99104
- Public documentation
100105
- [ ] TODO (before merge)
101106
- [x] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/123
102107
- [ ] Documentation not necessary because:
108+
- Wrangler V3 Backport
109+
- [ ] TODO (before merge)
110+
- [x] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
111+
- [ ] Not necessary because:
103112
`,
104113
"[]",
105114
'[".changeset/hello-world.md"]'
@@ -125,14 +134,14 @@ Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
125134
- [x] I don't know
126135
- [ ] Required
127136
- [ ] Not required because: test
128-
- Changeset ([Changeset guidelines](https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#changesets))
129-
- [ ] TODO (before merge)
130-
- [x] Changeset included
131-
- [ ] Changeset not necessary because:
132137
- Public documentation
133138
- [ ] TODO (before merge)
134139
- [x] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/123
135140
- [ ] Documentation not necessary because:
141+
- Wrangler V3 Backport
142+
- [ ] TODO (before merge)
143+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
144+
- [x] Not necessary because: test
136145
`,
137146
"[]",
138147
'[".changeset/hello-world.md"]'
@@ -163,14 +172,14 @@ Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
163172
- [ ] I don't know
164173
- [x] Required
165174
- [ ] Not required because: test
166-
- Changeset ([Changeset guidelines](https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#changesets))
167-
- [ ] TODO (before merge)
168-
- [x] Changeset included
169-
- [ ] Changeset not necessary because:
170175
- Public documentation
171176
- [ ] TODO (before merge)
172177
- [x] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/123
173178
- [ ] Documentation not necessary because:
179+
- Wrangler V3 Backport
180+
- [ ] TODO (before merge)
181+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
182+
- [x] Not necessary because: test
174183
`,
175184
"[]",
176185
'[".changeset/hello-world.md"]'
@@ -200,14 +209,14 @@ Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
200209
- [ ] I don't know
201210
- [x] Required
202211
- [ ] Not required because: test
203-
- Changeset ([Changeset guidelines](https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#changesets))
204-
- [ ] TODO (before merge)
205-
- [x] Changeset included
206-
- [ ] Changeset not necessary because:
207212
- Public documentation
208213
- [ ] TODO (before merge)
209214
- [x] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/123
210215
- [ ] Documentation not necessary because:
216+
- Wrangler V3 Backport
217+
- [ ] TODO (before merge)
218+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
219+
- [x] Not necessary because: test
211220
`,
212221
'["e2e"]',
213222
'[".changeset/hello-world.md"]'
@@ -233,18 +242,55 @@ Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
233242
- [ ] I don't know
234243
- [X] Required
235244
- [ ] Not required because: test
236-
- Changeset ([Changeset guidelines](https://github.com/cloudflare/workers-sdk/blob/main/CONTRIBUTING.md#changesets))
237-
- [ ] TODO (before merge)
238-
- [X] Changeset included
239-
- [ ] Changeset not necessary because:
240245
- Public documentation
241246
- [ ] TODO (before merge)
242247
- [X] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/123
243248
- [ ] Documentation not necessary because:
249+
- Wrangler V3 Backport
250+
- [ ] TODO (before merge)
251+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
252+
- [x] Not necessary because: test
244253
`,
245254
'["e2e"]',
246255
'[".changeset/hello-world.md"]'
247256
)
248257
).toHaveLength(0);
249258
});
259+
260+
it("should not accept v3 back port none", () => {
261+
expect(
262+
validateDescription(
263+
"",
264+
`## What this PR solves / how to test
265+
266+
Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
267+
268+
## Author has addressed the following
269+
270+
- Tests
271+
- [ ] TODO (before merge)
272+
- [x] Tests included
273+
- [ ] Tests not necessary because:
274+
- E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
275+
- [ ] I don't know
276+
- [ ] Required
277+
- [x] Not required because: test
278+
- Public documentation
279+
- [ ] TODO (before merge)
280+
- [x] Cloudflare docs PR(s): https://github.com/cloudflare/cloudflare-docs/pull/123
281+
- [ ] Documentation not necessary because:
282+
- Wrangler V3 Backport
283+
- [ ] TODO (before merge)
284+
- [ ] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
285+
- [ ] Not necessary because: test
286+
`,
287+
"[]",
288+
'[".changeset/hello-world.md"]'
289+
)
290+
).toMatchInlineSnapshot(`
291+
[
292+
"Your PR must include a v3 back-port (in the form of a link to a workers-sdk PR), or provide justification for why this is not required. A PR should automatically be opened up for you if this is required - this is only needed for patch changes to Wrangler (excluding experimental features labelled as \`patch\`).",
293+
]
294+
`);
295+
});
250296
});

tools/deployments/validate-pr-description.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,17 @@ export function validateDescription(
104104
);
105105
}
106106

107+
if (
108+
!(
109+
/- \[x\] Wrangler PR: https:\/\/github\.com\/cloudflare\/workers-sdk\/(pull)\/\d+/i.test(
110+
body
111+
) || /- \[x\] Not necessary because: .+/i.test(body)
112+
)
113+
) {
114+
errors.push(
115+
"Your PR must include a v3 back-port (in the form of a link to a workers-sdk PR), or provide justification for why this is not required. A PR should automatically be opened up for you if this is required - this is only needed for patch changes to Wrangler (excluding experimental features labelled as `patch`)."
116+
);
117+
}
118+
107119
return errors;
108120
}

0 commit comments

Comments
 (0)