Skip to content

Commit a34b172

Browse files
authored
chore: re-run v3 backport on label changes (#8877)
1 parent 5ace43b commit a34b172

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ name: v3 Maintenance
33
on:
44
pull_request:
55
branches: main
6+
types: [synchronize, opened, reopened, labeled, unlabeled]
67
paths:
78
- ".changeset/**.md"
89

910
jobs:
1011
open-pr:
11-
if: ${{ github.repository_owner == 'cloudflare' }}
12+
if: ${{ github.repository_owner == 'cloudflare' && !contains(github.event.pull_request.labels.*.name, 'skip-v3-pr') }}
1213
name: Open backport PR for patches
1314
runs-on: macos-latest
1415
concurrency:
@@ -35,7 +36,6 @@ jobs:
3536
PR_NUMBER: ${{ github.event.number }}
3637
PR_TITLE: ${{ toJson(github.event.pull_request.title) }}
3738
GH_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
38-
LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }}
3939
# - name: "Comment on PR with error details"
4040
# if: failure()
4141
# uses: marocchino/sticky-pull-request-comment@daa4a82a0a3f6c162c02b83fa44b3ab83946f7cb

tools/deployments/open-v3-pr.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ import parseChangeset from "@changesets/parse";
44

55
/* eslint-disable turbo/no-undeclared-env-vars */
66
if (require.main === module) {
7-
const parsedLabels = JSON.parse(process.env.LABELS as string) as string[];
8-
if (
9-
isWranglerPatch(process.env.FILES as string) &&
10-
!parsedLabels.includes("skip-v3-pr")
11-
) {
7+
if (isWranglerPatch(process.env.FILES as string)) {
128
// Create a new branch for the v3 maintenance PR
139
execSync(`git checkout -b v3-maintenance-${process.env.PR_NUMBER} -f`);
1410

0 commit comments

Comments
 (0)