This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new 39be5ef43a Remove auto-port for now
39be5ef43a is described below

commit 39be5ef43a5079fc7573b74ac487c213f0606ed2
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Jul 1 10:01:48 2025 +0200

    Remove auto-port for now
    
    This requires specific permissions
---
 .github/AUTO_PORT.md            | 182 -------------------
 .github/workflows/auto-port.yml | 390 ----------------------------------------
 2 files changed, 572 deletions(-)

diff --git a/.github/AUTO_PORT.md b/.github/AUTO_PORT.md
deleted file mode 100644
index 0f5bc6a507..0000000000
--- a/.github/AUTO_PORT.md
+++ /dev/null
@@ -1,182 +0,0 @@
-<!---
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements.  See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-# Auto Port System
-
-This document describes the automated porting system for Maven that helps 
maintain fixes between the `maven-4.0.x` branch (for 4.0.x releases) and the 
`master` branch (for 4.1.0 development).
-
-## Overview
-
-The auto-port system automatically creates and updates cherry-pick PRs to port 
changes between branches when:
-1. PRs with port labels are opened, updated, or merged
-2. Labels are added or removed from PRs
-
-This system uses only built-in GitHub Actions to comply with Apache Software 
Foundation policies that prohibit external actions.
-
-**Key Feature**: Backport/forward-port PRs are created and updated 
automatically as you work on the original PR, even before it's merged!
-
-## Labels
-
-### `backport-to-4.0.x`
-- **Purpose**: Backport changes from `master` to `maven-4.0.x`
-- **Usage**: Apply this label to PRs targeting `master` that should be 
backported to the 4.0.x release branch
-- **Color**: Blue (#0052cc)
-- **Trigger**: When a PR with this label is opened, updated, labeled, or merged
-
-### `forward-port-to-master`
-- **Purpose**: Forward-port changes from `maven-4.0.x` to `master`
-- **Usage**: Apply this label to PRs targeting `maven-4.0.x` that should be 
forward-ported to master
-- **Color**: Green (#0e8a16)
-- **Trigger**: When a PR with this label is opened, updated, labeled, or merged
-
-### `auto-port`
-- **Purpose**: Identifies automatically created port PRs
-- **Usage**: Automatically applied by the system, do not apply manually
-- **Color**: Light orange (#f9d0c4)
-
-## Automatic Operation
-
-The system works automatically based on labels - no manual commands needed!
-
-### How It Works
-1. **Add a Label**: Apply `backport-to-4.0.x` or `forward-port-to-master` to 
your PR
-2. **Automatic Creation**: A port PR is created immediately
-3. **Automatic Updates**: Every time you push commits to your original PR, the 
port PR is updated
-4. **Conflict Handling**: If conflicts occur, the port PR becomes a draft with 
clear instructions
-
-## How It Works
-
-### Automatic Triggering
-1. **PR Events**: When a PR with a port label is opened, updated, labeled, or 
merged
-2. **Real-time Updates**: Port PRs are created and updated automatically as 
you work
-
-### Branch Creation and Updates
-The system automatically creates and updates branches with the pattern:
-- **Backport branches**: `backport-{pr-number}-to-maven-4.0.x`
-- **Forward-port branches**: `backport-{pr-number}-to-master`
-
-When you update your original PR, the existing port branch is deleted and 
recreated with the latest commits.
-
-### Cherry-pick Process
-The auto-port system handles the cherry-picking:
-1. Creates a new branch from the target branch
-2. Cherry-picks commits using `git cherry-pick -x` for traceability
-3. Works with commits from the PR branch directly (no merge commit needed)
-4. Creates a pull request with proper title and description
-5. Updates the port PR whenever the original PR changes
-
-### Conflict Handling
-When cherry-pick conflicts occur:
-- A **draft PR** is created with the first conflict committed
-- Clear instructions are provided on how to resolve conflicts
-- The original PR receives a comment with the conflict status
-- Manual resolution is required to complete the port
-
-## Examples
-
-### Scenario 1: Backporting a Bug Fix
-1. Create a PR targeting `master` with a bug fix
-2. Add the `backport-to-4.0.x` label
-3. **Immediately**: A backport PR to `maven-4.0.x` is created
-4. Make additional commits to your original PR
-5. **Automatically**: The backport PR is updated with your new commits
-6. Review and merge both PRs when ready
-
-### Scenario 2: Forward-porting a Feature
-1. Create a PR targeting `maven-4.0.x` with a new feature
-2. Add the `forward-port-to-master` label
-3. **Immediately**: A forward-port PR to `master` is created
-4. Continue developing in your original PR
-5. **Automatically**: The forward-port PR stays in sync
-6. Review and merge both PRs when ready
-
-### Scenario 3: Resolving Conflicts
-1. A port PR is created but has conflicts (marked as draft)
-2. Check out the port branch locally
-3. Resolve conflicts and push changes
-4. Convert from draft to ready for review
-5. Merge the port PR
-
-### Scenario 4: Adding Labels Later
-1. Create a PR without port labels
-2. Later, add the `backport-to-4.0.x` label
-3. **Immediately**: A backport PR is created with all current commits
-4. Continue working normally
-
-## Best Practices
-
-### When to Use Backports
-- Critical bug fixes that affect 4.0.x users
-- Security fixes
-- Documentation improvements
-- Small, safe improvements
-
-### When to Use Forward-ports
-- Features developed in 4.0.x that should be in 4.1.0
-- Bug fixes made directly to 4.0.x
-- Configuration or build improvements
-
-### Avoiding Conflicts
-- Keep changes small and focused
-- Avoid large refactoring in port candidates
-- Test ports in feature branches when unsure
-- Consider manual porting for complex changes
-
-## Troubleshooting
-
-### Port PR Not Created
-- Check that the original PR is merged
-- Verify you have the correct labels applied
-- Ensure the target branch exists
-- Check GitHub Actions logs for errors
-
-### Cherry-pick Conflicts
-- Review the draft PR created by the system
-- Clone the repository and check out the port branch
-- Resolve conflicts manually
-- Push changes and convert from draft
-
-### Permission Errors
-- Ensure you have write access to the repository
-- Comment commands require collaborator permissions
-- Contact repository maintainers if needed
-
-## Technical Details
-
-### Implementation
-- **Workflow File**: `.github/workflows/auto-port.yml`
-- **Actions Used**: Built-in GitHub Actions only (`actions/checkout@v4`, 
`actions/github-script@v7`)
-- **Trigger**: `pull_request_target` (for opened, synchronize, reopened, 
closed, labeled, unlabeled events)
-
-### Permissions Required
-- `contents: write` - For creating branches and commits
-- `pull-requests: write` - For creating and updating PRs
-- `issues: write` - For adding labels and comments
-
-### Security
-- Uses `pull_request_target` for secure handling of forks
-- Permission checks for comment commands
-- Respects branch protection rules
-
-### Advantages of Custom Implementation
-- **ASF Compliant**: Uses only built-in GitHub Actions as required by Apache 
Software Foundation
-- **Real-time Updates**: Port PRs are created and updated as you work, not 
just when merged
-- **Transparent**: All logic is visible in the workflow file
-- **Flexible**: Supports conflict resolution with draft PRs
-- **Secure**: No external dependencies or third-party actions
-- **Developer Friendly**: See port results immediately, catch conflicts early
-
-For questions or issues with the auto-port system, please create an issue or 
contact the maintainers.
diff --git a/.github/workflows/auto-port.yml b/.github/workflows/auto-port.yml
deleted file mode 100644
index 66dd42be18..0000000000
--- a/.github/workflows/auto-port.yml
+++ /dev/null
@@ -1,390 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-name: Auto Port
-
-on:
-  pull_request_target:
-    types: [opened, synchronize, reopened, closed, labeled, unlabeled]
-
-permissions:
-  contents: write
-  pull-requests: write
-  issues: write
-
-jobs:
-  backport:
-    name: Backport to maven-4.0.x
-    runs-on: ubuntu-latest
-    if: |
-      github.event_name == 'pull_request_target' &&
-      github.event.pull_request.base.ref == 'master' &&
-      contains(github.event.pull_request.labels.*.name, 'backport-to-4.0.x')
-
-    steps:
-
-      - name: Checkout
-        uses: actions/checkout@v4
-        with:
-          fetch-depth: 0
-
-      - name: Set up Git
-        run: |
-          git config --global user.name "github-actions[bot]"
-          git config --global user.email 
"github-actions[bot]@users.noreply.github.com"
-
-      - name: Get PR information
-        id: pr-info
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const prNumber = context.payload.pull_request.number;
-            const prTitle = context.payload.pull_request.title;
-            const prAuthor = context.payload.pull_request.user.login;
-            const prDescription = context.payload.pull_request.body || '';
-
-            core.setOutput('pr-number', prNumber);
-            core.setOutput('pr-title', prTitle);
-            core.setOutput('pr-author', prAuthor);
-            core.setOutput('pr-description', prDescription);
-
-      - name: Check if backport branch exists
-        id: check-branch
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const prNumber = context.payload.pull_request.number;
-            const branchName = `backport-${prNumber}-to-maven-4.0.x`;
-
-            try {
-              await github.rest.repos.getBranch({
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                branch: branchName
-              });
-              core.setOutput('exists', 'true');
-              core.setOutput('branch-name', branchName);
-            } catch (error) {
-              if (error.status === 404) {
-                core.setOutput('exists', 'false');
-                core.setOutput('branch-name', branchName);
-              } else {
-                throw error;
-              }
-            }
-
-      - name: Delete existing backport branch if it exists
-        if: steps.check-branch.outputs.exists == 'true'
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const branchName = '${{ steps.check-branch.outputs.branch-name }}';
-
-            // First, check if there's an open PR for this branch and close it
-            const { data: prs } = await github.rest.pulls.list({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              head: `${context.repo.owner}:${branchName}`,
-              state: 'open'
-            });
-
-            for (const pr of prs) {
-              await github.rest.pulls.update({
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                pull_number: pr.number,
-                state: 'closed'
-              });
-              console.log(`Closed existing backport PR #${pr.number}`);
-            }
-
-            // Delete the branch
-            await github.rest.git.deleteRef({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              ref: `heads/${branchName}`
-            });
-            console.log(`Deleted existing branch ${branchName}`);
-
-      - name: Create backport branch and cherry-pick
-        id: backport
-        run: |
-          set -e
-
-          PR_NUMBER="${{ steps.pr-info.outputs.pr-number }}"
-          BRANCH_NAME="${{ steps.check-branch.outputs.branch-name }}"
-          PR_HEAD_SHA="${{ github.event.pull_request.head.sha }}"
-          PR_BASE_SHA="${{ github.event.pull_request.base.sha }}"
-
-          # Create and switch to backport branch
-          git checkout -b "$BRANCH_NAME" origin/maven-4.0.x
-
-          # Get the commits from the PR branch
-          COMMITS=$(git rev-list --reverse "${PR_BASE_SHA}..${PR_HEAD_SHA}")
-
-          if [ -z "$COMMITS" ]; then
-            echo "No commits found in PR #${PR_NUMBER}"
-            exit 1
-          fi
-
-          echo "Commits to cherry-pick:"
-          echo "$COMMITS"
-
-          # Cherry-pick each commit
-          CONFLICT=false
-          for commit in $COMMITS; do
-            echo "Cherry-picking $commit"
-            if ! git cherry-pick -x "$commit"; then
-              echo "Conflict detected during cherry-pick of $commit"
-              CONFLICT=true
-              # Add the conflicted files and commit
-              git add .
-              git -c core.editor=true cherry-pick --continue || true
-              break
-            fi
-          done
-
-          # Push the branch
-          git push origin "$BRANCH_NAME"
-
-          echo "branch-name=$BRANCH_NAME" >> $GITHUB_OUTPUT
-          echo "has-conflicts=$CONFLICT" >> $GITHUB_OUTPUT
-
-      - name: Create backport pull request
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const prNumber = '${{ steps.pr-info.outputs.pr-number }}';
-            const prTitle = '${{ steps.pr-info.outputs.pr-title }}';
-            const prAuthor = '${{ steps.pr-info.outputs.pr-author }}';
-            const prDescription = `${{ steps.pr-info.outputs.pr-description 
}}`;
-            const branchName = '${{ steps.backport.outputs.branch-name }}';
-            const hasConflicts = '${{ steps.backport.outputs.has-conflicts }}' 
=== 'true';
-
-            const title = `[Backport maven-4.0.x] ${prTitle}`;
-            const body = `# Backport to maven-4.0.x
-
-            This is an automated backport of #${prNumber} to the 
\`maven-4.0.x\` branch.
-
-            **Original PR:** #${prNumber} by @${prAuthor}
-
-            ${hasConflicts ? '⚠️ **This PR has conflicts that need to be 
resolved manually.**' : ''}
-
-            ---
-
-            ${prDescription}`;
-
-            const { data: pr } = await github.rest.pulls.create({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              title: title,
-              head: branchName,
-              base: 'maven-4.0.x',
-              body: body,
-              draft: hasConflicts
-            });
-
-            // Add auto-port label
-            await github.rest.issues.addLabels({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              issue_number: pr.number,
-              labels: ['auto-port']
-            });
-
-            console.log(`Created backport PR #${pr.number}: ${pr.html_url}`);
-
-  forward-port:
-    name: Forward-port to master
-    runs-on: ubuntu-latest
-    if: |
-      github.event_name == 'pull_request_target' &&
-      github.event.pull_request.base.ref == 'maven-4.0.x' &&
-      contains(github.event.pull_request.labels.*.name, 
'forward-port-to-master')
-
-    steps:
-
-      - name: Checkout
-        uses: actions/checkout@v4
-        with:
-          fetch-depth: 0
-
-      - name: Set up Git
-        run: |
-          git config --global user.name "github-actions[bot]"
-          git config --global user.email 
"github-actions[bot]@users.noreply.github.com"
-
-      - name: Get PR information
-        id: pr-info
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const prNumber = context.payload.pull_request.number;
-            const prTitle = context.payload.pull_request.title;
-            const prAuthor = context.payload.pull_request.user.login;
-            const prDescription = context.payload.pull_request.body || '';
-
-            core.setOutput('pr-number', prNumber);
-            core.setOutput('pr-title', prTitle);
-            core.setOutput('pr-author', prAuthor);
-            core.setOutput('pr-description', prDescription);
-
-      - name: Check if forward-port branch exists
-        id: check-branch
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const prNumber = context.payload.pull_request.number;
-            const branchName = `backport-${prNumber}-to-master`;
-
-            try {
-              await github.rest.repos.getBranch({
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                branch: branchName
-              });
-              core.setOutput('exists', 'true');
-              core.setOutput('branch-name', branchName);
-            } catch (error) {
-              if (error.status === 404) {
-                core.setOutput('exists', 'false');
-                core.setOutput('branch-name', branchName);
-              } else {
-                throw error;
-              }
-            }
-
-      - name: Delete existing forward-port branch if it exists
-        if: steps.check-branch.outputs.exists == 'true'
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const branchName = '${{ steps.check-branch.outputs.branch-name }}';
-
-            // First, check if there's an open PR for this branch and close it
-            const { data: prs } = await github.rest.pulls.list({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              head: `${context.repo.owner}:${branchName}`,
-              state: 'open'
-            });
-
-            for (const pr of prs) {
-              await github.rest.pulls.update({
-                owner: context.repo.owner,
-                repo: context.repo.repo,
-                pull_number: pr.number,
-                state: 'closed'
-              });
-              console.log(`Closed existing forward-port PR #${pr.number}`);
-            }
-
-            // Delete the branch
-            await github.rest.git.deleteRef({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              ref: `heads/${branchName}`
-            });
-            console.log(`Deleted existing branch ${branchName}`);
-
-      - name: Create forward-port branch and cherry-pick
-        id: forward-port
-        run: |
-          set -e
-
-          PR_NUMBER="${{ steps.pr-info.outputs.pr-number }}"
-          BRANCH_NAME="${{ steps.check-branch.outputs.branch-name }}"
-          PR_HEAD_SHA="${{ github.event.pull_request.head.sha }}"
-          PR_BASE_SHA="${{ github.event.pull_request.base.sha }}"
-
-          # Create and switch to forward-port branch
-          git checkout -b "$BRANCH_NAME" origin/master
-
-          # Get the commits from the PR branch
-          COMMITS=$(git rev-list --reverse "${PR_BASE_SHA}..${PR_HEAD_SHA}")
-
-          if [ -z "$COMMITS" ]; then
-            echo "No commits found in PR #${PR_NUMBER}"
-            exit 1
-          fi
-
-          echo "Commits to cherry-pick:"
-          echo "$COMMITS"
-
-          # Cherry-pick each commit
-          CONFLICT=false
-          for commit in $COMMITS; do
-            echo "Cherry-picking $commit"
-            if ! git cherry-pick -x "$commit"; then
-              echo "Conflict detected during cherry-pick of $commit"
-              CONFLICT=true
-              # Add the conflicted files and commit
-              git add .
-              git -c core.editor=true cherry-pick --continue || true
-              break
-            fi
-          done
-
-          # Push the branch
-          git push origin "$BRANCH_NAME"
-
-          echo "branch-name=$BRANCH_NAME" >> $GITHUB_OUTPUT
-          echo "has-conflicts=$CONFLICT" >> $GITHUB_OUTPUT
-
-      - name: Create forward-port pull request
-        uses: actions/github-script@v7
-        with:
-          script: |
-            const prNumber = '${{ steps.pr-info.outputs.pr-number }}';
-            const prTitle = '${{ steps.pr-info.outputs.pr-title }}';
-            const prAuthor = '${{ steps.pr-info.outputs.pr-author }}';
-            const prDescription = `${{ steps.pr-info.outputs.pr-description 
}}`;
-            const branchName = '${{ steps.forward-port.outputs.branch-name }}';
-            const hasConflicts = '${{ steps.forward-port.outputs.has-conflicts 
}}' === 'true';
-
-            const title = `[Forward-port master] ${prTitle}`;
-            const body = `# Forward-port to master
-
-            This is an automated forward-port of #${prNumber} to the 
\`master\` branch.
-
-            **Original PR:** #${prNumber} by @${prAuthor}
-
-            ${hasConflicts ? '⚠️ **This PR has conflicts that need to be 
resolved manually.**' : ''}
-
-            ---
-
-            ${prDescription}`;
-
-            const { data: pr } = await github.rest.pulls.create({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              title: title,
-              head: branchName,
-              base: 'master',
-              body: body,
-              draft: hasConflicts
-            });
-
-            // Add auto-port label
-            await github.rest.issues.addLabels({
-              owner: context.repo.owner,
-              repo: context.repo.repo,
-              issue_number: pr.number,
-              labels: ['auto-port']
-            });
-
-            console.log(`Created forward-port PR #${pr.number}: 
${pr.html_url}`);

Reply via email to