mirror of https://github.com/actions/toolkit
adds base and default ref for PR case
parent
67fd4c73a6
commit
cb3493c613
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "github-actions.warp-cache",
|
||||
"version": "1.2.0",
|
||||
"version": "1.2.1",
|
||||
"preview": true,
|
||||
"description": "Github action to use WarpBuild's in-house cache offering",
|
||||
"keywords": [
|
||||
|
|
|
@ -156,9 +156,18 @@ export async function getCacheEntry(
|
|||
case 'pull_request':
|
||||
{
|
||||
const pullPayload = github.context.payload as PullRequestEvent
|
||||
// Adds PR head branch and base branch to restoreBranches
|
||||
restoreBranches.push(
|
||||
`refs/heads/${pullPayload?.pull_request?.head?.ref}`
|
||||
)
|
||||
restoreBranches.push(
|
||||
`refs/heads/${pullPayload?.pull_request?.base?.ref}`
|
||||
)
|
||||
|
||||
// Adds default branch to restoreBranches
|
||||
restoreBranches.push(
|
||||
`refs/heads/${pullPayload?.repository?.default_branch}`
|
||||
)
|
||||
|
||||
// If head points to a different repository, add it to restoreRepos. We allow restores from head repos as well.
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue