fix: check for setting remote urls for forks (#2009)

This commit is contained in:
Tonye Jack
2024-03-26 12:10:44 -06:00
committed by GitHub
parent 4ff79362e5
commit 117616472f
3 changed files with 30 additions and 44 deletions

View File

@@ -745,21 +745,14 @@ export const getParentSha = async ({cwd}: {cwd: string}): Promise<string> => {
}
export const setForkRemote = async ({cwd}: {cwd: string}): Promise<void> => {
if (github.context.payload.repository?.fork) {
await exec.getExecOutput(
'git',
[
'remote',
'set-url',
'fork',
github.context.payload.repository?.clone_url
],
{
cwd,
silent: !core.isDebug()
}
)
}
await exec.getExecOutput(
'git',
['remote', 'set-url', 'fork', github.context.payload.repository?.clone_url],
{
cwd,
silent: !core.isDebug()
}
)
}
export const verifyCommitSha = async ({