Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes by create-pull-request action #4599

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions changes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From 997de70fd8ae54af3346b426d6fa3296c1c5c7c0 Mon Sep 17 00:00:00 2001
From: Youssef1313 <youssefvictor00@gmail.com>
Date: Fri, 10 Jan 2025 07:44:50 +0100
Subject: [PATCH] backport GH Action

---
.github/workflows/backport-base.yml | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/backport-base.yml b/.github/workflows/backport-base.yml
index 8518144320..d416f98ae2 100644
--- a/.github/workflows/backport-base.yml
+++ b/.github/workflows/backport-base.yml
@@ -115,6 +115,8 @@ jobs:
env:
BACKPORT_PR_TITLE_TEMPLATE: ${{ inputs.pr_title_template }}
BACKPORT_PR_DESCRIPTION_TEMPLATE: ${{ inputs.pr_description_template }}
+ GITHUB_TOKEN: ${{ secrets.BACKPORT_MACHINE_USER_PAT }}
+ GH_TOKEN: ${{ secrets.BACKPORT_MACHINE_USER_PAT }}
with:
script: |
const target_branch = '${{ steps.target-branch-extractor.outputs.result }}';
@@ -145,14 +147,6 @@ jobs:
await exec.exec(`git checkout ${target_branch}`);
await exec.exec(`git clean -xdff`);

- // configure git
- await exec.exec(`git config user.name "github-actions"`);
- await exec.exec(`git config user.email "github-actions@github.com"`);
-
- // create temporary backport branch
- const temp_branch = `backport/pr-${pr_number}-to-${target_branch}`;
- await exec.exec(`git checkout -b ${temp_branch}`);
-
// skip opening PR if the branch already exists on the origin remote since that means it was opened
// by an earlier backport and force pushing to the branch updates the existing PR
let should_open_pull_request = true;
@@ -164,6 +158,15 @@ jobs:
// download and apply patch
await exec.exec(`curl -sSL "${context.payload.issue.pull_request.patch_url}" --output changes.patch`);

+
+ // create temporary backport branch
+ // const temp_branch = `backport/pr-${pr_number}-to-${target_branch}`;
+ // await exec.exec(`git checkout -b ${temp_branch}`);
+
+ // configure git
+ // await exec.exec(`git config user.name "github-actions"`);
+ // await exec.exec(`git config user.email "github-actions@github.com"`);
+
// const git_am_command = "git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch";
// let git_am_output = `$ ${git_am_command}\n\n`;
// let git_am_failed = false;