Backport checkout validation

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Francesco Renzi
2026-12-01 10:47:26 +01:00
parent 11d5960a32
commit d2c34fd6af
5 changed files with 224 additions and 14 deletions

View File

@@ -191,12 +191,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