Skip to content

Commit

Permalink
Merge #6355: fix: fetch PR head before merging it in `Check Merge Fas…
Browse files Browse the repository at this point in the history
…t-Forward Only` action

c3aae9e fix: fetch PR head before merging it in "check ff" (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  ```
  v Run git fetch origin master:master
    git fetch origin master:master
    git checkout master
    if [[ "pull_request_target" == "pull_request"* ]]; then
      git merge --ff-only b216a40
    else
      git merge --ff-only 3a18f08
    fi
    shell: /usr/bin/bash -e {0}
  From https://github.com/dashpay/dash
   * [new branch]          master     -> master
  Switched to branch 'master'
  merge: b216a40 - not something we can merge
  Error: Process completed with exit code 1.
  ```
  https://github.com/dashpay/dash/actions/runs/11492009432/job/31999602262?pr=6346

  So it's picking the right commit sha now but it has no commit itself.

  #6344 follow-up

  ## What was done?

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  PastaPastaPasta:
    utACK c3aae9e

Tree-SHA512: 6a50d3ad40ac54aa919e970b9509e78aa61dbdfc9211e8837b5bf470ee8f0b1b68f53d082d04e8e6f375bd0bb62d92951f69cde5985b6fd1482a0cd531abf8ba
  • Loading branch information
PastaPastaPasta committed Oct 24, 2024
2 parents 011f8c4 + c3aae9e commit dda9b73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/merge-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
git fetch origin master:master
git checkout master
if [[ "${{ github.event_name }}" == "pull_request"* ]]; then
git fetch origin pull/${{ github.event.pull_request.number }}/head
git merge --ff-only ${{ github.event.pull_request.head.sha }}
else
git merge --ff-only ${{ github.sha }}
Expand Down

0 comments on commit dda9b73

Please sign in to comment.