diff --git a/.github/workflows/process-git-request.rb b/.github/workflows/process-git-request.rb index 04a2ccd49b8bc..9be1869d51087 100644 --- a/.github/workflows/process-git-request.rb +++ b/.github/workflows/process-git-request.rb @@ -22,7 +22,7 @@ def process_git_request(fname, target_branch, source_branch, prj_dir) # puts "Working Dir : " + working_dir Dir.chdir working_dir # puts "pwd : " + Dir.pwd - git_cmd = "git log --oneline --no-abbrev-commit origin/" + target_branch + ".." + "origin/" + source_branch + git_cmd = "git log --oneline --no-abbrev-commit base_repo/" + target_branch + ".." + "origin/" + source_branch # puts git_cmd out, err, status = Open3.capture3(git_cmd) if status.exitstatus != 0 diff --git a/.github/workflows/process-pull-request.yml b/.github/workflows/process-pull-request.yml index a4f9f43fa425e..4187005d147a4 100644 --- a/.github/workflows/process-pull-request.yml +++ b/.github/workflows/process-pull-request.yml @@ -9,7 +9,7 @@ on: pull_request: branches: - '**' - - '!mainline' + - '!mainline' permissions: contents: read @@ -24,7 +24,18 @@ jobs: ruby-version: ['3.0'] steps: - - uses: actions/checkout@v4 + - name: Checkout PR branch + uses: actions/checkout@v4 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + fetch-depth: 0 + ref: ${{ github.head_ref }} + + - name: Checkout base branch + run: | + git remote add base_repo https://github.com/${{ github.repository }}.git + git fetch base_repo ${{ github.base_ref }}:${{ github.base_ref }} + - name: Set up Ruby # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, # change this to (see https://github.com/ruby/setup-ruby#versioning): @@ -39,8 +50,6 @@ jobs: run: | /usr/bin/pip3 install gitPython python -c "import sys; import git; print(sys.version)" - git fetch origin ${{ github.base_ref }} - git fetch origin ${{ github.head_ref }} git remote add linux https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --shallow-since="3 years ago" linux echo "Will run process-git-request.rb with:" diff --git a/.github/workflows/upstream-commit-check.yml b/.github/workflows/upstream-commit-check.yml index ae25072b95223..e95c4e904f8e4 100644 --- a/.github/workflows/upstream-commit-check.yml +++ b/.github/workflows/upstream-commit-check.yml @@ -16,12 +16,14 @@ jobs: - name: Checkout PR branch uses: actions/checkout@v4 with: + repository: ${{ github.event.pull_request.head.repo.full_name }} fetch-depth: 0 ref: ${{ github.head_ref }} - name: Checkout base branch run: | - git fetch origin ${{ github.base_ref }}:${{ github.base_ref }} + git remote add base_repo https://github.com/${{ github.repository }}.git + git fetch base_repo ${{ github.base_ref }}:${{ github.base_ref }} - name: Download check_kernel_commits.py run: |