diff --git a/.github/workflows/propogate-auto-merge.yml b/.github/workflows/propogate-auto-merge.yml deleted file mode 100644 index 6053b4bd002..00000000000 --- a/.github/workflows/propogate-auto-merge.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Propagate auto-merge label to backports - -on: - pull_request: - types: [opened] - -jobs: - propagate-label: - runs-on: ubuntu-latest - - permissions: - pull-requests: write - issues: write - - steps: - - name: Detect backport and original PR (metadata) - id: extract - uses: actions/github-script@v8 - with: - script: | - const pr = context.payload.pull_request; - const base = pr.base.ref; - if (!/^version-(15|16)-hotfix$/.test(base)) { - core.setOutput('is_backport', 'false'); - return; - } - - const isMergify = pr.user && pr.user.login === 'mergify[bot]'; - const headRef = pr.head.ref || ''; - const match = headRef.match(/(?:^|\/)pr-(\d+)(?:-|$)/i); - - if (isMergify && match) { - const original = Number(match[1]); - if (!Number.isNaN(original)) { - core.setOutput('original_pr', String(original)); - core.setOutput('is_backport', 'true'); - return; - } - } - - core.setOutput('is_backport', 'false'); - - - name: Check original PR labels - if: steps.extract.outputs.is_backport == 'true' - id: check - uses: actions/github-script@v7 - with: - script: | - const prNumber = Number("${{ steps.extract.outputs.original_pr }}"); - - const { data } = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: prNumber - }); - - const labels = data.labels.map(l => l.name); - core.setOutput("has_auto_merge", labels.includes("auto-merge backports")); - - - name: Add auto-merge label to backport PR - if: steps.check.outputs.has_auto_merge == 'true' - uses: actions/github-script@v7 - with: - script: | - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ["auto-merge"] - }); diff --git a/.mergify.yml b/.mergify.yml index 3c764d6f770..5e558062048 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -92,18 +92,3 @@ pull_request_rules: {{ title }} (#{{ number }}) {{ body }} - - name: Auto merge backports (safe) - conditions: - - label=auto-merge - - base~=^version-(15|16)-hotfix$ - - -conflict - - status-success=Python Unit Tests (1) - - status-success=Python Unit Tests (2) - - status-success=Python Unit Tests (3) - - status-success=Python Unit Tests (4) - - status-success=linters - - status-success=semgrep - - status-success=Patch Test - actions: - merge: - method: squash \ No newline at end of file