GeezerVison is showing github.com — Auto-port 4.1: Support more branch freedom for auto-porting (#16310) · netty/netty@8051d03
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/autoport-41.yml +18-17Lines changed: 18 additions & 17 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -name: Auto Backport to 4.1 | | 1 | +name: Auto-port to 4.1 | 2 | 2 | on: | 3 | 3 | pull_request_target: | 4 | 4 | types: | 5 | 5 | - closed | 6 | 6 | - labeled | 7 | 7 | branches: | 8 | 8 | - '4.2' | | 9 | + - '5.0' | 9 | 10 |
| 10 | 11 | jobs: | 11 | | - backport: | 12 | | - name: "Backporting to 4.1" | | 12 | + autoport: | | 13 | + name: "Auto-porting to 4.1" | 13 | 14 | concurrency: | 14 | 15 | group: port-41-${{ github.event.pull_request.number }} | 15 | 16 | cancel-in-progress: true | @@ -28,15 +29,15 @@ jobs: | 28 | 29 | | 29 | 30 | git config --global user.name "Netty Project Bot" | 30 | 31 |
| 31 | | - - name: Create backport PR branch and cherry-pick | | 32 | + - name: Create auto-port PR branch and cherry-pick | 32 | 33 | id: cherry-pick | 33 | 34 | run: | | 34 | 35 | MERGE_COMMIT="${{ github.event.pull_request.merge_commit_sha }}" | 35 | | - echo "Backporting commit: $MERGE_COMMIT" | | 36 | + echo "Auto-porting commit: $MERGE_COMMIT" | 36 | 37 | | 37 | | - BACKPORT_BRANCH="backport-pr-${{ github.event.pull_request.number }}-to-4.1" | | 38 | + PORT_BRANCH="auto-port-pr-${{ github.event.pull_request.number }}-to-4.1" | 38 | 39 | git fetch origin 4.1:4.1 | 39 | | - git checkout -b "$BACKPORT_BRANCH" 4.1 | | 40 | + git checkout -b "$PORT_BRANCH" 4.1 | 40 | 41 | | 41 | 42 | if git cherry-pick -x "$MERGE_COMMIT"; then | 42 | 43 | echo "Cherry-pick successful" | @@ -45,14 +46,14 @@ jobs: | 45 | 46 | git cherry-pick --abort | 46 | 47 | exit 1 | 47 | 48 | fi | 48 | | - echo "branch=$BACKPORT_BRANCH" >> "$GITHUB_OUTPUT" | | 49 | + echo "branch=$PORT_BRANCH" >> "$GITHUB_OUTPUT" | 49 | 50 |
| 50 | | - - name: Push backport branch | | 51 | + - name: Push auto-port branch | 51 | 52 | id: push | 52 | 53 | if: steps.cherry-pick.outcome == 'success' | 53 | 54 | run: | | 54 | 55 | if ! git push origin "${{ steps.cherry-pick.outputs.branch }}"; then | 55 | | - echo "Backport branch push failed" | | 56 | + echo "Auto-port branch push failed" | 56 | 57 | exit 1 | 57 | 58 | fi | 58 | 59 | | @@ -66,19 +67,19 @@ jobs: | 66 | 67 | const { data: pr } = await github.rest.pulls.create({ | 67 | 68 | owner: context.repo.owner, | 68 | 69 | repo: context.repo.repo, | 69 | | - title: `Backport 4.1: ${context.payload.pull_request.title}`, | | 70 | + title: `Auto-port 4.1: ${context.payload.pull_request.title}`, | 70 | 71 | head: '${{ steps.cherry-pick.outputs.branch }}', | 71 | 72 | base: '4.1', | 72 | | - body: `Backport of #${context.payload.pull_request.number} to 4.1\n` + | | 73 | + body: `Auto-port of #${context.payload.pull_request.number} to 4.1\n` + | 73 | 74 | `Cherry-picked commit: ${context.payload.pull_request.merge_commit_sha}\n\n---\n` + | 74 | 75 | `${context.payload.pull_request.body || ''}` | 75 | 76 | }); | 76 | | - console.log(`Created backport PR: ${pr.html_url}`); | | 77 | + console.log(`Created auto-port PR: ${pr.html_url}`); | 77 | 78 | await github.rest.issues.createComment({ | 78 | 79 | owner: context.repo.owner, | 79 | 80 | repo: context.repo.repo, | 80 | 81 | issue_number: context.payload.pull_request.number, | 81 | | - body: `Backport PR for 4.1: #${pr.number}` | | 82 | + body: `Auto-port PR for 4.1: #${pr.number}` | 82 | 83 | }); | 83 | 84 |
| 84 | 85 | # Important: This script MUST run with the default GITHUB_TOKEN to avoid triggering other actions. | @@ -104,10 +105,10 @@ jobs: | 104 | 105 | owner: context.repo.owner, | 105 | 106 | repo: context.repo.repo, | 106 | 107 | issue_number: context.payload.pull_request.number, | 107 | | - body: `Could not create automatic backport PR.\nGot conflicts when cherry-picking onto 4.1.` | | 108 | + body: `Could not create auto-port PR.\nGot conflicts when cherry-picking onto 4.1.` | 108 | 109 | }); | 109 | 110 |
| 110 | | - - name: Report backport branch push failure | | 111 | + - name: Report auto-port branch push failure | 111 | 112 | if: failure() && steps.push.outcome == 'failure' | 112 | 113 | uses: actions/github-script@v8 | 113 | 114 | with: | @@ -117,7 +118,7 @@ jobs: | 117 | 118 | owner: context.repo.owner, | 118 | 119 | repo: context.repo.repo, | 119 | 120 | issue_number: context.payload.pull_request.number, | 120 | | - body: `Could not create automatic backport PR.\n`+ | | 121 | + body: `Could not create auto-port PR.\n`+ | 121 | 122 | `I could cherry-pick onto 4.1 just fine, but pushing the new branch failed.` | 122 | 123 | }); | 123 | 124 |
| |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/autoport-42.yml +18-17Lines changed: 18 additions & 17 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -name: Auto Backport to 4.2 | | 1 | +name: Auto-port to 4.2 | 2 | 2 | on: | 3 | 3 | pull_request_target: | 4 | 4 | types: | 5 | 5 | - closed | 6 | 6 | - labeled | 7 | 7 | branches: | | 8 | + - '4.1' | 8 | 9 | - '5.0' | 9 | 10 |
| 10 | 11 | jobs: | 11 | | - backport: | 12 | | - name: "Backporting to 4.2" | | 12 | + autoport: | | 13 | + name: "Auto-porting to 4.2" | 13 | 14 | concurrency: | 14 | 15 | group: port-42-${{ github.event.pull_request.number }} | 15 | 16 | cancel-in-progress: true | @@ -28,15 +29,15 @@ jobs: | 28 | 29 | | 29 | 30 | git config --global user.name "Netty Project Bot" | 30 | 31 |
| 31 | | - - name: Create backport PR branch and cherry-pick | | 32 | + - name: Create auto-port PR branch and cherry-pick | 32 | 33 | id: cherry-pick | 33 | 34 | run: | | 34 | 35 | MERGE_COMMIT="${{ github.event.pull_request.merge_commit_sha }}" | 35 | | - echo "Backporting commit: $MERGE_COMMIT" | | 36 | + echo "Auto-porting commit: $MERGE_COMMIT" | 36 | 37 | | 37 | | - BACKPORT_BRANCH="backport-pr-${{ github.event.pull_request.number }}-to-4.2" | | 38 | + PORT_BRANCH="auto-port-pr-${{ github.event.pull_request.number }}-to-4.2" | 38 | 39 | git fetch origin 4.2:4.2 | 39 | | - git checkout -b "$BACKPORT_BRANCH" 4.2 | | 40 | + git checkout -b "$PORT_BRANCH" 4.2 | 40 | 41 | | 41 | 42 | if git cherry-pick -x "$MERGE_COMMIT"; then | 42 | 43 | echo "Cherry-pick successful" | @@ -45,14 +46,14 @@ jobs: | 45 | 46 | git cherry-pick --abort | 46 | 47 | exit 1 | 47 | 48 | fi | 48 | | - echo "branch=$BACKPORT_BRANCH" >> "$GITHUB_OUTPUT" | | 49 | + echo "branch=$PORT_BRANCH" >> "$GITHUB_OUTPUT" | 49 | 50 |
| 50 | | - - name: Push backport branch | | 51 | + - name: Push auto-port branch | 51 | 52 | id: push | 52 | 53 | if: steps.cherry-pick.outcome == 'success' | 53 | 54 | run: | | 54 | 55 | if ! git push origin "${{ steps.cherry-pick.outputs.branch }}"; then | 55 | | - echo "Backport branch push failed" | | 56 | + echo "Auto-port branch push failed" | 56 | 57 | exit 1 | 57 | 58 | fi | 58 | 59 | | @@ -66,19 +67,19 @@ jobs: | 66 | 67 | const { data: pr } = await github.rest.pulls.create({ | 67 | 68 | owner: context.repo.owner, | 68 | 69 | repo: context.repo.repo, | 69 | | - title: `Backport 4.2: ${context.payload.pull_request.title}`, | | 70 | + title: `Auto-port 4.2: ${context.payload.pull_request.title}`, | 70 | 71 | head: '${{ steps.cherry-pick.outputs.branch }}', | 71 | 72 | base: '4.2', | 72 | | - body: `Backport of #${context.payload.pull_request.number} to 4.2\n` + | | 73 | + body: `Auto-port of #${context.payload.pull_request.number} to 4.2\n` + | 73 | 74 | `Cherry-picked commit: ${context.payload.pull_request.merge_commit_sha}\n\n---\n` + | 74 | 75 | `${context.payload.pull_request.body || ''}` | 75 | 76 | }); | 76 | | - console.log(`Created backport PR: ${pr.html_url}`); | | 77 | + console.log(`Created auto-port PR: ${pr.html_url}`); | 77 | 78 | await github.rest.issues.createComment({ | 78 | 79 | owner: context.repo.owner, | 79 | 80 | repo: context.repo.repo, | 80 | 81 | issue_number: context.payload.pull_request.number, | 81 | | - body: `Backport PR for 4.2: #${pr.number}` | | 82 | + body: `Auto-port PR for 4.2: #${pr.number}` | 82 | 83 | }); | 83 | 84 |
| 84 | 85 | # Important: This script MUST run with the default GITHUB_TOKEN to avoid triggering other actions. | @@ -104,10 +105,10 @@ jobs: | 104 | 105 | owner: context.repo.owner, | 105 | 106 | repo: context.repo.repo, | 106 | 107 | issue_number: context.payload.pull_request.number, | 107 | | - body: `Could not create automatic backport PR.\nGot conflicts when cherry-picking onto 4.2.` | | 108 | + body: `Could not create auto-port PR.\nGot conflicts when cherry-picking onto 4.2.` | 108 | 109 | }); | 109 | 110 |
| 110 | | - - name: Report backport branch push failure | | 111 | + - name: Report auto-port branch push failure | 111 | 112 | if: failure() && steps.push.outcome == 'failure' | 112 | 113 | uses: actions/github-script@v8 | 113 | 114 | with: | @@ -117,7 +118,7 @@ jobs: | 117 | 118 | owner: context.repo.owner, | 118 | 119 | repo: context.repo.repo, | 119 | 120 | issue_number: context.payload.pull_request.number, | 120 | | - body: `Could not create automatic backport PR.\n`+ | | 121 | + body: `Could not create auto-port PR.\n`+ | 121 | 122 | `I could cherry-pick onto 4.2 just fine, but pushing the new branch failed.` | 122 | 123 | }); | 123 | 124 |
| |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/autoport-50.yml +18-17Lines changed: 18 additions & 17 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -name: Auto Forward port to 5.0 | | 1 | +name: Auto-port to 5.0 | 2 | 2 | on: | 3 | 3 | pull_request_target: | 4 | 4 | types: | 5 | 5 | - closed | 6 | 6 | - labeled | 7 | 7 | branches: | | 8 | + - '4.1' | 8 | 9 | - '4.2' | 9 | 10 |
| 10 | 11 | jobs: | 11 | | - backport: | 12 | | - name: "Forward porting to 5.0" | | 12 | + autoport: | | 13 | + name: "Auto-porting to 5.0" | 13 | 14 | concurrency: | 14 | 15 | group: port-50-${{ github.event.pull_request.number }} | 15 | 16 | cancel-in-progress: true | @@ -28,15 +29,15 @@ jobs: | 28 | 29 | | 29 | 30 | git config --global user.name "Netty Project Bot" | 30 | 31 |
| 31 | | - - name: Create forward port PR branch and cherry-pick | | 32 | + - name: Create auto-port PR branch and cherry-pick | 32 | 33 | id: cherry-pick | 33 | 34 | run: | | 34 | 35 | MERGE_COMMIT="${{ github.event.pull_request.merge_commit_sha }}" | 35 | | - echo "Forward porting commit: $MERGE_COMMIT" | | 36 | + echo "Auto-porting commit: $MERGE_COMMIT" | 36 | 37 | | 37 | | - FORWARDPORT_BRANCH="forwardport-pr-${{ github.event.pull_request.number }}-to-5.0" | | 38 | + PORT_BRANCH="auto-port-pr-${{ github.event.pull_request.number }}-to-5.0" | 38 | 39 | git fetch origin 5.0:5.0 | 39 | | - git checkout -b "$FORWARDPORT_BRANCH" 5.0 | | 40 | + git checkout -b "$PORT_BRANCH" 5.0 | 40 | 41 | | 41 | 42 | if git cherry-pick -x "$MERGE_COMMIT"; then | 42 | 43 | echo "Cherry-pick successful" | @@ -45,14 +46,14 @@ jobs: | 45 | 46 | git cherry-pick --abort | 46 | 47 | exit 1 | 47 | 48 | fi | 48 | | - echo "branch=$FORWARDPORT_BRANCH" >> "$GITHUB_OUTPUT" | | 49 | + echo "branch=$PORT_BRANCH" >> "$GITHUB_OUTPUT" | 49 | 50 |
| 50 | | - - name: Push backport branch | | 51 | + - name: Push auto-port branch | 51 | 52 | id: push | 52 | 53 | if: steps.cherry-pick.outcome == 'success' | 53 | 54 | run: | | 54 | 55 | if ! git push origin "${{ steps.cherry-pick.outputs.branch }}"; then | 55 | | - echo "Backport branch push failed" | | 56 | + echo "Auto-port branch push failed" | 56 | 57 | exit 1 | 57 | 58 | fi | 58 | 59 | | @@ -66,19 +67,19 @@ jobs: | 66 | 67 | const { data: pr } = await github.rest.pulls.create({ | 67 | 68 | owner: context.repo.owner, | 68 | 69 | repo: context.repo.repo, | 69 | | - title: `Forward port 5.0: ${context.payload.pull_request.title}`, | | 70 | + title: `Auto-port 5.0: ${context.payload.pull_request.title}`, | 70 | 71 | head: '${{ steps.cherry-pick.outputs.branch }}', | 71 | 72 | base: '5.0', | 72 | | - body: `Forward port of #${context.payload.pull_request.number} to 5.0\n` + | | 73 | + body: `Auto-port of #${context.payload.pull_request.number} to 5.0\n` + | 73 | 74 | `Cherry-picked commit: ${context.payload.pull_request.merge_commit_sha}\n\n---\n` + | 74 | 75 | `${context.payload.pull_request.body || ''}` | 75 | 76 | }); | 76 | | - console.log(`Created forward port PR: ${pr.html_url}`); | | 77 | + console.log(`Created auto-port PR: ${pr.html_url}`); | 77 | 78 | await github.rest.issues.createComment({ | 78 | 79 | owner: context.repo.owner, | 79 | 80 | repo: context.repo.repo, | 80 | 81 | issue_number: context.payload.pull_request.number, | 81 | | - body: `Forward port PR for 5.0: #${pr.number}` | | 82 | + body: `Auto-port PR for 5.0: #${pr.number}` | 82 | 83 | }); | 83 | 84 |
| 84 | 85 | # Important: This script MUST run with the default GITHUB_TOKEN to avoid triggering other actions. | @@ -104,10 +105,10 @@ jobs: | 104 | 105 | owner: context.repo.owner, | 105 | 106 | repo: context.repo.repo, | 106 | 107 | issue_number: context.payload.pull_request.number, | 107 | | - body: `Could not create automatic backport PR.\nGot conflicts when cherry-picking onto 5.0.` | | 108 | + body: `Could not create auto-port PR.\nGot conflicts when cherry-picking onto 5.0.` | 108 | 109 | }); | 109 | 110 |
| 110 | | - - name: Report backport branch push failure | | 111 | + - name: Report auto-port branch push failure | 111 | 112 | if: failure() && steps.push.outcome == 'failure' | 112 | 113 | uses: actions/github-script@v8 | 113 | 114 | with: | @@ -117,7 +118,7 @@ jobs: | 117 | 118 | owner: context.repo.owner, | 118 | 119 | repo: context.repo.repo, | 119 | 120 | issue_number: context.payload.pull_request.number, | 120 | | - body: `Could not create automatic backport PR.\n`+ | | 121 | + body: `Could not create auto-port PR.\n`+ | 121 | 122 | `I could cherry-pick onto 5.0 just fine, but pushing the new branch failed.` | 122 | 123 | }); | 123 | 124 |
| |
|