Skip to content

Commit 1176164

Browse files
authored
fix: check for setting remote urls for forks (#2009)
1 parent 4ff7936 commit 1176164

File tree

3 files changed

+30
-44
lines changed

3 files changed

+30
-44
lines changed

dist/index.js

Lines changed: 21 additions & 28 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/utils.ts

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -745,21 +745,14 @@ export const getParentSha = async ({cwd}: {cwd: string}): Promise<string> => {
745745
}
746746

747747
export const setForkRemote = async ({cwd}: {cwd: string}): Promise<void> => {
748-
if (github.context.payload.repository?.fork) {
749-
await exec.getExecOutput(
750-
'git',
751-
[
752-
'remote',
753-
'set-url',
754-
'fork',
755-
github.context.payload.repository?.clone_url
756-
],
757-
{
758-
cwd,
759-
silent: !core.isDebug()
760-
}
761-
)
762-
}
748+
await exec.getExecOutput(
749+
'git',
750+
['remote', 'set-url', 'fork', github.context.payload.repository?.clone_url],
751+
{
752+
cwd,
753+
silent: !core.isDebug()
754+
}
755+
)
763756
}
764757

765758
export const verifyCommitSha = async ({

0 commit comments

Comments
 (0)