mirror of
https://gitea.com/actions/checkout.git
synced 2026-12-04 09:59:08 +08:00
Backport checkout validation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
a37ce91208
commit
1473822320
5 files changed
+224
-14
No files matched your search
+9
-6
@@ -176,12 +176,15 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
||||
// repository or ref.
|
||||
const isDefaultCheckout = isWorkflowRepository && !core.getInput('ref')
|
||||
if (!isDefaultCheckout) {
|
||||
unsafePrCheckoutHelper.assertSafePrCheckout({
|
||||
qualifiedRepository,
|
||||
ref: result.ref,
|
||||
commit: result.commit,
|
||||
allowUnsafePrCheckout: result.allowUnsafePrCheckout
|
||||
})
|
||||
await unsafePrCheckoutHelper.assertSafePrCheckout(
|
||||
{
|
||||
qualifiedRepository,
|
||||
ref: result.ref,
|
||||
commit: result.commit,
|
||||
allowUnsafePrCheckout: result.allowUnsafePrCheckout
|
||||
},
|
||||
result.authToken
|
||||
)
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
Reference in new issue
Block a user