Skip to content

What does "Checkout pull request HEAD commit instead of merge commit" mean? #426

Open
@sunshowers

Description

@sunshowers

Edit 2023-10-23: I no longer believe in what I wrote below -- I've seen data which has changed my belief into checking out the merge commit is the right default. I'll leave this open since there's a lot of passion here, and maybe this deserves clearer documentation.

Hi there!

The README has a section saying how to "[c]heckout pull request HEAD commit instead of merge commit". It isn't really clear what this means, and I tried looking at the source code and it didn't really make sense to me either.

Could you add some more information about this to the README? What is a "merge commit" in this situation?

Some information that might be useful:

  • a table with the default behavior and with the behavior with ref set to ${{ github.event.pull_request.head.sha }}
  • an example commit DAG pointing at the result of this action with and without this option

My experience with CI has led me to believe that there's just one way to check out a pull request (the most recent commit on the branch at the time the PR was initiated or last updated) so when I came across this option I was really surprised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions