From 96e67d53845e48e731becf2013ec036674173171 Mon Sep 17 00:00:00 2001 From: cjc7373 Date: Tue, 27 Feb 2024 18:03:06 +0800 Subject: [PATCH] doc: clarify the behavior of a pull_request event --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index bfecf46..1baea5a 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,8 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/ ## Checkout pull request HEAD commit instead of merge commit +The default behavior of a `pull_request` event is to checkout to a ref that already merged your branch into the base branch (So don't be surprised to see the SHA checked out doesn't match your local HEAD SHA). You can change that to checkout your pull request's HEAD by: + ```yaml - uses: actions/checkout@v4 with: