Skip to content

Commit d7ea498

Browse files
authored
Fix v3 maintenance (#8485)
* fix v3 maintenance * add rebase onto
1 parent 797ec98 commit d7ea498

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/open-v3-maintenance-prs.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ jobs:
3131
PR_NUMBER: ${{ github.event.number }}
3232
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
3333
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
34+
- name: "Comment on PR with error details"
35+
if: failure()
36+
uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb
37+
with:
38+
message: |
39+
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the `v3-maintenance` branch with your changes. Thank you for helping us keep Wrangler v3 supported!
40+
41+
Depending on your changes, running `git rebase --onto v3-maintenance main ${{ github.head_ref }}` might be a good starting point.
42+
43+
- name: "Comment on PR with error details"
44+
if: success()
45+
uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb
46+
with:
47+
message: |
48+
These changes have been automatically backported to Wrangler v3 :tada: You can view the automatically updated PR at https://github.com/cloudflare/workers-sdk/compare/v3-maintenance...v3-maintenance-${{ github.event.number }}. Please check that PR for correctness, and make sure it's merged after this one. Thank you for helping us keep Wrangler v3 supported!

tools/deployments/open-v3-pr.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ if (require.main === module) {
1212
// Create a new branch for the v3 maintenance PR
1313
execSync(`git checkout -b v3-maintenance-${process.env.PR_NUMBER} -f`);
1414

15+
execSync(
16+
`git rebase --onto v3-maintenance main v3-maintenance-${process.env.PR_NUMBER}`
17+
);
18+
1519
execSync(`git push origin HEAD --force`);
1620

1721
try {
1822
// Open PR
1923
execSync(
20-
`gh pr create --base v2-maintenance --head v3-maintenance-${process.env.PR_NUMBER} --label "skip-pr-description-validation" --label "skip-v3-pr" --title "Backport #${process.env.PR_NUMBER} to Wrangler v3" --body "This is an automatically opened PR to backport patch changes from #${process.env.PR_NUMBER} to Wrangler v3"`
24+
`gh pr create --base v3-maintenance --head v3-maintenance-${process.env.PR_NUMBER} --label "skip-pr-description-validation" --label "skip-v3-pr" --title "Backport #${process.env.PR_NUMBER} to Wrangler v3" --body "This is an automatically opened PR to backport patch changes from #${process.env.PR_NUMBER} to Wrangler v3"`
2125
);
2226
} catch {
2327
// Ignore "PR already created failures"

0 commit comments

Comments
 (0)