Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add: [checkout-pull-request] action to checkout all commits of a sing…
…le Pull Request (#26)
- Loading branch information
Showing
9 changed files
with
1,837 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# OpenTTD - Checkout all commits of a Pull Request | ||
|
||
The default `actions/checkout` only checks out the merge commit of a | ||
Pull Request. This means that on `HEAD` is the merge commit, on `HEAD^` is the | ||
base branch, and on `HEAD^2` are the commits of the Pull Request. Sometimes we | ||
need all the commits of the Pull Request available to us, but the default | ||
fetch-depth only give these three commits. | ||
|
||
This action tries in a smart way to fetch the full history of a Pull Request, | ||
by fetching more and more commits till `HEAD^` and `HEAD^2` have a common parent. | ||
The log between those are all the commits the Pull Request introduce. | ||
|
||
## Usage | ||
|
||
First make sure to use `actions/checkout` to get the repository. Use a | ||
`fetch-depth` of 4. | ||
This action should be called directly after that. | ||
|
||
```yaml | ||
- uses: openttd/actions/checkout-pull-request@v2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: 'OpenTTD - Checkout Pull Request' | ||
description: 'Checkout action to get the full history of a Pull Request' | ||
author: 'OpenTTD' | ||
inputs: {} | ||
runs: | ||
using: 'node12' | ||
main: 'dist/index.js' |
Oops, something went wrong.